Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# URL路由仅在本地主机中有效_C#_Asp.net_Url Routing - Fatal编程技术网

C# URL路由仅在本地主机中有效

C# URL路由仅在本地主机中有效,c#,asp.net,url-routing,C#,Asp.net,Url Routing,我使用URL路由,我的URL在本地工作,就像这样 http://localhost:1545/ActivateUser/speu2mzi+TcVsO3NCQZtWAFX2lWecxotSfAOXu/1TEQ= 但它在另一台主机上不起作用 http://demo.callcenter.com/ActivateUser/speu2mzi+TcVsO3NCQZtWAFX2lWecxotSfAOXu/1TEQ= 我的global.asax文件: RouteTable.Routes.MapPageRo

我使用URL路由,我的URL在本地工作,就像这样

http://localhost:1545/ActivateUser/speu2mzi+TcVsO3NCQZtWAFX2lWecxotSfAOXu/1TEQ=
但它在另一台主机上不起作用

http://demo.callcenter.com/ActivateUser/speu2mzi+TcVsO3NCQZtWAFX2lWecxotSfAOXu/1TEQ=
我的
global.asax
文件:

RouteTable.Routes.MapPageRoute("ActivateUser", "ActivateUser/{*code}", "~/Presentation/Site/ActivateUser.aspx");
有人知道问题出在哪里吗?

来自

1) 需要在URL中使用“+”字符的应用程序 path可以通过设置allowDoubleEscaping来禁用此验证 属性,该属性位于system.webServer/security/requestFiltering中 应用程序的web.config中的配置部分。但是, 可能使您的应用程序更容易受到恶意URL的攻击:


您得到的是404(而不是500)?它会产生404错误。当我删除“+”字符时,它会再次工作。
<system.webServer>
    <security>
            <requestFiltering allowDoubleEscaping="true" />
    </security>
</system.webServer>