Can dotnet write to files outside of the web root?

  • Thread starter Thread starter Shabam
  • Start date Start date
S

Shabam

I'm running Dotnet on Windows 2003 and was wondering, can scripts write to
files/folders outside of the webroot, for instance, in another drive?

How about writing to a network share via UNC? Is that possible? If so can
someone point me to documents that talk about this, or perhaps show me how
this can be done? Thanks!
 
Do you mean a web app user (who accesses the website through your ASP.NET
app) can or cannot write file to somewhere on the web server? Sure he can,
only if he is given the permission to do so. So, you need to decide who the
user would be, from the web server's point of view. If you let everyone who
uses your ASP.NET app become the Administrator on the web server, he can do
anything, including destorying the server, not to mention writing a file. By
default, a web app user is ALWAYS given minimun permission on the web
server, just enough to use the web applications.

You can learn more on ASP.NET security from .NET framework document.
 
Shabam said:
I'm running Dotnet on Windows 2003 and was wondering, can scripts write to
files/folders outside of the webroot, for instance, in another drive?
Yes.


How about writing to a network share via UNC? Is that possible? If so
can someone point me to documents that talk about this, or perhaps show me
how
this can be done? Thanks!

All you have to do is to give permission for the ASPNET user to write on
that directory.
 
Back
Top