Web.config error when saving an Event Rule

If you are saving an event rule and you receive this error

The error message

Server Error in '/' Application.
Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could. however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines. please create a <customErrors> tag within a "web.config- configuration file located in the root directory of the current web application. This <customErrors> tag should then have its -mode- attribute set to "Off.

<!-- Web.Config Configuration File -->
<configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->
<configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.hteh </system.web> </configuration>

How to Fix

1. Find the Web.config file of your IIS configuration in GpsGateServer installation.
By default it is found here: c:\GpsGateServer\IIS\web.config

2. Open the web.config file using a text editor, for example, Notepad.

3. Find this section:

  <system.web>
    <httpModules>
      <add type="Franson.HttpModules.UrlRewriter" name="UrlRewriter" />
      <add type="Franson.Web.GZipHttpModule" name="GZipHttpModule" />
    </httpModules>
  </system.web>

Note: the <system.web> section might not look exactly as in this example.

4. Within the <system.web> section add:

  <httpRuntime requestValidationMode="2.0"/>

 

The whole section should look like this now:

  <system.web>
    <httpModules>
      <add type="Franson.HttpModules.UrlRewriter" name="UrlRewriter" />
      <add type="Franson.Web.GZipHttpModule" name="GZipHttpModule" />
    </httpModules>
    <httpRuntime requestValidationMode="2.0"/>
  </system.web>

5. Save the file.