I have installed IIS and registered asp .net worker process on many machines now. But today while setting up and my new laptop I recieved two weird errors. The first one was
Event Source: ASP.NET 2.0.50727.0
Failed to initialize the AppDomain:/LM/W3SVC/1/Root/WebSite1
Exception: System.IO.FileLoadException
Message: Could not load file or assembly ‘System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. Access is denied.
StackTrace: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
Followed by two more errors
Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0×80070005 Access is denied.
and
aspnet_wp.exe (PID: 3720) stopped unexpectedly.
Upon some investigations I found out that this error occurs if you do not restart the machine after installing IIS. What I did wrong was I installed IIS and immediately after that installed Visual Studio which must have registered the asp .net 2.0 on IIS. To overcome the problem I took the following steps
- Uninstalled the IIS
- Restarted the machine
- Installed the IIS
- Restarted the machine
- Re-register the asp.net : using aspnet_regiis.exe -i
While this solved this problem, I then started to encounter another weird error, which I could not believe. All I was seein g when I used to run an asp.net application locally was Server not available error.
When I checked the system event logs I saw an error entry
Event Type: Error
Event Source: W3SVC
Event Category: None
Event ID: 115
Date: 24/09/2007
Time: 5:44:08 PM
User: N/A
Computer: BITG022-NB
Description:
The service could not bind instance 1. The data is the error code.
For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
This error is caused and will occur if some application is already running and utilising Port 80,which is the default Http port. In my case I was running skype; In skype there is an option where you can use. Check the image below for reference.
