Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

allowdoubleescaping = "true" in IIS Express Config Not Working

I get HTTP Error 404.11 - Not Found The request filtering module is configured to deny a request that contains a double escape sequence. Error when I send a request to a .razor page in Blazor, The link is dynamically built and sent to users email:

string confirmationLink = $"{HttpContext.Request.Scheme}://{Request.Host}/account/confirmemail/{System.Web.HttpUtility.UrlEncode(user.Id)}/{System.Web.HttpUtility.UrlEncode(confirmationToken)}";

I modified the IIS Express config files in five places:

  • web.config in "C:\Windows\System32\inetsrv"
  • applicationhost.config in "C:\Program Files\IIS Express\AppServer"
  • applicationhost.config in "C:\Program Files\IIS Express\config\templates\PersonalWebServer"
  • applicationhost.config in "C:\Program Files (x86)\IISExpress\AppServer"
  • applicationhost.config in "C:\Program Files(x86)\IIS Express\config\templates\PersonalWebServer"

In all cases I modified the

<requestFiltering allowDoubleEscaping="true">

tag in "web.server" "security" section. But I still get the error. Is there any solution to this?

like image 919
mz1378 Avatar asked Jun 05 '19 14:06

mz1378


People also ask

Does IIS Express use web config?

Does IIS Express use the same configuration system as IIS? Yes, IIS Express uses the same applicationhost. config and web.

Where is the IIS Express config file?

This can be the configuration file for the Visual Studio solution (located in the “. vs” directory of the solution), or the global IIS Express configuration file (located under “C:\Users\<User>\Documents\IISExpress\config”).


1 Answers

This worked for me...

  1. To find the applicationhost.config file for IISExpress I looked for the IIS Express icon in the system tray (lower right corner of Windows 10).
  2. I right-clicked on the IIS Express icon and clicked "Show All Applications".
  3. From the list of Running Applications I clicked on the Site Name whose config file I wanted to modify.
  4. Once the site name was clicked the word Config: appeared below.
  5. I clicked on the path to the right of Config: This opened the applicationhost.config file in Visual Studio.
  6. There I clicked Ctrl-F and searched for <requestFiltering> which I changed to <requestFiltering allowDoubleEscaping="true">
like image 67
DeveloperDan Avatar answered Sep 27 '22 17:09

DeveloperDan