MTSkull Posted June 4, 2010 Posted June 4, 2010 I have a web app that runs fine on the Dev Machine but, when run from a folder on the server it cannot find files in the code behind. When I run it locally I can find all files. On the server, any <a> redirects work file but I can not use Response.Redirect in the code behind. //in the aspx page the following always works... <a href="NextPage.aspx?SID=1234">Go To Next Page</a> //in the code behind the equivalent does not work on the server. // But does work on the development machine Response.Redirect("~/NextPage.aspx?SID=1234"); On the Server the pages are located in a subdirectory. Updating the redirect to include the sub dir also does not work. I.E. "/SubDir/NextPage.aspx?SID=1234" Not sure what else to try at the moment. Thanks MTS Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Administrators PlausiblyDamp Posted June 4, 2010 Administrators Posted June 4, 2010 What error does it it give? What would be the full path to the files? (both on the dev box and the production server) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MTSkull Posted June 4, 2010 Author Posted June 4, 2010 Error: 404 File or directory not found. Development Path = C:\Documents and Settings\mtskull\My Documents\Visual Studio 2008\Projects\Typhon_Tracking\Typhon_Tracking\Typh_Hx.aspx Server Path = C:\inetpub\wwwroot\TyphTrak\Typh_Hx.aspx Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Administrators PlausiblyDamp Posted June 4, 2010 Administrators Posted June 4, 2010 Has the folder on the server been correctly setup under IIS as a virtual directory / application? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MTSkull Posted June 4, 2010 Author Posted June 4, 2010 Thanks, I found it. There was an old reference to a network resource that was unavailable to the server. When I tried to run the website on the server I got a meaningful error message that allowed me to find the problem. Thanks for the Help MTS Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.