problem in httphandler using server.execute(please urgent)

S

sathya

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 : (e-mail address removed)

bye
sathya narayanan
 
J

John Timney \(ASP.NET MVP\)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top