User1651711768 posted
Hi All, I am trying to make example of using HttpHandlers mentioned in following link work. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatinghttphandlers.asp However, I could not. I have: - created web application named
TestHandler on localhost at C:\DotNet Projects\TestWeb\TestHandler - registered ".MyHello" to C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll in IIS Application Configuration and "unchecked" "Check that file exists" With this settings while trying
to access "http://localhost/TestHandler/test.MyHello", I am expecting a page with "Hello from Synchronous custom handler." as mentioned in above article. However, I am getting an error page as follows:
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: File
or assembly name HelloWorldHandler, or one of its dependencies, was not found. Source Error: Line 2: <system.web> Line 3: <httpHandlers> Line 4: <add verb="*" path="*.MyHello" type="TestHandler.HelloWorldHandler,HelloWorldHandler" /> Line 5: </httpHandlers>
Line 6: </system.web> Source File: C:\DotNet Projects\TestWeb\TestHandler\web.config Line: 4 Assembly Load Trace: The following information can be helpful to determine why the assembly 'HelloWorldHandler' could not be loaded. === Pre-bind state information
=== LOG: DisplayName = HelloWorldHandler (Partial) LOG: Appbase = file:///C:/DotNet Projects/TestWeb/TestHandler LOG: Initial PrivatePath = bin Calling assembly : (Unknown). === LOG: Policy not being applied to reference at this time (private, custom, partial,
or location-based assembly bind). LOG: Post-policy reference: HelloWorldHandler LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testhandler/9a0582e2/7023dd67/HelloWorldHandler.DLL. LOG: Attempting
download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testhandler/9a0582e2/7023dd67/HelloWorldHandler/HelloWorldHandler.DLL. LOG: Attempting download of new URL file:///C:/DotNet Projects/TestWeb/TestHandler/bin/HelloWorldHandler.DLL.
LOG: Attempting download of new URL file:///C:/DotNet Projects/TestWeb/TestHandler/bin/HelloWorldHandler/HelloWorldHandler.DLL. LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testhandler/9a0582e2/7023dd67/HelloWorldHandler.EXE.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testhandler/9a0582e2/7023dd67/HelloWorldHandler/HelloWorldHandler.EXE. LOG: Attempting download of new URL file:///C:/DotNet Projects/TestWeb/TestHandler/bin/HelloWorldHandler.EXE.
LOG: Attempting download of new URL file:///C:/DotNet Projects/TestWeb/TestHandler/bin/HelloWorldHandler/HelloWorldHandler.EXE.Can anyone please help identifying what I am missing or doing wrong? Thanks.
User-1391363652 posted
If your module is in the TestHandler assembly I think your <httpModules> should be:
<add verb="*" path="*.MyHello" type="TestHandler.HelloWorldHandler,TestHandler" />
User1651711768 posted
It's now working, Thanks Milan. Initially, concentrated on LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).and overlookedLOG: Attempting download of new URL file:///C:/DotNet
Projects/TestWeb/TestHandler/bin/HelloWorldHandler.DLL.I had similar problem making it work on Windows XP Pro, however, I will give another try. Thanks again.