locked
context.server.execute(Any.ashx) RRS feed

  • Question

  • User-1701339200 posted

    hello there,

    I been messing around with ASP.net 2.0 and come across a strange issue. I am trying to implement a form of pipe managed MVC pattern in .net (bit like cocoon and/or struts) where you pass the output of one servlet (HttpHandler/aspx Page) and pass it onto the next for further processing.

    I got no problems with the design of ASP.net and the page oriented model, just thought I would see if Piped MVC could be achieved (Model being db/Business objects, View being html/aspx page/XML and Controller being a master HTTPHandler).

    I am trying to execute an ashx file using server.execute, I get an error. The method seems to take any object that uses the IHTTPHandler interface, but it seems not to like a good old basic IHTTPHandler objects.

    I read around the web a bit and came up with some statement where the underlying code only permits .aspx pages and not the home grown IHTTPHandler variety. Could someone explain the reason for this.

    I got the thing working with using basic aspx pages and I am happy with the outcome, however, I find implementing a proper Page (View) class to do some basic Text input output piping to be a bit of an overkill.

    Any help would be most appreciated.

    Tuesday, April 25, 2006 6:39 AM

All replies

  • User-2001980297 posted

    You problem seems like this thread: http://www.codecomments.com/archive289-2005-12-734501.html

    Hope it helps.

    Wednesday, April 26, 2006 12:30 AM
  • User-1701339200 posted

    Thanks, I did see that response, sort of left me thinking why?

     

    As said worked around it but don't understand why the MS bods have put the three lines of code in.

     

    rather hoping for a better explaination, as it makes no technical sense, why not just only accept page via the method, why provide the IHTTPHandler to be used?

     

     

    Wednesday, April 26, 2006 12:31 PM