Hi,
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.
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:
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.
Parser Error Message: Could not create type 'braArkivWS.Services'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="Services.asmx.cs" Class="braArkivWS.Services" %>
Source File: /braArkivWeb/Service/Services.asmx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
The Event Viewer has a more "descriptive" error message:
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
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
Process information: Process ID: 8032 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE
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& completedSynchronously)
Request information:
Request URL: http://localhost/braArkivWeb/Service/Services.asmx
Request path: /braArkivWeb/Service/Services.asmx
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
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& completedSynchronously)
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.
Could anyone help me?
Best regards.