我希望有人可以帮助我在这个噩梦中,我有一些光... ...!ASP.Net登录控制将无法与Intelligencia.UrlRewriter
我刚刚在一本Apress书的帮助下完成了一个ASP.Net电子商务网站; BalloonShop项目,你们中的一些人可能已经知道了。
一切都很好,除了一个嘻嘻笑,我不能理清!
我无法使用任何网页中的asp.net登录控件从我的网站注销,而该网页在Url中没有.aspx扩展名。这就是;这些部门,类别和产品使用Intelligencia.UrlRewriter提供浏览器友好的URL。
我的URL被完全改写,但是当我尝试从正在使用的URL重写它不起作用页面注销,和我在错误日志电子邮件收到以下消息:
Exception generated on 22 February 2013, at 22:23
Page location: /Triple-x/Dynamo-p4/?
<div id=":143">ProductId=4
Message: The HTTP verb POST used to access path '/Triple-x/Dynamo-p4/' is not allowed.
Source: System.Web
Method: System.IAsyncResult BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
Stack Trace:
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt ep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</div>
在我的web.config如果有:
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,Intelligencia.UrlRewriter" />
</configSections>
<rewriter>
<!-- Rewrite department pages -->
<rewrite url="^.*-d([0-9]+)/?$" to="~/Catalog.aspx?DepartmentID=$1" processing="stop" />
<rewrite url="^.*-d([0-9]+)/page-([0-9]+)/?$" to="~/Catalog.aspx?DepartmentID=$1&Page=$2" processing="stop" />
<!-- Rewrite category pages -->
<rewrite url="^.*-d([0-9]+)/.*-c([0-9]+)/?$" to="~/Catalog.aspx?DepartmentId=$1&CategoryId=$2" processing="stop" />
<rewrite url="^.*-d([0-9]+)/.*-c([0-9]+)/page-([0-9]+)/?$" to="~/Catalog.aspx?DepartmentId=$1&CategoryId=$2&Page=$3" processing="stop" />
<!-- Rewrite product details pages -->
<rewrite url="^.*-p([0-9]+)/?$" to="~/Product.aspx?ProductId=$1" processing="stop" />
</rewriter>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
<remove name="ScriptModule" />
<!--<add name="ScriptModule" preCondition="managedHandler" />-->
</modules>
</system.webServer>
我也使用IIS7我的本地机器上,并已阅读,这有时会引起重:程序池版本。按照建议尝试将其更改为经典ASP,但这对我并不适用!
有谁知道这是在本地机器上托管并使用Intelligencia.UrlRewriter时是否存在常见问题?如果托管在共享的虚拟主机服务器上,这可能不会成为问题吗?
如果我远离了商标,请原谅我的天真,因为我对此还是比较陌生的,特别是这种尺寸的项目。
感谢您的帮助!
为什么不使用url生根而不是重写?它比url重写更容易和有用 – cagin 2013-02-24 17:44:12
???我不知道对你说实话? – 2013-02-24 17:46:52
我只是试图看看在冒险转向另一种方法之前是否可以做到这一点。 Url路由一个简单的过程来替代我已有的重写吗?谢谢。 – 2013-02-24 17:47:38