Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

IIS 7 Virtual Directory permissions

$
0
0

Hi,

I am using Visual Studio 2008, C#. I am trying to create Virtual Directory on Windows Server 2008. My function works fine - create a virtual directory on the user's local machine in FTP site. Inside function I have code:

DirectoryEntry Dir = new DirectoryEntry(Path);
.....
.....
// Create Virstual directory
objNewDirectory.Invoke("AppCreate", true);


// Assign property to Virtual directory
NewDirectory.Properties["EnableDirBrowsing"][0] =HasBrowseAccess;
NewDirectory.Properties["AccessExecute"][0] = HasExecuteAccess;
NewDirectory.Properties["AccessRead"][0] = HasReadAccess;
NewDirectory.Properties["AccessWrite"][0] = HasWriteAccess;
NewDirectory.Properties["AuthAnonymous"][0] = IsAnonymousAccessAllow;
NewDirectory.Properties["AuthBasic"][0] = IsBasicAuthenticationSet;
NewDirectory.Properties["AuthNTLM"][0] = IsNTLMAuthenticationSet;

It doesn't work in IIS7. Is it possible to create Virtual Directory and add this permissions programmatically? Can you please give me an example? Thanks.


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>