views:

1931

answers:

2

Hi all:

How to download a file via web service ? And how the client application accept this? I write down the code as below in the client app, it throws an exception "Access Denied"

wsDownload.wsDownloadFile downFile = new wsDownload.wsDownloadFile();
byte[] file = downFile.DownloadFile(strFileName, "", "", "");
MemoryStream mStream = new MemoryStream(file);

any response is appreciated.

+1  A: 

"Access denied" probably just means the local web service user doesn't have read access to the local copy of the file.

Ron

Ron Savage
how to add read authority to local web service user?
+1  A: 

It's probably a matter of ntfs permissions on the service side. You should grant read permissions on the folder that contains the file you are downloading to the user account under which is running the WS, usually IIS_WPG.

Juanma