I create an ASP.Net project and I want to host it on local IIS. I do the following steps In Project properties -> Web settings I chose Use Local IIS Server and gave a URL as localhost/MyApp.
These are the settings I have in my project
- Application Pool set to ASP.Net v4.0 Classic
- App Pool Enable 32 bit Applicationproperty is true
- App Pool is started
- Project build property set to Any CPUfor Target framework
I have the following code in Global.asax. Application_BeginRequest method is empty in the same file.
protected override void Application_Start(object sender, EventArgs e)
{
base.Application_Start(sender, e);
String _path = String.Concat(System.AppDomain.CurrentDomain.RelativeSearchPath, “;”,System.Environment.GetEnvironmentVariable(“PATH”));
System.Environment.SetEnvironmentVariable(“PATH”, _path, EnvironmentVariableTarget.Process);
MyAppLog.Initialize();
MyAppLog.WriteMessage(“Application Started”);
}
I tried accessing it on my firefox browser. Following is something that I am facing
- Application Pool is Started
- I try to access my local website (by giving url as localhost/MyApp)
- I receive the error as HTTP Error 503. The service is unavailable
- Application Pool is Stopped
Can anyone help me to understand what’s happening? Please guide me through useful steps to resolve this issue.
Thanks.