Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
I have two project.One is web application and other is window service.I have added the .dll of window application project in window services.But when I install the window service an exception occur "An Unhandle exception occur in .Net".And found that the error is occur in loading the .dll of my project.Can anyone suggest me that How can I find that what is the issue in my project .dll?

What I have tried:

Just recreate the dll of project and add in the window service but it is not working.
Posted
Updated 15-Dec-16 0:22am
v2

1 solution

Chances are the dll you're adding from the web app is using functionality not available in the windows service. As you have provided no relevant information at all, we don't know what this dll is or what it does, it's impossible to say what the exact issue might be. As a rule though, don't add dlls intended for web apps to non web apps, chances are you are trying to do something that isn't possible and should be done another way.
 
Share this answer
 
Comments
AMAN MIDDHA 15-Dec-16 7:38am    
To solve the issue , I create one new web application with simple add method, then i added this dll in window service project but there is same issue , I check framework version of both project are same
1. window service version(.net framework 4.5.2)
2. web application version (.net framework 4.5.2)

Can you please suggest me how I proceed?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900