Can I create a folder that can be written to Medium Trust?

My web application writes several folders (logs, downloads, etc.), and I always set these permissions manually through my hosting provider.

I would like to create an installation script that does this on new installations. Is this possible under average trust?

I can’t even call File.GetAccessControl, not to mention File.SetAccessControl, but I don’t need such a "big hammer". I just want to do what ISP (in this case GoDaddy) allows me to do through the management console.

I believe that PHP can do this, and I would like to consider the PHP page for this purpose, if possible.

+5
source share
2 answers

Well, assuming that you are using IIS and asp.net in the usual way, you should have an asp.net account under which the framework runs your application on your behalf.

The web application runs under one account, and through authentication users programmatically provides access to what your "main account" performs on their behalf.

Think about something like this ....

Asp.net downloads your application (asp account) User connects (iuser account) User logs in (depending on the account used, there may be auth windows or auth, ect forms)

A user asks to do something using your displayed web pages under their accounts ...

asp.net , (asp.net acount) , asp.net ( asp.net)

... asp.net, , .

... IIS /.

, ... .

roleprovider , , ActiveDirectoryRoleProvider ActiveDirectoryMembershipProvider, AD DB asp.net.

, .

+2

% Windir%\Microsoft.NET\Framework {Version}\

. http://msdn.microsoft.com/en-us/library/ms998341.aspx

0

All Articles