Re: BUG? With A HTTPModule
johndoe_at_driver.net
Date: 04/02/04
- Next message: johndoe_at_driver.net: "Re: How can I run asp.net in other computers...."
- Previous message: John: "Repost: Allow certain area of a treeview webcontrol to post"
- In reply to: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Next in thread: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Reply: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Apr 2004 06:10:49 -0600
I have tried that and it has ended up with the same results.
Below is the code I am using to attempt to avoid this from happening but if
a user were to spoof it and access the one page without any properties it
404's
string TmpMode = UrlSegments[1].Replace(".aspx","").ToLower();
NewUrl.Append("Payment/ShoppingCart.aspx"). Append("?mode=").
Append(TmpMode);
if (TmpMode=="addtocart")
{
if (context.Request.QueryString["ItemCode"]!=null) {
NewUrl.Append("&ItemCode=").
Append(context.Request.QueryString["ItemCode"]); }
if (context.Request.QueryString["ItemQuantity"]!=null) {
NewUrl.Append("&ItemQuantity=").
Append(context.Request.QueryString["ItemQuantity"]); }
}
the If statement is for all the other pages that are accessed that do not
have variables however if they are addingtocart and they dont specify any
values it will 404 as expected. I am currentlyl going to live with it and
then monitor how many people actually access it without the variables. it
"should" be none but you never know with people ;)
As far as i can tell I am as stumped as everybody. The Project is going to
go live in the next week or 2 at which point i should be able to see if the
problem also happens on a Windows 2003 Server. If the problem persists on
Windows 2003 server also and the overall deployment goes smoothly i will
look at finding time to submit a PSS ticket to figure out why this happens.
"Steven Cheng[MSFT]" <v-schang@online.microsoft.com> wrote in message
news:rBYHzPwFEHA.616@cpmsftngxa06.phx.gbl...
> Hi,
>
> Thanks for your reply. As you mentioned that you use some certain string
> to
> concate the whole new url which is used to rewrite the Requested path.
> Have
> you also tried a fixed path, for example:
> put a test page named test.aspx in the application's root folder and
> change
> the rewritepath code as below:
> void OnBeginRequest(object sender, EventArgs a)
> {
> HttpApplication application = (HttpApplication)sender;
> ......................// check the querystring
> ......................
>
> application.Context.RewritePath("http://localhost:8080/CompanyName/test.aspx
> ");
> }
>
> Or you can try the "~/....aspx" url, the "~/" means begin from the
> application's root folder(virutal directory) which can help specify the
> application's root directory without hardcode it. If the above test still
> failed, I'm afraid that it would require intensive troubleshooting. You
> may
> need to submit a service request to
> our Product Support Service. We may do some dump analysis on it and see
> why
> the exception happens. Thanks.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
> Get Preview at ASP.NET whidbey
> http://msdn.microsoft.com/asp.net/whidbey/default.aspx
>
>
- Next message: johndoe_at_driver.net: "Re: How can I run asp.net in other computers...."
- Previous message: John: "Repost: Allow certain area of a treeview webcontrol to post"
- In reply to: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Next in thread: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Reply: Steven Cheng[MSFT]: "Re: BUG? With A HTTPModule"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|