【问题标题】:UNC FileShare Authentication for WCF Web Service?WCF Web 服务的 UNC FileShare 身份验证?
【发布时间】:2013-01-31 06:02:55
【问题描述】:

我们有一个 WCF 服务,可以分别向 FileShare 上传和下载文档。

客户端应用程序将在请求中传递 FileShareLocation 和 FileName。 但是我们遇到了一些异常,无​​法得到响应。

FileSharePath 示例:\\SERVERIP\SHAREDFOLDER

注意:当我不使用网络文件共享时,该服务运行良好。

'. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

   at System.Net.HttpWebRequest.GetResponse()

   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   --- End of inner exception stack trace ---



Server stack trace: 

   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)

   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)



Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at wcfServiceTest.wcfService.ICommonService.UploadDocument(UploadDocumentRequest request)

   at wcfServiceTest.wcfService.CommonServiceClient.wcfServiceTest.wcfService.ICommonService.UploadDocument(UploadDocumentRequest request) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\Service References\wcfService\Reference.cs:line 2309

   at wcfServiceTest.wcfService.CommonServiceClient.UploadDocument(RequestHeader UploadDocumentReqHdr, Byte[]& UploadDocumentContent) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\Service References\wcfService\Reference.cs:line 2316

   at wcfServiceTest.frmMain.DocumentUpload_Click(Object sender, EventArgs e) in D:\Test\CMS\wcfServiceTest\wcfServiceTest\frmMain.cs:line 105

【问题讨论】:

  • 对不起,我很着急
  • 现在显示客户端错误。您的服务出现错误,调试或记录并分析它。

标签: c# wcf authentication .net-3.5


【解决方案1】:

自己解决。

  1. 在 IIS 中创建一个新的应用程序池
  2. 将 AppPool 的身份更改为有权访问 FileShare 的用户
  3. 将 WCF 服务应用程序池更改为新的应用程序池

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多