Query password protected sites using IIS SEO Toolkit beta 2 available

Carlos from the IIS team announced the IIS SEO toolkit supports querying sites with Basic or Windows Authentication.  I was looking for support against Sharepoint and protected sites.    This tool hasn’t gotten enough press and is a original piece of software released by the IIS Team


http://forums.iis.net/t/1158486.aspx


Steve Schofield


Microsoft MVP – IIS

Control web.config inheritance with IIS 7, ASP.NET options

A person I work with was looking to control web.config inheritance in sub-folders within a website.   Through some research, asking on an geek mailing list, here is three options that came out.  Two are IIS based , one is using ASP.NET.  Hope this helps


Option #1 


Thanks to Robert McMurray for this one!


“You can set the enableConfigurationOverride attribute to false for an application pool. For example, we set that attribute to false for the FPSE application pool so if a bad web.config file is uploaded to a web site you can still upload an updated file through FPSE that will fix the problem.  I sometimes follow that paradigm for WebDAV-enabled sites – I’ll create a public www.foo.com site in an application pool with enableConfigurationOverride set to true and then I’ll create a private webdav.foo.com site in an application pool with enableConfigurationOverride set to false.”


See the attributes in the following URLs for more:
http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add
http://www.iis.net/ConfigReference/system.applicationHost/sites/site/application/virtualDirectory


Option #2 


Thanks to Mike Volodarsky for this tip.


“That can be accomplished by setting allowSubDirConfig=false in the application definition (applicationHost.config)”


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


Option #3 


Thanks Scott Forsyth for the reminder.  This is the option I’m most familar with using and works.  It’s a little tricky when you have asp.net 1.1 and 2.0 within the same website, for example, 2.0 at the root and 1.1 in a virtual directory.  You are better off using 1.1 at the root, 2.0 in a sub-folder if you are required to use such an architecture.   I’d suggest having separate websites and not mixing ASP.NET versions within the same website.


ASP.NET – Click the link for more information


inhertInChildApplications property



Cheers!


Steve Schofield
Microsoft MVP – IIS

Create Policies for Sharepoint and Powershell 1.0

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Sharepoint”)
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Sharepoint.Publishing”)


$SiteURL = “http://www.example.com
$site = new-object Microsoft.SharePoint.SPSite($siteURL)
$web = $site.OpenWeb()
$list = $web.Lists[“Cache Profiles”]
$newitem = $list.items.Add()
$newitem[“Title”]= “AnonCachePolicy”
$newitem[“Display Name”]= “AnonCachePolicy”
$newitem[“Display Description”]= “AnonCachePolicy”
$newitem[“Perform ACL Check”] = $false
$newitem[“Enabled”] = $true
$newitem[“Duration”] = 60
$newitem[“Check for Changes”] = $false
$newitem[“Vary by HTTP Header”] = “User-Agent”
$newitem[“Vary by User Rights”] = $false
$newitem[“Cacheability”] = “ServerAndPrivate”
$newitem[“Safe for Authenticated Use”] = $false
$newitem[“Allow writers to view cached content”] = $false
$newitem.update()


$anonID = ($list.items | where {$_.Name -eq “AnonCachePolicy”}).ID


$newitem = $list.items.Add()
$newitem[“Title”]= “AuthCachePolicy”
$newitem[“Display Name”]= “AuthCachePolicy”
$newitem[“Display Description”]= “AuthCachePolicy”
$newitem[“Perform ACL Check”] = $true
$newitem[“Enabled”] = $true
$newitem[“Duration”] = 60
$newitem[“Check for Changes”] = $true
$newitem[“Vary by HTTP Header”] = “HTTP_USER”
$newitem[“Vary by User Rights”] = $false
$newitem[“Cacheability”] = “ServerAndNoCache”
$newitem[“Safe for Authenticated Use”] = $true
$newitem[“Allow writers to view cached content”] = $false
$newitem.update()


$authID = ($list.items | where {$_.Name -eq “AuthCachePolicy”}).ID


$cacheSettings = new-object Microsoft.SharePoint.Publishing.SiteCacheSettingsWriter($site)
$cacheSettings.EnableCache = $true
$cacheSettings.ObjectCacheSize = 200
$cacheSettings.SetAnonymousPageCacheProfileId($site, $anonID)
$cacheSettings.SetAuthenticatedPageCacheProfileId($site, $authID)
$cacheSettings.Update()


$web.Dispose()
$site.Dispose()