1

I have a Asp.net Application where i am attempting to save my files on a shared network drive.

 StrPath = HttpContext.Current.Server.MapPath(@"\\server\c\DTA\");

But i get an error unable to find path

What should be done is it possible to save files in a shared network drive

1 Answer 1

5

MapPath is used to map a virtual path of your webserver to a physical path on the hard drive. What you have is already a physical path, so you can just use it to create the file directly.

var fileStream = File.Create(@"\\server\c\DTA\");
...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.