Wcf NotFound错误和编译失败的问题

Wcf NotFound错误和编译失败的问题,wcf,Wcf,我们经常会在WCF服务(Silverlight使用)中遇到错误,但这些服务并没有给我们提供太多的支持: 我找到的唯一线索可能是更改了,但我不确定为什么我们需要这样做,我也不知道默认值是什么 它托管在Windows2008SP1上 服务器位于负载平衡器后面 web.config中服务的超时时间为5分钟 最大对象大小为50000000 这些服务具有AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirem

我们经常会在WCF服务(Silverlight使用)中遇到错误,但这些服务并没有给我们提供太多的支持:

我找到的唯一线索可能是更改了,但我不确定为什么我们需要这样做,我也不知道默认值是什么

  • 它托管在Windows2008SP1上
  • 服务器位于负载平衡器后面
  • web.config中服务的超时时间为5分钟
  • 最大对象大小为50000000
  • 这些服务具有
    AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)
任何建议都很好

更新 这是另一个症状-Silverlight客户端经常将此异常发送到我们的日志服务(它会写入事件日志+电子邮件)

保存报告时出错-错误对象包含错误
System.ServiceModel.CommunicationException:[HttpWebRequest\u WebException\u RemoteServer]
参数:未找到
调试资源字符串不可用。通常,键和参数提供足够的信息来诊断问题。看见http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer --->System.Net.WebException:[HttpWebRequest\u WebException\u RemoteServer]
参数:未找到
调试资源字符串不可用。通常,键和参数提供足够的信息来诊断问题。看见http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer --->System.Net.WebException:[HttpWebRequest\u WebException\u RemoteServer]
参数:未找到
调试资源字符串不可用。通常,键和参数提供足够的信息来诊断问题。看见http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer
位于System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
在System.Net.Browser.BrowserHttpWebRequest.c__DisplayClass5.b__4(对象发送状态)中
在System.Net.Browser.AsyncHelper.c__DisplayClass4.b__1(对象发送状态)中
---内部异常堆栈跟踪的结束---
位于System.Net.Browser.AsyncHelper.BeginNoui(SendOrPostCallback beginMethod,对象状态)
位于System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
位于System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteTresponse(IAsyncResult结果)
---内部异常堆栈跟踪的结束---
在System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult结果)处
位于System.ServiceModel.Channels.ServiceChannel.EndCall(字符串操作,对象[]输出,IAsyncResult结果)
位于System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName,Object[]args,IAsyncResult结果)
在MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.ReportServiceClientChannel.EndUpdateReport(IAsyncResult结果)
位于MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.MyNamespaceSilverlight.Core.ReportServiceReference.IReportService.EndUpdateReport(IAsyncResult结果)
位于MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.OnEndUpdateReport(IAsyncResult结果)
在System.ServiceModel.ClientBase`1.OnAsyncCallCompleted处(IAsyncResult结果)

此处报告了一个类似的问题:这似乎与日志文件有关。

服务中是否有任何内容修改\bin目录的内容?当在ASP.NET下托管时,ASP.NET运行时将监视\bin目录中的任何更改,当看到更改时,它将尝试重新初始化应用程序,以便获取可能发生的任何更改

作为服务正常操作的一部分,您不应将任何内容写入\bin目录。通常,将日志文件配置为写入\bin目录而不是其自己的特定目录时会出现问题。如果出于任何原因无法将日志文件写入应用程序目录根目录之外的某个位置,只需将其写入\logs子目录,然后将ASP.NET配置为阻止对该目录的所有访问,如下所示:

<location path="logs">
    <system.web>
        <authorization>
            <deny users="*" />
        </authorization>
    </system.web>
</location>

看起来像System.Web中的一个bug。此处报告了相同的问题:


陪审团还没有出来,但我认为如果你把你的细节发布在网站上,你就有更好的机会解决这个问题

我们在测试WCF服务时收到了类似的错误,其中一名开发人员开始部署新版本的服务。

这是完整的堆栈跟踪吗?它感觉很短。它也不必只是日志文件,它可以是\bin文件夹中.dll的任何配置文件。是的,我在将日志写入bin目录中的日志文件夹时发现了一个问题。@JoelC确实如此。对我来说,在更改Web.config文件后立即尝试访问我的服务时会出现问题。保存文件和将其复制到bin目录之间似乎有一点延迟。链接当前不可用
System.ServiceModel.CommunicationException: 
[HttpWebRequest_WebException_RemoteServer]Arguments: NotFound
There was an error saving the report - The error object contained errors
System.ServiceModel.CommunicationException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer ---> System.Net.WebException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer ---> System.Net.WebException: [HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60129.0&File=System.Windows.dll&Key=HttpWebRequest_WebException_RemoteServer
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
   at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.ReportServiceClientChannel.EndUpdateReport(IAsyncResult result)
   at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.MyNamespaceSilverlight.Core.ReportServiceReference.IReportService.EndUpdateReport(IAsyncResult result)
   at MyNamespaceSilverlight.Core.ReportServiceReference.ReportServiceClient.OnEndUpdateReport(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
<location path="logs">
    <system.web>
        <authorization>
            <deny users="*" />
        </authorization>
    </system.web>
</location>