k10n
Jim Klopfenstein's Radio Weblog

 

 

 

 

  Thursday, October 24, 2002

Executing ASMX files without a web server


Something Don Box posted yesterday in his blog reminded me of an investigation I made this summer that I never wrote about.

My goal was to create a black box that would take a SOAP message as input and return the resulting SOAP message as output using the .NET framework. This was right after I created the program I wrote about in Executing ASPX pages without a web server.

I didn't think this would be too difficult, but it was. I made one false start after another.  Every time I thought I had it figured out, I'd discover that something I needed to call was marked "internal" to one or another HTTP assembly.

The solution I finally came up with drags in a good bit of the HTTP infrastructure, but without any dependence on the presence of a network or of IIS. My code extends SimpleWorkerRequest and feeds ASP.NET the information it needs just like a web server would, information like the HTTP method ("POST"), the SOAPAction header, and the entity body.

Don's blog item (on SOAP and BEEP) makes me think that there should be a cleaner, more elegant way, but if there is, I didn't find it. He does unintentionally throw me a little sop, writing that "On the server side, it's a bit tougher to break out of HTTP unless you're willing to host ASP.NET behind a different protocol (which is supported if not terribly obvious)."

2:49:57 PM    


Click here to visit the Radio UserLand website. © Copyright 2003 Jim Klopfenstein.
Last update: 3/14/2003; 11:42:03 AM.

October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov




Subscribe to "k10n" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.