I want to create a simple web service to distribute to ASP.Net developers. I found an application (SvnBridge) which has the layout I’m after – a single web.config file and a single .dll file.
The interesting part is in the web.config file:
<httpHandlers>
<clear/>
<add verb="*" path="*" type="SvnBridgeServer.SvnBridgeHttpHandler, SvnBridgeServer" />
</httpHandlers>
Ooooo that looks perfect. I can throw anything I like at this and have it handled by what I presume is an IHttpHandler implementation.
So I ripped off the spirit of the afore-linked config file, bundled my library into a DLL and hit build in VS. I immediately get this in IE:
Source Error:
[No relevant source lines]
I mainly work with PHP – ASP.Net is quite new to me. Clearly I’m doing something wrong, but I haven’t a clue where even to start.
At the moment, I use a Python script to bundle all the C# source into a single .ashx file, which is kinda cool for distribution, but makes debugging a nightmare. It looks a bit like this:
<%@ WebHandler Language="C#" Class="MyApp.MyClass" debug="true" %>
using System.Data;
...
namespace MyApp
{
public class MyClass : IHttpHandler
{
public void ProcessRequest(HttpContext Http)
{
...
}
}
}
There’s obviously a lot more to it (user config area etc), but you get the gist.
Can someone point me in the right direction? I’m comfortable with the C# language, it’s just the arrangement and configuration that has me a bit stumped.
I realise this question may seem somewhat ambiguous – please post comments and I’ll try to clarify where necessary.
Thanks,
Neil.
This is fixed. I had to turn the folder into an application in IIS, and move the source to a trusted (non-network) location.
My gratitude for those who took the time to review this question.