Click here to Skip to main content
14,664,816 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all,

i got problem when access to the home page. at first i use "server.transfer" but then still no works.

here the code:

Session["username"] = username.Text;

            if (roles == "administrator,user")
            else if (roles == "manager,user")
            else if (roles == "user")
when i access to manager and admin home page it works.but when i want to access to user homepage; the error appear: Error executing child request for /OMC1/User/Home.aspx.

pls guys help me.i have to submit the project asap

thanks a lot
Updated 31-May-12 22:05pm

Rate this:
Please Sign up or sign in to vote.

Solution 1

Use Response.Redirect. Documented issue by MS, here:
PRB: "Error Executing Child Request" Error Message When You Use Server.Transfer or Server.Execute in ASP.NET Page[^]

Alternatively, similar issue resolved here: Server.Transfer throws Error executing child request. How to resolve?[^]
Use: HttpContext.Current.RewritePath("somefile.aspx");
musiw 2-Jun-12 0:26am
i already try your solution, rewritepath("page.aspx"); but after i login the login page appear 2 times.i have to login again
Rate this:
Please Sign up or sign in to vote.

Solution 2

The another way to resolve this error is to add an Handler in webconfig file:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100