浏览Web服务时出错以及如何在IIS 7.5中配置网站

问题描述:

我遇到问题。我们最近将我们的网站解决方案从asp.net 3.5迁移到了asp.net 4.0。该网站有一个Web服务,我已经添加了一个新的方法。我在使用Visual Studio开发服务器时浏览我们的Web服务时没有任何问题,但当我检查“使用本地IIS网站时,服务器“选项,我得到一个错误说:浏览Web服务时出错以及如何在IIS 7.5中配置网站

解析器错误 描述:在解析服务此请求所需资源时发生错误。请检查以下特定的分析错误详细信息并适当修改您的源文件。

解析器错误消息:无法创建类型'braArkivWS.Services'。

源错误:

1行:<%@ WebService的语言= “C#” 的CodeBehind = “Services.asmx.cs” 类= “braArkivWS.Services” %>

源文件:/ braArkivWeb /Service/Services.asmx行:1


版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.1

事件查看器有更多的“描述”错误消息:

事件代码:3006 事件消息:发生了解析错误。 事件时间:2010年8月17日八时12分11秒 事件时间(UTC):2010年8月17日6时12分十一秒 事件ID:b350253d265743c0925f92024a8c1dcf 事件序列:3 事件发生:1个 事件详细信息代码:0

应用程序信息: 应用程序域:/ LM/W3SVC/1/ROOT/braArkivWeb /服务的1-129264991310980968 信任级别:全 应用程序虚拟路径:/ braArkivWeb /服务 应用程序路径:d:\ dev的\ braArkiv \ dev \ braArkivWeb \ braArkivWeb \ Service \ 机器名称:GEO-TD-543807

进程信息: 进程ID:8032 进程名:w3wp.exe 帐户名:NT AUTHORITY \ NETWORK SERVICE

异常信息: 异常类型:HttpParseException 异常消息:无法创建类型“braArkivWS.Services ”。 在System.Web.UI.SimpleWebHandlerParser.GetType(字符串的typeName) 在System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(大会builtAssembly) 在System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults结果) 在的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,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔throwIfNotFound,布尔ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext上下文,VirtualPath virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔throwIfNotFound, (HttpContext上下文,VirtualPath虚拟路径,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔ensureIsUpToDate) 在System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,VirtualPath virtualPath ) at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile,HttpContext context) at System.Web.Services.Prot在System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext上下文,字符串动词,字符串url,字符串文件路径) 在System.Web.Script.Services.ScriptHandlerFactory处可能会收到以下错误信息:ocols.WebServiceHandlerFactory.GetCompiledType(String url,HttpContext上下文) 。 GetHandler(HttpContext的上下文中,字符串的RequestType,字符串URL,字符串pathTranslated) 在System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔&已完成异步)

请求信息: 请求URL:http://localhost/braArkivWeb/Service/Services.asmx 请求路径:/ braArkivWeb/Servic E/Services.asmx 用户主机地址::: 1 用户:
通过身份验证:假 身份验证类型:
线程帐户名:NT AUTHORITY \ NETWORK SERVICE

线程信息: 线程ID:5 线程帐户名:NT AUTHORITY \ NETWORK SERVICE 正在模拟:假 堆栈跟踪:在System.Web.UI.SimpleWebHandlerParser.GetType(字符串的typeName) 在System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(大会builtAssembly) 在系统.Web.Compilation.SimpleHandlerBuildProvider.Ge tGeneratedType(CompilerResults结果) 在System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults结果) 在System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults结果) 在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 ,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔throwIfNotFound,布尔ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,虚拟路径virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,VirtualPath virtualPath) at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext上下文) 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) 在System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext上下文,String requestType,String url,String pathTranslated) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep。在System.Web.HttpApplication.ExecuteStep执行() (IExecutionStep一步,布尔& completedSynchronously)

我做了一个应用程序池的网站在IIS中使用的asp.net 4.0运行时和经典模式运行。在我们迁移到asp.net 4.0之前,我们使用了一个具有asp.net 2.0运行时的应用程序池。我想这跟这个有关,但我对配置IIS 7.5知道如何处理这个问题并不了解。

任何人都可以帮助我吗?

此致敬礼。

更新:成功!

我不知道我第一次做错了什么,可能是在我的IIS中进行了一些设置,但是当我重新安装IIS 7.5并为asp.net 4.0运行aspnet_regiss -i时,我能够成功浏览我的asmx服务:)