web.config urlmappings RRS feed

  • Question

  • User1510859543 posted

    We are using a urlMappings element in our web.config file and it works fine. My question is does the "url" setting have to point to an actual web page or not?  For example, in the section sample below does "~/misc/ReplySMS.aspx" actually have to exist as a physical page or will it thrown an error if it does not?

    	  <urlMappings enabled="true">
    		  <add url="~/misc/ReplySMS.aspx" mappedUrl="~/SMSReplyHandler.ashx" />

    Thursday, August 13, 2020 7:06 PM


All replies

  • User753101303 posted


    What if you just try? Or discuss directly what you tried and doesn't work if this is the case.

    I'm fairly sure this is not needed. A possible issue is to have to use https://www.luminowebdesign.no/tech-blogg/asp-net-routing-and-web-config-setting-runallmanagedmodulesforallrequests as this option is only for url processed by ASP.NET.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 13, 2020 7:39 PM
  • User1510859543 posted

    I guess I can create a test scenario as I didn't want to mess with a production system that sends this url to the web application. Is the urlMappings the best way to handle this? Like I said it has been working fine and I need to add a 2nd urlMappings entry. Thanks.

    Thursday, August 13, 2020 7:44 PM
  • User1510859543 posted

    Did a test after removing the page and it still worked. Thanks.

    Thursday, August 13, 2020 8:24 PM