'由于内部错误,服务器无法处理请求'。在IIS上部署时的WCF服务

问题描述 投票:0回答:1

我正在尝试使用我创建的服务,当服务部署在localhost上时,服务会完全消耗。但是当我在服务器(IIS)上部署它之后尝试使用相同的服务时。我收到以下错误

由于内部错误,服务器无法处理请求。有关错误的更多信息,请在服务器上启用IncludeExceptionDetailInFaults(来自ServiceBehaviorAttribute或来自配置行为),以便将异常信息发送回客户端,或者根据Microsoft .NET Framework 3.0 SDK文档打开跟踪并检查服务器跟踪日志。

关于我服务的详细信息:我打电话给第三方服务: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(P.S.我在远程服务器上工作,保持断开连接所以我不确定这个错误是否也是因为这个):

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
c# .net wcf iis deployment
1个回答
0
投票

我首先看一下这条消息:

客户端身份验证方案“Anonymous”禁止HTTP请求

您是否在IIS中启用了匿名身份验证?您可以在IIS管理器中检查它。

© www.soinside.com 2019 - 2024. All rights reserved.