What worked for me was changing:
<% @ WebHandler language="C#" class="AlarmHandler" codebehind="AlarmHandler.ashx.cs" %>
To:
<% @ WebHandler language="C#" class="Namespace.AlarmHandler" codebehind="AlarmHandler.ashx.cs" %>
Where Namespace is the namespace in which the AlarmHandler declared.
With that in mind, I think that changing the registration of the handler on this might be a good idea:
<add name="AlarmHandler" path="*.ashx" verb="*" type="Namespace.AlarmHandler" />
As an aside, I often used HTTP handlers and never bothered to register them (in my case, I usually call them explicitly through Ajax), so this line may not even be necessary.
Edit:
In this case, you are not using Visual Studio, which is slightly different from the fact that you will not have a bin directory, so we will have to do something different with the handler.
Your handler is currently split into an ASHX and CS file. This is usually normal, but in your case we will need to combine them.
This should be the contents of your Alarms.ashx file (you no longer need the AlarmHandler.ashx.cs file):
<% @ WebHandler language="C#" class="AlarmHandler" %> using System.Web; public class AlarmHandler : IHttpHandler {
As a third-party guide that you followed, it was almost certainly assumed that you were using Visual Studio, which might explain some of the difficulties you encountered.
source share