Advertisement
gyrospring

✒ 0007.0011 VS2017 VB MVC5 Razor root web.config

Mar 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. There is a setting that needs to be set in order for addresses (URIs) with special characters to not crash the application. I'm not sure why this happens or if it even still happens today, in my experience certain special characters in a URI, I think it was in a search request, caused the application to crash. To fix this, I utilized something called RequestPathInvalidCharacters
  2.  
  3.  
  4. Microsoft Pointer
  5.  
  6. https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.requestpathinvalidcharacters?redirectedfrom=MSDN&view=netframework-4.7.2#System_Web_Configuration_HttpRuntimeSection_RequestPathInvalidCharacters
  7.  
  8.  
  9.  
  10. /web.config
  11.  
  12.  
  13. Added requestPathInvalidCharacters="" to system.web.
  14.  
  15. This is what mine looked like.
  16.  
  17. <system.web>
  18. <httpRuntime targetFramework="4.6.1" requestPathInvalidCharacters="" />
  19. </system.web>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement