문제

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

도움이 되었습니까?

해결책

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\");
...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top