I just moved to Vista with IIS7 from XP (IIS 6). Now, everything works fine except the handler is not working and it will throw a Visual Studio Just In Time debugger out.
The handler is just a simple image handler, which takes in an ID and then find in database and then return as content type of image.
wll6568
Member
54 Points
207 Posts
Cannot call to handler.ashx in Vista IIS7
May 09, 2009 02:42 PM|LINK
I just moved to Vista with IIS7 from XP (IIS 6). Now, everything works fine except the handler is not working and it will throw a Visual Studio Just In Time debugger out.
The handler is just a simple image handler, which takes in an ID and then find in database and then return as content type of image.
Is there something I am missing?
Lynxy
Member
14 Points
2 Posts
Re: Cannot call to handler.ashx in Vista IIS7
May 09, 2009 06:10 PM|LINK
wll6568
Member
54 Points
207 Posts
Re: Cannot call to handler.ashx in Vista IIS7
May 10, 2009 02:04 AM|LINK
I dont know why it's not working.
This is my handler:
namespace CoreApp{
public class WebPreviewHandler : IHttpHandler{
and then in web.config i have:
<
handlers> <remove name="WebServiceHandlerFactory-Integrated" /><
remove name="ScriptHandlerFactory" /> <remove name="ScriptHandlerFactoryAppServices" /><
remove name="ScriptResource" /> <add name="WebPreviewHandler" verb="*" path="*.ashx" type="CoreApp.WebPreviewHandler,CoreApp.dll" /><
add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /><
add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></
handlers>When I run the handler directly, it says:
Could not load file or assembly 'CoreApp.dll' or one of its dependencies. The system cannot find the file specified
sunilyadav16...
Participant
1955 Points
370 Posts
Re: Cannot call to handler.ashx in Vista IIS7
May 10, 2009 03:01 AM|LINK
Hi,
try adding entry in Machine.config file as ....
Regards,
Sunil
Follow me here
Lynxy
Member
14 Points
2 Posts
Re: Cannot call to handler.ashx in Vista IIS7
May 10, 2009 04:34 AM|LINK
Try these:
<httpHandlers>
<add verb="*" path="*.ashx" validate="false" type="CoreApp.WebPreviewHandler, CoreApp" />
</httpHandlers>
<handlers>
<add name="WebPreviewHandler" verb="*" path="*.ashx" type="CoreApp.WebPreviewHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
</handlers>
It's not an ASP.NET MVC application, is it?
wll6568
Member
54 Points
207 Posts
Re: Cannot call to handler.ashx in Vista IIS7
May 12, 2009 05:08 AM|LINK
Don't quite get it, this is what I have:
<handlers> "WebServiceHandlerFactory-Integrated"> "ScriptHandlerFactory"> "ScriptHandlerFactoryAppServices"> "ScriptResource"> "WebPreviewHandler" verb="*" path="*.ashx" type="CoreApp.WebPreviewHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"> "ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> "ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> "ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">