("system.ftpServer/providerDefinitions", "MACHINE/WEBROOT/APPHOST"); var providerDefinitionsCollection = providerDefinitionsSection.Collection; var addElement = providerDefinitionsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "FtpXmlAuthentication"; addElement.Properties....
("system.webServer/httpErrors", "MACHINE/WEBROOT/APPHOST"); var httpErrorsCollection = httpErrorsSection.Collection; var errorElement = httpErrorsCollection.CreateNewElement("error"); errorElement.Properties.Item("statusCode").Value = 404; errorElement.Properties.Item("subStatusCode").Value = 5;...
i could tweak it a bit , to check if the request header contain X-Requested-With if (!request.Headers.Contains(new KeyValuePair<string, StringValues>("X-Requested-With", "XMLHttpRequest"))) { response.Redirect("/Account/Login"); } now it work fine Thursday, September 13, 2018 1:32...
("system.webServer/httpErrors","MACHINE/WEBROOT/APPHOST");varhttpErrorsCollection = httpErrorsSection.Collection;varerrorElement = httpErrorsCollection.CreateNewElement("error"); errorElement.Properties.Item("statusCode").Value =404; errorElement.Properties.Item("subStatusCode").Value =5; error...
("system.ftpServer/providerDefinitions", "MACHINE/WEBROOT/APPHOST"); var providerDefinitionsCollection = providerDefinitionsSection.Collection; var addElement = providerDefinitionsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "FtpXmlAuthentication"; addElement.Properties....
("system.ftpServer/providerDefinitions", "MACHINE/WEBROOT/APPHOST"); var providerDefinitionsCollection = providerDefinitionsSection.Collection; var addElement = providerDefinitionsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "FtpXmlAuthentication"; addElement.Properties....
("system.applicationHost/applicationPools", "MACHINE/WEBROOT/APPHOST"); var applicationPoolsCollection = applicationPoolsSection.Collection; var addElement = applicationPoolsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "Contoso"; var recyclingElement = addElement.Child...
("system.applicationHost/applicationPools", "MACHINE/WEBROOT/APPHOST"); var applicationPoolsCollection = applicationPoolsSection.Collection; var addElement = applicationPoolsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "Contoso"; var recyclingElement = addElement.Child...
("system.applicationHost/applicationPools", "MACHINE/WEBROOT/APPHOST"); var applicationPoolsCollection = applicationPoolsSection.Collection; var addElement = applicationPoolsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "Contoso"; var recyclingElement = addElement.Child...
("system.applicationHost/applicationPools", "MACHINE/WEBROOT/APPHOST"); var applicationPoolsCollection = applicationPoolsSection.Collection; var addElement = applicationPoolsCollection.CreateNewElement("add"); addElement.Properties.Item("name").Value = "Contoso"; var recyclingElement = addElement.Child...