User-373518479 posted
Hi All,
I am trying to get a specific site in a sitecollection and the code is failing me so far. Can you please show how?
I could get the default website using this:
Dim SvrMgr As New ServerManager
Dim s As SiteCollection = SvrMgr.Sites
Dim siteName As String = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName()
Dim siteIndex As Integer = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteID
Dim ss As Site = s.FirstOrDefault
Now, I want to get a specific site on IIS named as "Mywebsite.com". How can I do that?
Regards,
Ahmad