File upload to a remote share not working.

  • Thread starter Thread starter rajesh
  • Start date Start date
R

rajesh

I am trying to upload a file using .Net's HttpPostedFile.SaveAs() to a share
on a remote server. It works fine when the share is on the same server. I
looked at the permissions on the share and they all seem to be set properly.
These permission setting are the same as what was used when we were
uploading the files using the old asp code.

Given below is the stack trace

Message:
Could not find a part of the path "\\Server01\Attachments$".

Source:
mscorlib

Stack Trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String
path)
at System.IO.Directory.CreateDirectory(String path)

Thank you
Rajesh
 
I had the same problem a week or two ago, the answer is impersonation vs.
delegation. That is why it works on the web server but not the remote share.
If you set your web site to basic authentication and have the user type in
domainname\username & password they should be able to upload and save files,
it just doesn't seem to work with windows authentication. Read the below
article.
Jared

http://msdn.microsoft.com/library/d...y/en-us/vsent7/html/vxconaspnetdelegation.asp
 
Thank you. That works.


Jared said:
I had the same problem a week or two ago, the answer is impersonation vs.
delegation. That is why it works on the web server but not the remote share.
If you set your web site to basic authentication and have the user type in
domainname\username & password they should be able to upload and save files,
it just doesn't seem to work with windows authentication. Read the below
article.
Jared

http://msdn.microsoft.com/library/d...y/en-us/vsent7/html/vxconaspnetdelegation.asp
 
Back
Top