Hi,
I have a code that create ScriptMap named AboMapperCustom but the code needs IIS6 compatiability to be enabled. If it is disabled then I am getting a error which says "Cannot create script maps"
So now I am using this code
using (ServerManager serverManager = new ServerManager())
{
ConfigurationSection handlersSection = webConfig.GetSection("system.webServer/handlers");
ConfigurationElementCollection handlersCollection = handlersSection.GetCollection();
ConfigurationElement addElement = handlersCollection.CreateElement("add");
addElement["name"] = @"AboMapperCustom";
addElement["path"] = @"*.css";
addElement["verb"] = @"GET,HEAD,POST";
addElement["scriptProcessor"] = @"%windir%\Framework64\v4.0.30319\aspnet_isapi.dll";
addElement["resourceType"] = @"Either";
handlersCollection.AddAt(0, addElement);
serverManager.CommitChanges();
}
Now with this script map is getting added but in Asp.net app pool. I want in my custom app pool. How to do that?
Secondly with earlier code, it was adding AboMapperCustom-(number) with path as ".css". What is abomappercustom and how this can be added in iis7.
Note: I dont want IIS6 compatiability to be enabled.
Kindly help me in this.
Thanks