Monday, March 17, 2008
Monday, March 3, 2008
create Virtual Directory using C#
Code to create Virtual Directory using C#
Private Sub CreateVirtualDir(ByVal WebSite As String, ByVal AppName As String, ByVal Path As String) Dim IISSchema As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/Schema/AppIsolated") Dim CanCreate As Boolean = Not IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN" IISSchema.Dispose() If CanCreate Then Dim PathCreated As Boolean Try Dim IISAdmin As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/W3SVC/1/Root") 'make sure folder exists If Not System.IO.Directory.Exists(Path) Then System.IO.Directory.CreateDirectory(Path) PathCreated = True End If 'If the virtual directory already exists then delete it For Each VD As System.DirectoryServices.DirectoryEntry In IISAdmin.Children If VD.Name = AppName Then IISAdmin.Invoke("Delete", New String() {VD.SchemaClassName, AppName}) IISAdmin.CommitChanges() Exit For End If Next VD 'Create and setup new virtual directory Dim VDir As System.DirectoryServices.DirectoryEntry = IISAdmin.Children.Add(AppName, "IIsWebVirtualDir") VDir.Properties("Path").Item(0) = Path VDir.Properties("AppFriendlyName").Item(0) = AppName VDir.Properties("EnableDirBrowsing").Item(0) = False VDir.Properties("AccessRead").Item(0) = True VDir.Properties("AccessExecute").Item(0) = True VDir.Properties("AccessWrite").Item(0) = False VDir.Properties("AccessScript").Item(0) = True VDir.Properties("AuthNTLM").Item(0) = True VDir.Properties("EnableDefaultDoc").Item(0) = True VDir.Properties("DefaultDoc").Item(0) = "default.htm,default.aspx,default.asp" VDir.Properties("AspEnableParentPaths").Item(0) = True VDir.CommitChanges() 'the following are acceptable params 'INPROC = 0 'OUTPROC = 1 'POOLED = 2 VDir.Invoke("AppCreate", 1) Catch Ex As Exception If PathCreated Then System.IO.Directory.Delete(Path) End If Throw Ex End Try End If End Sub
Friday, February 29, 2008
Tuesday, February 26, 2008
Microsoft .Net Collection
Monday, February 25, 2008
Friday, February 22, 2008
For C# related queries:
http://www.java2s.com/Code/CSharp/CatalogCSharp.htm
For Windows Update:
http://update.microsoft.com/windowsupdate/v6/default.aspx
http://darpg-grievance.nic.in/
--Link to get books online:- http://www.ebooksportal.org/
---Sort Using DAO http://search.technet.microsoft.com/search/default.aspx?siteId=1&tab=0&query=sort+property+of+DAO
http://www.workopia.com/Links.htm
To download E Books:
http://www.toebook.com/5-dfbe74899836f260.htm
For downloading .Net Framework.
http://msdn2.microsoft.com/en-us/netframework/aa569263.aspx
For Online Microsoft Product Information
For Online Books
ftp://ftp.uar.net/pub/e-books/
To watch movies online:
http://mydigitalshare.com/modules/myvideos/viewcat.php?cid=1&min=50&orderby=titleA&show=50
http://www.irani-chai.com/movies-online/english-movies/the-matrix-revolutions-english-movie-2003.html
http://www.irani-chai.com/movies-online/telugu-movies/boys-telugu-movie-2003.html
http://bollybuz.blogspot.com/2007/09/download-saawariya-movies-songs-music.html
To Get Free WebSiteTemplate
http://www.freelayouts.com/websites/html-templates?order=reviewed_on+desc
http://www.mastertemplates.com/download/free-template-087.htm