Advertisement
gyrospring

✒ 0007.0038 VS2019 VB MVC5 Razor root web.config

Apr 18th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 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
  7.  
  8.  
  9.  
  10. /web.config
  11.  
  12.  
  13. Add requestPathInvalidCharacters="" to system.web.
  14.  
  15. This is what mine looked like.
  16.  
  17.  
  18. <system.web>
  19. <compilation debug="true" targetFramework="4.7.2"/>
  20. <httpRuntime targetFramework="4.7.2" requestPathInvalidCharacters=""/>
  21. </system.web>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement