Click here to Skip to main content
14,866,950 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900