2

我在我的 asp.net 项目中使用 url 路由,以下是我的产品页面路由。

RouteTable.Routes.MapPageRoute("product", "{language}/p/{type}/{no}/{product}", "~/Product.aspx", true);

预期结果如下。

http://xxxx.com/en/p/products/47.609.081.850.2720/yanmar-diesel-engine-720-hp-with-hydraulic-gear

它在开发级别工作,当我将项目部署到托管服务器时,它应该工作一段时间,但几个小时后,URI 会变成这样

http://xxxx.com/(A(6jqh8an0ygEkAAAANTMzMWU2NjgtYTBiNi00ZTQ5LTllZWEtNjI1MGM2MDk5MmY4T_ZQLz3eoy3LgKYYSl0Gk_Sts-A1))/en/p/products/47.609.081.850.2720/yanmar-diesel-engine-720-hpwith-hydraulic

IIS 将 Uri 放在 http 地址上,但我从不在 web.config 文件中使用 cookieless="UseCookies" 以外的东西。

Web.config 文件的相关部分:

<sessionState timeout="40" mode="InProc" cookieless="UseCookies" />
<anonymousIdentification enabled="true" cookieless="UseCookies"/>
<authentication mode="Forms">
      <forms name="XXXFirmCookie" cookieless="UseCookies"  loginUrl="~/LoginPage.aspx" path="/" protection="All" timeout="60" slidingExpiration="true" requireSSL="false" enableCrossAppRedirects="false" defaultUrl="Default.aspx"></forms>
    </authentication>

奇怪的是,它在主机服务器上工作了一段时间,而没有将 uri 放在 http 地址上。

主机服务器使用 IIS 7.5,框架为 4.0

你能在我的路由代码或 web.config 上看到任何错误吗?还是我应该在 IIS 上检查一些东西?

提前致谢..

4

0 回答 0