簡體   English   中英

“由於內部錯誤,服務器無法處理請求”。 WCF 服務,在 IIS 上部署時

[英]'The server was unable to process the request due to an internal error'. WCF Service, when deployed on IIS

我正在嘗試使用我創建的服務,該服務在部署在本地主機上時可以完美使用。 但是當我在服務器(IIS)上部署它后嘗試使用相同的服務時。 我收到以下錯誤

由於內部錯誤,服務器無法處理請求。有關錯誤的詳細信息,請在服務器上打開 IncludeExceptionDetailInFaults(從 ServiceBehaviorAttribute 或從配置行為),以便將異常信息發送回客戶端,或根據 Microsoft .NET Framework 3.0 SDK 文檔打開跟蹤並檢查服務器跟蹤日志。

關於我的服務的詳細信息:我調用了 3rd 方服務: http : //www.webservicex.net/sunsetriseservice.asmx?op=GetSunSetRiseTime來創建我的服務。

編輯:全棧跟蹤:

Stack Trace: 


[FaultException: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10614671
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336
   ServiceReference1.IService.sunsetSunRiseTime(String strlatitude, String strlongitude) +0
   _Default.btSubmit_click(Object sender, EventArgs e) +85
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9553178
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

編輯 2:服務描述: http : //www.webservicex.net/WS/WSDetails.aspx? WSID=65&CATID =12這是因為我使用的是asmx服務而不是.svc 對不起,如果我聽起來很困惑!
編輯 3服務器端 web.config: https : //gist.github.com/KodeSeeker/5226269

編輯 4: ** 將 IncludeExceptionDetailInFaults 設置為 true(PS 我在一個不斷斷開連接的遠程服務器上工作,所以我不確定這個錯誤是否也是因為這個):

Stack Trace: 


[FaultException`1: The HTTP request was forbidden with client authentication scheme 'Anonymous'.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10614671
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336
   ServiceReference1.IService.sunsetSunRiseTime(String strlatitude, String strlongitude) +0
   _Default.btSubmit_click(Object sender, EventArgs e) +85
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9553178
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

我將首先查看此消息:

客戶端身份驗證方案“匿名”禁止 HTTP 請求

您是否在 IIS 中啟用了匿名身份驗證? 您可以在 IIS 管理器中檢查。

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM