I dont see a reason why the filter couldnt run during the preloading process, but this is not something we can change at this point in the product cycle ... may make a good feature request for the next release.
Is there anything I need to do to formally make that feature request?
FYI, being able to use Request.Filter would have the additional advantage of working in a medium trust environment. Right now, upload components need to get the current HttpWorkerRequest but that is not permitted under medium trust. The only workaround is
to install in the GAC.
mvolo
At this point, I dont see any other way other then private reflection (I havent thought about exactly how),
Actually, this points to a fix that you might be more willing to make at this stage. Can you add:
public virtual void SetEntityBody(byte[] body)
{
throw new NotSupportedException();
}
to HttpWorkerRequest and then override that in ISAPIWorkerRequest to do what you see happening via private reflection above?
mvolo
or going with a native module.
Correct me if I'm wrong, but wouldn't such a module need to be installed at the server level, instead of the website level? If so, it's probably a non-starter for me, since many of my users are using shared hosting. Not to mention the fact that it would
require a major rewrite of my code and maintaining multiple versions... :)
mvolo
Let me investigate if restoring ProcessRequest's functionality is something that is feasible, and get back to you.
Velodoc is a platform to publish, share, send and transfer large files. Velodoc XP is the open source core. It includes an Http module for uploads and server controls based on ASP.NET Ajax Extensions 1.0.
Thanks for the links (and for making your code open source!). Unfortunately, like all other upload modules I'm aware of, Velodoc's UploadHttpModule (specifically UploadHttpModule.RedirectFilteredRequest()) handles uploads by using reflection to change private
member variables of the underlying HttpWorkerRequest or HttpRequest. As Mike said above, "I cannot recommend anything that requires private reflection of [MS's] classes". Since those fields are not part of the API, they could theoretically change at anytime,
even in a security update. Also, they are only available on particular hosting platforms. For example, Velodoc's reflection code handles Integrated Pipeline Mode as a special case.
BTW, I'm not trying to put down Velodoc. It looks like it supports Integrated Pipeline Mode in the only way that is currently possible. My point is that such an implementation should not be necessary, and would not be necessary if MS supported child requests
in Integrated Pipeline Mode.
Not sure someone will ever read this as I'm resurrecting an old thread but I'm currently attempting something similar.
It seems that passing Request.Filter in a custom filter constructor works even if it is not used (prevents the "filter not valid" exception). Also we have (now ?) Request.GetBufferlessInputStream. I don't have yet a clear idea about how to proceed but I'm
thinking about something like copying Request.GetBufferlessInputStream to my own stream to force the upload and track progress and resetting the stream at the beginning so that it could be parsed...
I really don't overestimate my chance of success but at least I won't regret to have not tried ;-)
brettle
8 Posts
Re: Are child requests supported in Integrated Pipeline Mode?
Jul 13, 2007 06:08 PM|LINK
Is there anything I need to do to formally make that feature request?
FYI, being able to use Request.Filter would have the additional advantage of working in a medium trust environment. Right now, upload components need to get the current HttpWorkerRequest but that is not permitted under medium trust. The only workaround is to install in the GAC.
Here is an example (from here):
Actually, this points to a fix that you might be more willing to make at this stage. Can you add:
public virtual void SetEntityBody(byte[] body)
{
throw new NotSupportedException();
}
to HttpWorkerRequest and then override that in ISAPIWorkerRequest to do what you see happening via private reflection above?
Correct me if I'm wrong, but wouldn't such a module need to be installed at the server level, instead of the website level? If so, it's probably a non-starter for me, since many of my users are using shared hosting. Not to mention the fact that it would require a major rewrite of my code and maintaining multiple versions... :)
Thanks!
--Dean
brettle
8 Posts
Re: Are child requests supported in Integrated Pipeline Mode?
Nov 03, 2007 03:48 AM|LINK
Any news on this?
FWIW, I just created a bug report on connect.microsoft.com for this issue so that it doesn't get forgotten:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=308352
--Dean
jlchereau
1 Post
Re: Are child requests supported in Integrated Pipeline Mode?
Nov 24, 2007 09:32 AM|LINK
Hello Dean,
Maybe you will want to look at the source code published at http://www.codeplex.com/VelodocXP.
Velodoc is a platform to publish, share, send and transfer large files. Velodoc XP is the open source core. It includes an Http module for uploads and server controls based on ASP.NET Ajax Extensions 1.0.
It can be tried online at http://www.velodoc.net.
Regards,
Jack.
Ajax IIS 7.0 Integrated Pipeline Mode C# ASP.NET Upload Http Module
brettle
8 Posts
Re: Are child requests supported in Integrated Pipeline Mode?
Nov 24, 2007 03:52 PM|LINK
Hi Jack,
Thanks for the links (and for making your code open source!). Unfortunately, like all other upload modules I'm aware of, Velodoc's UploadHttpModule (specifically UploadHttpModule.RedirectFilteredRequest()) handles uploads by using reflection to change private member variables of the underlying HttpWorkerRequest or HttpRequest. As Mike said above, "I cannot recommend anything that requires private reflection of [MS's] classes". Since those fields are not part of the API, they could theoretically change at anytime, even in a security update. Also, they are only available on particular hosting platforms. For example, Velodoc's reflection code handles Integrated Pipeline Mode as a special case.
BTW, I'm not trying to put down Velodoc. It looks like it supports Integrated Pipeline Mode in the only way that is currently possible. My point is that such an implementation should not be necessary, and would not be necessary if MS supported child requests in Integrated Pipeline Mode.
--Dean
PatriceSc
1 Post
Re: Are child requests supported in Integrated Pipeline Mode?
Aug 01, 2010 10:17 PM|LINK
Hi,
Not sure someone will ever read this as I'm resurrecting an old thread but I'm currently attempting something similar.
It seems that passing Request.Filter in a custom filter constructor works even if it is not used (prevents the "filter not valid" exception). Also we have (now ?) Request.GetBufferlessInputStream. I don't have yet a clear idea about how to proceed but I'm thinking about something like copying Request.GetBufferlessInputStream to my own stream to force the upload and track progress and resetting the stream at the beginning so that it could be parsed...
I really don't overestimate my chance of success but at least I won't regret to have not tried ;-)
clear