誰かが私が抱えているこの悪夢に光を当てるのを手伝ってくれることを願っています...!
Apress の書籍を利用して、ASP.Net 電子商取引 Web サイトを完成させました。BalloonShop プロジェクト。ご存知の方もいらっしゃるかもしれません。
私が整理するのが見られない1つのニグルを除いて、すべてがうまくてダンディです!
Url に .aspx 拡張子がないページから asp.net ログイン コントロールを使用して、自分のサイトからログアウトできません。つまり、Departments、Category、および Products は、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 を使用していますが、これが原因である場合があることを読みました: AppPool バージョン。提案されているように、これを Classic ASP に変更しようとしましたが、うまくいきませんでした!
ローカル マシンでホストし、Intelligencia.UrlRewriter を使用する場合に、これが一般的な問題であるかどうかは誰にもわかりませんか? 共有 Web ホスティング サーバーでホストしている場合、これは問題にならないでしょうか?
私がまだこれ、特にこのサイズのプロジェクトにかなり慣れていないので、私が的外れである場合は、私の素朴さを許してください。
助けてくれてありがとう!!