locked
ASP.NET - Active Directory, Exchange and other questions. RRS feed

  • Question

  • User1350034420 posted

    Hi All

     We want to develop a web page in ASP.NET so our students can register their own accounts.  This is the process: -

    1. Create the user in Active Directory.
    2. Create a folder on our file server for the user.
    3. Create a share for the folder.
    4. Set a quota on the folder (our students are only allowed 20mb each).
    5. Create an exchange mailbox and set the mailbox to 10mb.

    Is this possible?  I've been reading various posts and there doesn't seem to be much information about.  The ways I can think of at the moment are 1) Do it from the webpage itself 2) Create a web page which talks to a web service which takes care of it all. 3) When a user fills in the form store it in our SQL DB and just have a VB.NET app running which looks at the DB and creates an account from there.

     If you could help me it would be much appreciated or if you know of any resources to help me get started cheers.  By the way we are running Windows 2003 and Exchange 2003.

    Thursday, July 24, 2008 4:07 AM

All replies

  • User1095185381 posted

    Well the first two are easy and the last one are definitely possible.

    1. If you can use .NET 3.5, you can use UserPrincipal from System.DirectoryServices.AccountManagement and if not, you can do it using DirectoryEntry in System.DirectoryServices.

    2. using System.IO.Directory.CreateDirectory() - the daft sods at Microsoft decided to call the things you put files in Directories in .NET despite years of referring to them as folders in Windows.  So, you get DIrectory and DirectoryInfo (folders) and DirectoryEntry and DirectorySearcher (ActiveDIrectory).  Doh!

    3. using P/Invoke: http://msdn.microsoft.com/en-us/library/bb525384(VS.85).aspx E.g. http://www.codeproject.com/KB/dotnet/pinvokeaddshare.aspx

    4. t looks like you have to do COM for the fourth with IDiskQuotaUser. (E.g. http://www.codeproject.com/KB/system/DiskQuota.aspx).

    5. http://forums.asp.net/p/969995/1400413.aspx

    Thursday, August 7, 2008 12:42 PM