[Mono-dev] Patch for HttpRuntime and HttpServerUtility to bring API in sync with .NET 2.0 SP2

Nick Berardi nberardi at zigamorph.com
Thu Sep 24 10:02:05 EDT 2009


Hi Marek,

I am a little hesitant to to implement this for Mono for the following
reasons.

*Number 1* is the description Microsoft provides for it
"Gets a value that indicates whether the current application is running *in
the integrated-pipeline mode of IIS 7.0*."

*Number 2* is that the key feature of the integrated-pipeline is that
outside processes still run through the .NET framework first, such as, you
can use IHttpModules to process request/response data from for example PHP
code, I don't know enough about Mono/XPS to get something like this
working.

Many developers use the UsingIntegratedPipeline flag to indicate if they are
running in IIS 7.0 integrated mode or the older "classic mode."  I really
feel that getting both the "classic mode" and integrated mode working under
Mono would be a huge undertaking, especially in regards to some of the built
in support for their Rewriter Module that they have added in to the .NET 2.0
SP2 framework.  Also because a number of sub-routines change in
ASP.NETdepending on this one flag.

I would like to commit the patch as is for now, to complete some of the
missing parts of the API, and I will look in to what it will take to really
get this supported in the Mono framework.

Thanks,
Nick

P.S. I know of a dozen places where having integrated mode turned on will
allow you to do things that you weren't allowed to before.  For example when
integrated mode is enabled you can directly add headers using *
HttpRequest.Headers.Add*, instead of getting an exception thrown.

On Thu, Sep 24, 2009 at 4:56 AM, Marek Habersack <grendel at twistedcode.net>wrote:

> Nick Berardi wrote:
>
>> Hello group,
>>
> Hello,
>
>  This is my first time submitting a patch.  So if anything I have done is
>> out of the norm, please let me know so that I can correct it.
>> There are two API's related to IIS 7.0 that were added as part of the .NET
>> 2.0 SP2 release that I need supported for an Open Source project that I work
>> on (http://urlrewriter.codeplex.com).  (
>> http://urlrewriter.codeplex.com/WorkItem/View.aspx?WorkItemId=7187)
>>
>> The patch that I am submitting is for the following APIs:
>>
>>    * HttpRuntime.UsingIntegratedPipeline { get; }
>>    *
>> HttpServerUtility.TransferRequest(string,[bool],[string],[NameValueCollection])
>>
>> Since both of these API's are IIS 7.0+ specific and that they require the
>> Integrated Pipeline to function.  I have the first property
>> UsingIntegratedPipeline always returning false, since it is currently
>> impossible to put Mono in to the core of IIS 7.0, so Integrated Pipeline
>>
> Technically Mono has always been using what IIS 7 calls "integrated
> pipeline" - there are no plans to make Mono run in the IIS core, so we
> should try to implement whatever functionality makes sense in Mono context
> without looking whether or not it works in this or that IIS mode. I'd say
> UsingIntegratedPipeline could return 'true' without harm.
>
>  can't currently be supported.  So I hoped to achieve the 2nd best option
>> of API completeness.  The second method TransferRequest relies on the
>> Integrated Pipeline so again it will not be supported.  So I have the method
>> just throwing the publically available exceptions shows on MSDN.  This
>> second method will always throw PlatformNotSupported, for API completeness
>> with the .NET 2.0 SP2 framework.
>>
> This method, as well, can be implemented to perform its function on Mono
> just fine. If you feel like giving it a try, I'd welcome a new patch which
> implements it. If not, I will accept the patch as it is now and implement
> the API fully at some point.
>
>  Please let me know what the next steps are or if there is anything that I
>> need to change in order to get this patch moved into production.
>>
>> Thanks,
>> Nick
>>
>
> best regards,
>
> marek
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090924/24211e41/attachment.html 


More information about the Mono-devel-list mailing list