By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

problem in httphandler using server.execute(please urgent)

P: n/a
hi,

i have problem in httphandler, my problem is that when i am trying to
use server.execute(/default.aspx) i am getting error....

[Error executing child request for /Default.aspx]
Here i am trying to redirect from home.aspx to default.aspx (both file
isin sharepoint).I have give a copy of my code below..

public class UrlMap : System.Web.UI.Page,IHttpHandler,
IRequiresSessionState
{

public new bool IsReusable { get { return false; } }
public new void ProcessRequest(HttpContext context)
{
string requestedUrl = context.Request.Url.ToString();
if(requestedUrl.IndexOf("/Home.aspx")!=-1)
{
context.Server.Execute("/Default.aspx");
}
}
}
The same code is working fine when i am using
server.Transfer("/Default.aspx")...
Please anyone can help how to rectify this problem...
It is vey urgent...
mail Adresss : na*******@gsdindia.com

bye
sathya narayanan

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I'm guessing that as an httphandler is in the IIS pipeline, thus server
execute would try to pass processing to another page - whoich would enter
the handler, and could try to pass processing to another page, thus creating
a potential infinite loop and deadlocking the pipeline Server.transfer
effectively terminates the current request and passes processing to another
page, thus eliminting the recursive process. It might be by design.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"sathya" <sa***************@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
hi,

i have problem in httphandler, my problem is that when i am trying to
use server.execute(/default.aspx) i am getting error....

[Error executing child request for /Default.aspx]
Here i am trying to redirect from home.aspx to default.aspx (both file
isin sharepoint).I have give a copy of my code below..

public class UrlMap : System.Web.UI.Page,IHttpHandler,
IRequiresSessionState
{

public new bool IsReusable { get { return false; } }
public new void ProcessRequest(HttpContext context)
{
string requestedUrl = context.Request.Url.ToString();
if(requestedUrl.IndexOf("/Home.aspx")!=-1)
{
context.Server.Execute("/Default.aspx");
}
}
}
The same code is working fine when i am using
server.Transfer("/Default.aspx")...
Please anyone can help how to rectify this problem...
It is vey urgent...
mail Adresss : na*******@gsdindia.com

bye
sathya narayanan

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.