Reputation: 26177
What kind of path would I use to save a file (.pdf) on another server/network drive?
Say I have rights to a network drive 'optamail1' and a folder there called datasheets. I can access this folder from "Run" using \\optamail1\datasheets\
, however, this kind of path will not work in my application. Has anyone tried doing this before?
Thanks, Nick
Upvotes: 0
Views: 3133
Reputation: 41
To save "report.pdf" at "\optamail1\datasheets\", you would just use the path "\optamail1\datasheets\report.pdf" as normal. You should enclose the save operation inside a try/catch and check for exceptions in case: the path doesn't exist, net is down/computer not accesible, or you don't have permission to write on that path.
Upvotes: 0
Reputation: 888047
You need to grant access to the network share to the user that the ASP.Net application is running as.
Upvotes: 5