.netframework 2.0でアプリケーションを作成し、3.5フレームワークで記述されたセキュリティプロジェクトで認証ハンドラーを使用しようとしています。また、IIS7を使用しています
アプリケーションのWeb.configには次のエントリがあります
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers accessPolicy="Read, Write, Script, Execute">
<add name="Pdfhandler" verb="*" path="/calderdale/*.pdf" type="NES.HiLo.Security.CalderDaleAuthenticationHandler, NES.HiLo.Security" preCondition="integratedMode" />
</handlers>
</system.webServer>
CalderDaleAuthenticationHandlerのコードは次のとおりです。
using System;
using System.Web;
namespace NES.HiLo.Security
{
public class CalderDaleAuthenticationHandler : IHttpHandler
{
/// <summary>
/// You will need to configure this handler in the web.config file of your
/// web and register it with IIS before being able to use it. For more information
/// see the following link: http://go.microsoft.com/?linkid=8101007
/// </summary>
#region IHttpHandler Members
public bool IsReusable
{
// Return false in case your Managed Handler cannot be reused for another request.
// Usually this would be false in case you have some state information preserved per request.
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
//var application = (HttpApplication)sender;
//var context = application.Context;
HttpRequest request = context.Request;
HttpResponse response = context.Response;
// Check if the user is authenticated
}
#endregion
}
}
私のアプリケーションには、calderdaleというフォルダー名があり、いくつかのpdfファイルがあります。以下のようなものを入力してPDFファイルにアクセスするとき。ブレークポイントを設定したハンドラーにコントロールが移動することを期待しています。コントロールがハンドラーに移動することはありません。助けていただければ幸いです。