N
nsyforce
Can you change the domain name in an HTTPModule? I have seen examples
of changing the relative url in an HTTP Module, such as the following:
protected void AuthenticateRequest(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication) sender;
HttpContext objContext = (HttpContext) app.Context;
objContext.RewritePath("mynewpage.aspx");
}
However, I'd like to take a request from
http://www.msdn.com/mypage.aspx and change it to
http://www.msdn.help.com:83/mypage.aspx. Is there a way I can do
this? I saw a comment on the web that you couldn't, but judging by the
nature of an HTTPModule, I'm not convinced that you can't do it. I've
tried changing the Host server variable, but got an error that this was
read only. I was debating about doing this in an ISAPI filter, but
would prefer using an HTTPModule if at all possible.
Thanks in advance
of changing the relative url in an HTTP Module, such as the following:
protected void AuthenticateRequest(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication) sender;
HttpContext objContext = (HttpContext) app.Context;
objContext.RewritePath("mynewpage.aspx");
}
However, I'd like to take a request from
http://www.msdn.com/mypage.aspx and change it to
http://www.msdn.help.com:83/mypage.aspx. Is there a way I can do
this? I saw a comment on the web that you couldn't, but judging by the
nature of an HTTPModule, I'm not convinced that you can't do it. I've
tried changing the Host server variable, but got an error that this was
read only. I was debating about doing this in an ISAPI filter, but
would prefer using an HTTPModule if at all possible.
Thanks in advance