Access a local file from ASP.NET Webcontrol
-
Hello i wrote a Webcontrol that tries to access a Textfile on the local hard drive (C:\news.txt) - but it does not work at all. Can anybody tell me how to get this work ?
-
Hello i wrote a Webcontrol that tries to access a Textfile on the local hard drive (C:\news.txt) - but it does not work at all. Can anybody tell me how to get this work ?
When you say "local hard drive", do you mean that of the web page user or that of the web server? If that of the user, you can't get it to work. There are good security reasons why you can't get it to work. Imagine a web page which could help itself to the hard drive. If the local drive is the web server, all you need to do is give it the absolute path and make sure user ASPNET has permission to access the file. Paul We all will feed the worms and trees
So don't be shy - Queens of the Stone Age, Mosquito Song -
When you say "local hard drive", do you mean that of the web page user or that of the web server? If that of the user, you can't get it to work. There are good security reasons why you can't get it to work. Imagine a web page which could help itself to the hard drive. If the local drive is the web server, all you need to do is give it the absolute path and make sure user ASPNET has permission to access the file. Paul We all will feed the worms and trees
So don't be shy - Queens of the Stone Age, Mosquito Song