web-config

How to add rewrite rule to Azure web.config so that certain requests are not redirected?

冷暖自知 提交于 2021-02-10 16:19:50
问题 How to add a URL Rewrite rule so that requests from user agents – ReadyForRequest/1.0+(HealthCheck) & HealthCheck/1.0 are not redirected ? I need this so Azure app service health check can work. I found many SO posts about redirecting urls but I can't found SO posts for preventing redirection for certain requests. This post is to add answer to my previous post, but I only want to focus on the real problem because my previous post seems gained attention to the wrong topic. Thanks for any help

Web Config file for a codeigniter application

放肆的年华 提交于 2021-02-08 12:35:19
问题 I am suffering with a web config file that is not rewrite the url for my codeigniter application. here is the web config file. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Clean URL" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?{R:1}"

IIS / ASP.NET Ajax failed to load

╄→尐↘猪︶ㄣ 提交于 2021-02-08 11:55:32
问题 I have one project made a few weeks ago that is running perfectly and when i tried to copy the website to the final place it started showing this error. Uncaught SyntaxError: Unexpected token < ScriptResource.axd:3 Uncaught SyntaxError: Unexpected token < ScriptResource.axd:3 Uncaught Error: The structure of ASP.NET Ajax client failed to load. VM5538 home:47 Uncaught SyntaxError: Unexpected token < ScriptResource.axd:3 Uncaught ReferenceError: Sys is not defined The thing is, i only get this

How avoid *.<Environment>.config transformations being deployed on server

孤人 提交于 2021-02-07 14:54:56
问题 I'm using VSTS to deploy at several environments. And as usual, some parameters on config files need to be different depending the environment, hence I will use config transformations to deploy it at the target environment. Since I want to have the package with both the config and the transform that will be applied later I set the Build Action as Content as such: <Content Include="App_Config\MyConfig.config" /> <Compile Include="App_Config\MyConfig.prod.config"> <DependentUpon>MyConfig.config

How can I modify HTTP headers in ASP.NET (Web Forms) that are defined in web.config

孤者浪人 提交于 2021-02-07 14:22:54
问题 I have some custom HTTP response headers defined in an ASP.NET (Web Forms) website's web.config. I'm trying to write a managed HTTP module that can modify these web.config defined headers before they're sent back to the client. Unfortunately, whatever event I use (PreSendRequestHeaders, EndRequest) , the headers defined in web.config do not exist in the Response.Headers collection. I'm aware that PreSendRequestHeaders is not recommended so I also tried using Response.AddOnSendingHeaders but

Authorization Asp.net web.config

…衆ロ難τιáo~ 提交于 2021-02-07 11:52:08
问题 I have an application that has a backoffice. This backoffice was isolated with the use of roles like this: <location path="backoffice"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location> But now we have another type of role that needs access. The companyadmin role. Can I just say?: <location path="backoffice"> <system.web> <authorization> <allow roles="admin,companyadmin"/> <deny users="*"/> </authorization> </system.web> <

IIS document root in subfolder

旧城冷巷雨未停 提交于 2021-02-07 09:16:13
问题 Hey, I have a PHP Windows Azure project but I am new to IIS. I have my PHP libs in root folder and client files like index.php, style sheets or javascripts in a subfolder called document_root. How can I set up IIS 7 (probably using Web.config) to use the document_root as the default folder for the site (making the root invisible) so i can call mydomain.tld/ instead of mydomain.tld/document_root/ I have used: <defaultDocument> <files> <clear /> <add value="document_root/index.php" /> </files>

IIS document root in subfolder

南笙酒味 提交于 2021-02-07 09:14:18
问题 Hey, I have a PHP Windows Azure project but I am new to IIS. I have my PHP libs in root folder and client files like index.php, style sheets or javascripts in a subfolder called document_root. How can I set up IIS 7 (probably using Web.config) to use the document_root as the default folder for the site (making the root invisible) so i can call mydomain.tld/ instead of mydomain.tld/document_root/ I have used: <defaultDocument> <files> <clear /> <add value="document_root/index.php" /> </files>

Having classic ASP read in a key from appsettings in a web.config file

别说谁变了你拦得住时间么 提交于 2021-02-07 08:46:14
问题 OK so here's the situation. I've got a classic ASP website running inside an MVC 4 application. I need the classic ASP website to be able to get a key from the appsettings section of the web.config file. Here is the function I've got: ' Imports a site string from an xml file (usually web.config) Function ImportMySite(webConfig, attrName, reformatMSN) Dim oXML, oNode, oChild, oAttr, dsn Set oXML=Server.CreateObject("Microsoft.XMLDOM") oXML.Async = "false" oXML.Load(Server.MapPath(webConfig))

Having classic ASP read in a key from appsettings in a web.config file

丶灬走出姿态 提交于 2021-02-07 08:44:46
问题 OK so here's the situation. I've got a classic ASP website running inside an MVC 4 application. I need the classic ASP website to be able to get a key from the appsettings section of the web.config file. Here is the function I've got: ' Imports a site string from an xml file (usually web.config) Function ImportMySite(webConfig, attrName, reformatMSN) Dim oXML, oNode, oChild, oAttr, dsn Set oXML=Server.CreateObject("Microsoft.XMLDOM") oXML.Async = "false" oXML.Load(Server.MapPath(webConfig))