0

I have a problem where an external blog is incorrectly linking to the site. It's links are missing the "?" in the query string for a Google Analytics Campaign Source. This causes the .Net page to not display and error out.

Their links are missing the "?"

  www.example.com/seoFriendlyRoute&CS_002=123456&CS_010=[987654]

The problem is the &CS_002=123456&CS_010=[987654] without the ?.

I want the route to handle this so that it displays the page, ignores the garbage at the end (or better yet fixes it), and does not throw an error.

Can I do this with Route.Config?

Do I need to rewrite the URL? Hoping to avoid this.

I've contacted the blog to fix this, but I also want to future proof the page for other issues like this.

User970008
  • 1,135
  • 3
  • 20
  • 49

1 Answers1

0

Went with the answer from here: Getting "A potentially dangerous Request.Path value was detected from the client (&)"

<system.web>
    <httpRuntime requestPathInvalidCharacters="&lt;,&gt;,%,,:,\,?" />
</system.web>

and removed the & from blocked characters.

Community
  • 1
  • 1
User970008
  • 1,135
  • 3
  • 20
  • 49