Gives solution for any Error occurs in any Programming Language, .Net Core 3.1, 3.0, C#,Asp.Net,Sqlserver,MVC,Java,Php,Html,Css,Jquery,errors and solutions,Latest News,Technology

Tuesday, 27 October 2015

Install windows service using Command Prompt C#,Asp.Net

No comments :
First of all check your System type : 32-bit or 64-bit.
Open Command Prompt in Administrative mode.
Open C:\ drive
Choose  Windows > Microsoft.NET > Framework64 > v4.0.30319
If you are using 32-bit OS choose Framework folder only otherwise choose Framework64


and finally path like this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319 

after completing these steps copy the path from address bar and then open command prompt type
cd copied path
ex: cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 
Press Enter key.
For Installation:
type installutil exe file path
ex: installutil E:\E\Final\abc\bin\Debug\job.exe and the press enter
or
installutil /i "E:\E\Final\abc\bin\Debug\job.exe"

displays a message if successfully installed otherwise throw error message.

For UnInstallation:
If you want to uninstall service just add -u at the end of the path
installutil E:\E\Final\abc\bin\Debug\job.exe -u
 or
installutil /u "E:\E\Final\abc\bin\Debug\job.exe"

Sometimes below errors happen:
An exception of type 'System.TypeInitializationException' occurred in service.exe but was not handled in user code
Solution: Check connection string properly what you have used in your code.

Thank you for Visiting

No comments :

Post a Comment