2

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.

2 Answers 2

1

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

Ron

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.