繁体   English   中英

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

[英]Error browsing web service and how to configure web site in IIS 7.5

我有个问题。 最近,我们将网站解决方案从asp.net 3.5迁移到了asp.net 4.0。 该网站有一个Web服务,我向其中添加了新方法。

在我的本地计算机(Windows 7,VS 2010,.NET 4.0,IIS 7.5)上,当我使用Visual Studio开发服务器时,但在选中“使用本地IIS Web服务器”选项时,浏览Web服务没有问题。 Web项目中,我收到一条错误消息:

解析器错误说明:解析服务此请求所需的资源期间发生错误。 请查看以下特定的解析错误详细信息,并适当地修改您的源文件。

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

源错误:

第1行:<%@ WebService Language =“ C#” CodeBehind =“ Services.asmx.cs” Class =“ braArkivWS.Services”%>

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


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

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

事件代码:3006事件消息:发生解析器错误。 事件时间:17.08.2010 08:12:11事件时间(UTC):17.08.2010 06:12:11事件ID:b350253d265743c0925f92024a8c1dcf事件顺序:3事件发生:1事件详细代码:0

应用程序信息:应用程序域:/ LM / W3SVC / 1 / ROOT / braArkivWeb / Service-1-129264991310980968信任级别:完整应用程序虚拟路径:/ braArkivWeb / Service应用程序路径:D:\\ dev \\ braArkiv \\ dev \\ braArkivWeb \\ braArkivWeb \\服务\\机器名称: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(组件buildAssembly)在System.Web.Compilation.SimpleHandlerBuildProvider.GetGeneratedType(CompilerResults结果)在System.Web.Compilation.BuildProvider System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults结果)的System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)的System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,布尔值noBuild的.CreateBuildResult(CompilerResults结果) ,位于System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext上下文,VirtualPath virtualPath,布尔值noBuild,布尔值allowCrossApp,布尔值allowBuildInPrecompile,布尔值throwIfIsToTo的System.Web.Compilation.BuildManager。 Compilation.BuildManager.GetVPathBuildResult(HttpC ontext上下文,VirtualPath virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔sureIsUpToDate)在System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,VirtualPath虚拟路径)在System.Web.UI.WebServiceParser.GetCompiledType(字符串inputFile,HttpContext System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url,HttpContext上下文)的System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(System.Web的HttpContext上下文,字符串动词,字符串url,字符串filePath) System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()的.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext上下文,字符串requestType,字符串url,字符串pathTranslated)在System.Web.HttpApplication.ExecuteStep( IExecutionStep步骤,布尔值和已同步完成)

请求信息:请求URL: http://localhost/braArkivWeb/Service/Services.asmx请求路径:/braArkivWeb/Service/Services.asmx用户主机地址::: 1用户:
已认证:错误认证类型:
线程帐户名称:NT AUTHORITY \\ NETWORK SERVICE

线程信息:线程ID:5线程帐户名:NT AUTHORITY \\ NETWORK SERVICE正在模拟:False堆栈跟踪:在System.Web.UI.SimpleWebHandlerParser.GetType(String typeName)在System.Web.UI.SimpleWebHandlerParser.GetTypeToCache(Assembly builtAssembly )在System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)在System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)在System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)在System.Web.Compilation。 System.Web.Compilation.BuildManager。上下文VirtualPath virtualPath,布尔值noBuild,布尔值allowCrossApp,布尔值allowBuildInPrecomp System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context,VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile,Boolean sureIsUpToDate),System.Web.Comp.ationContext.BuildManager.GetVPathBuild() ,位于System.Web.UI.WebServiceParser.GetCompiledType(字符串inputFile,HttpContext上下文)处的System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(字符串url,HttpContext上下文)处的System.Web.Services.Protocols.WebServiceHandlerFactory处的VirtualPath virtualPath) System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext上下文,字符串动词,字符串url,字符串filePath)在System.Web.HttpApplication.MaterializeHandlerExecutionStep.System处的.GetHandler(HttpContext上下文,字符串requestType,字符串url,字符串pathTranslated) System.Web.HttpApplication.ExecuteStep(IExecutionStep)上的.Web.HttpApplication.IExecutionStep.Execute() 步骤,布尔值和已完成同步)

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

有人可以帮我吗?

最好的祝福。

更新:成功!

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM