WCF service passing URI of a local file to a consuming application
I've got a WCF service that acts as a file store. Consuming applications running on the same LAN connect to the WCF service and download the files, usually as Stream objects.
However, I'm wondering if it's开发者_开发百科 possible for the WCF service to somehow return a URI to the file instead of a Stream/bytestream. The WCF service itself does not run inside an IIS, but rather as a Managed Windows Service and is not exposed to the internet. It is only accessible over a LAN.
There is SMB, AKA windows file sharing.
If what you want to do is share a file, then share a file...
Your scenario is useful when you require a different set of security and/or some interpretation of the data before it is sent. SQL Server has the FILESTREAM type which literally returns an NTFS stream that you can write to.
I think your issue will come down to your security. Provided you can setup a file share that has the same access levels as your app, there is no reason why you can't return a network path URI in your service.
精彩评论