title: Error browsing web service and how to configure web site in IIS 7.5
body: <p>I have a problem. We recently migrated our web site solution from asp.net 3.5 to asp.net 4.0. The web site have a web service that I have added a new method to.</p>
  
  <p>On my local machine (Windows 7, VS 2010,.NET 4.0, IIS 7.5), I have no problem browsing our web service when I use the Visual Studio Development Server, but when I check the "Use Local IIS Web server" option in the web project, I get an error saying:</p>
  
  <p>Parser Error 
  Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and  modify your source file appropriately. </p>
  
  <p>Parser Error Message: Could not create type 'braArkivWS.Services'.</p>
  
  <p>Source Error: </p>
  
  <p>Line 1:  &lt;%@ WebService Language="C#" CodeBehind="Services.asmx.cs" Class="braArkivWS.Services" %></p>
  
  <p>Source File: /braArkivWeb/Service/Services.asmx    Line: 1 </p>
  
  <hr>
  
  <p>Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1</p>
  
  <p><strong>The Event Viewer has a more "descriptive" error message:</strong></p>
  
  <p>Event code: 3006 
  Event message: A parser error has occurred. 
  Event time: 17.08.2010 08:12:11 
  Event time (UTC): 17.08.2010 06:12:11 
  Event ID: b350253d265743c0925f92024a8c1dcf 
  Event sequence: 3 
  Event occurrence: 1 
  Event detail code: 0 </p>
  
  <p>Application information: 
      Application domain: /LM/W3SVC/1/ROOT/braArkivWeb/Service-1-129264991310980968 
      Trust level: Full 
      Application Virtual Path: /braArkivWeb/Service 
      Application Path: D:\dev\braArkiv\dev\braArkivWeb\braArkivWeb\Service\ 
      Machine name: GEO-TD-543807 </p>
  
  <p>Process information: 
      Process ID: 8032 
      Process name: w3wp.exe 
      Account name: NT AUTHORITY\NETWORK SERVICE </p>
  
  <p>Exception information: 
      Exception type: HttpParseException 
      Exception message: Could not create type 'braArkivWS.Services'.
     at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
     at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
     at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
     at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
     at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
     at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
     at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
     at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
     at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url, HttpContext context)
     at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
     at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
     at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)</p>
  
  <p>Request information: 
      Request URL: <a href="http://localhost/braArkivWeb/Service/Services.asmx" rel="nofollow noreferrer">http://localhost/braArkivWeb/Service/Services.asmx</a> 
      Request path: /braArkivWeb/Service/Services.asmx 
      User host address: ::1 
      User:<br>
      Is authenticated: False 
      Authentication Type:<br>
      Thread account name: NT AUTHORITY\NETWORK SERVICE </p>
  
  <p>Thread information: 
      Thread ID: 5 
      Thread account name: NT AUTHORITY\NETWORK SERVICE 
      Is impersonating: False 
      Stack trace:    at System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)
     at System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly)
     at System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults results)
     at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
     at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
     at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
     at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
     at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
     at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
     at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url, HttpContext context)
     at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
     at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
     at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)</p>
  
  <p>I made an Application Pool for the web site in IIS that use the asp.net 4.0 runtime and that run in the classic mode. Before we migrated to asp.net 4.0 we used an application pool with the asp.net 2.0 runtime. I guess it has something to do with that, but I don't know much about configuring IIS 7.5 to know how to deal with this problem. </p>
  
  <p>Could anyone help me?</p>
  
  <p>Best regards.</p>