The following error will occur when you have a Colon (:) in your URL.
Error
IIS 10 ASP.NET Error Server Error in '/' Application. A potentially dangerous Request.Path value was detected from the client (:). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (:). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: [HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (:).] System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9941168 System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0
To use a colon in your IIS Website URL, you must have the URL Rewrite module installed on the IIS Server and running on the website.
The following code will allow your website to run with a colon.
Inside your web.config file, add the following. (Change the MainName to the name of your Structure. Example: Site.aspx?Main.aspx&Time=25:56&Page=My_Time MainName = Folder)
In the URL Rewrite, we can create a pattern that allows certain characters to be allowed in the URL The example below shows how to use the colon in the URL String. -:-
Copy
Search Site
Search Google
The full pattern is this. (This is what is used here on CFFCS.COM.) ([_0-9a-z-(-)-:-]+)
Copy
Search Site
Search Google
It is only used in the [Time] column. (This can be used throughout all columns and does not just have to be used in a designated column)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear /> <!-- At the top ONLY! -->
<rule name="MainName" stopProcessing="true">
<match url="MainName/([_0-9a-z-(-)-:-]+)/([_0-9a-z-(-)]+)" />
<action type="Rewrite" url="Site.aspx?Time={R:1}&Page={R:2}" appendQueryString="true" />
</rule>
<!-- Add all additional Rules here. All Rules must have their own <rule name>-->
</rules>
</rewrite>
</system.webServer>
</configuration>