簡體   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