Code Behind Reference Problem

MTSkull

Centurion
Joined
Mar 25, 2003
Messages
151
Location
Boulder, Colorado
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.

Code:
//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
 
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
 
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
 
Back
Top