a

>>Bugs>> [Workaround documented by 1.3.14] IIS7 URL Rewriter causing trouble?
Pages: 1   reply
Author [Workaround documented by 1.3.14] IIS7 URL Rewriter causing trouble?
guest
Total Posts:
IIS7 URL Rewriter causing trouble?
4/9/2009 5:55:27 PM
I'm still working on detailed repro steps, but our app is big enough that it's not easy.  We use the IIS7 URL rewriter to manage "virtual" page names down to a few actual aspx pages.  This (or something else) is confusing the uploads such that I get "resource not available" (404) whenever posting.  I'm stepping through the NeatUpload code and not having any luck when the subworker tries to read data from the client.  Not sure if this is why it's all busted.

 
Dean Brettle
Total Posts: 2015
Re: IIS7 URL Rewriter causing trouble?
4/9/2009 7:25:33 PM
Does it help to move the UploadHttpModule to be the first module listed in configuration/system.web/httpModules and configuration/system.webServer/modules?

--Dean

 
guest
Total Posts:
Re: IIS7 URL Rewriter causing trouble?
4/9/2009 9:48:13 PM
No, no change.  I don't quite understand the purpose of the child request, is it to read bit by bit rather than all at once?  If that's the case, there's on very curious thing...  When I stop in the debugger on beginrequest, the Files collection is already filled out on the Request object (I suppose the debugger could've done this while looking at it, all Heisenberg style).

 
guest
Total Posts:
Re: IIS7 URL Rewriter causing trouble?
4/9/2009 11:08:48 PM
I think I get it now.  So our app has a module in it that calls HttpContext.RewritePath.  The problem is that does this:

IIS7WorkerRequest request = this._wr as IIS7WorkerRequest;
if
(request != null)
{
request.RewriteNotifyPipeline(this._path.VirtualPathString, newQueryString, rebaseClientPath);
}

Of course, the DecoratedWorkerRequest is NOT an IIS7WorkerRequest, meaning this will fail.  So is all lost?  The big question is can we safely "undo" the replacement of _wr at some point?  I assume the mode here is that you don't return the page until the upload has completed.  So once the upload is done couldn't _wr be put back the way it was?

 
Dean Brettle
Total Posts: 2015
Re: IIS7 URL Rewriter causing trouble?
4/10/2009 12:35:45 AM
If the rewrite module needs an IIS7WorkerRequest, it might work if it is added before the UploadHttpModule.  Did you try that?

As for undoing the _wr replacement, I'm not sure where that could be done that would allow all modules the access that they need to the request.  In other words, it might work but I'm concerned that it might cause unforeseen problems.

Can you email me (dean at brettle dot com) a small test app (including the source code for the rewrite module if possible) so that I can reproduce the problem here and look at other workarounds?  Post here after you email it so I can make sure it doesn't get eaten by an anti-virus filter or something similar.

Thanks,

--Dean

 
Pages: 1   reply
a