简体   繁体   English

如何在WCF服务上执行文件I / O?

[英]How do i perform File I/O on a WCF service?

How do I perform File I/O on a WCF service? 如何在WCF服务上执行文件I / O?

It seems to be working fine in the emulator because it doesn't give me an error, but when I deploy it onto the local IIS 7 it gives me this: 它在仿真器中似乎运行良好,因为它不会给我一个错误,但是当我将其部署到本地IIS 7上时,它会为我提供以下信息:

at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) 在System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(消息回复,MessageFault错误,字符串操作,MessageVersion版本,FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) 在System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime操作,ProxyRpc&rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 在System.ServiceModel.Channels.ServiceChannel.Call处(字符串操作,布尔单向,ProxyOperationRuntime操作,Object [] ins,Object [] outs,TimeSpan超时)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)

I am basically trying to generate XLS files using the service. 我基本上是试图使用该服务生成XLS文件。 Since I'm really new to WCF I don't know if the api I'm using is wrong. 由于我真的是WCF的新手,所以我不知道我使用的api是否错误。 I'm just using the file stream object to write the data. 我只是使用文件流对象来写入数据。 I think it has something to do with the location of the file I'm writing to but I can't find any tutorials on how to write data into files. 我认为这与我要写入的文件的位置有关,但是我找不到任何有关如何将数据写入文件的教程。

它对我有用,AP Poool必须具有写许可权,设置标识必须对创建xls文件的文件夹具有写许可权。

Please check your IIS App Pool Identity. 请检查您的IIS应用程序池标识。 The set identity must have write permissions on folder you are creating the xls files. 设置的标识必须对创建xls文件的文件夹具有写权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM