Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have been using a .ashx Handler in my MVC project to render user images based on userid for much time, and Now I want to perform some other task using another handler. For that purpose added a new .ashx handler in root of my project.

But the problem is when even i tried to debug the application or use it , It is hitting the first handler only..

e.g.

I have twohandlers HandlerA.ashx & HandlerB.ashx

So I always get the hit on HandlerA.ashx even after doing localhost/MyApp/HandlerA.asxh OR localhost/MyApp/HandlerB.asxh

Is there any way to use multiple handlers by adding custom routes or something else.

Waiting for the guidance.

Cheers,


:)

What I have tried:

Have tried google and hit and try on some code chunks in routeconfig.cs :)
Posted
Updated 26-Oct-16 3:11am
v2

1 solution

The issue was due to copy/paste negligence as I created the second handler by copying the first one and missed to change the class name in the markup of newly created one.
And because of that It was hitting to the same handler. :(
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900