Chris
Chris

Reputation: 83

Upload C# project to FTP server

I have a C# .NET website I have been trying to upload to a web hosting provider's servers. I am successful if I upload the website to my base directory http://www.xyz.org/hello.aspx. But when I attempt to upload to a subdirectory http://www.xyz.org/subDir/hello.aspx, I get the below error message. I have a feeling it has to do with the config file? But I'm not sure. Any help would be appreciated.

Server Error in '/' Application.


Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The file '/Resume_MasterPage.master' does not exist.

Source Error:

Line 1: <%@ page title="" language="C#" masterpagefile="~/Resume_MasterPage.master" autoeventwireup="true" inherits="HomePage, App_Web_zotcvohv" %>
Line 2: <%@ MasterType VirtualPath="~/Resume_MasterPage.master" %>
Line 3:

Upvotes: 0

Views: 537

Answers (1)

Aristos
Aristos

Reputation: 66641

The error is coming from the translate of the location of the files. The ~ on this variable for example:

masterpagefile="~/Resume_MasterPage.master"

says that the Resume_MasterPage.master is located on the root, and not on a subdirectory, because the ~ is "translated" to the root path when is actually looking for the file.

Now you move it to a subdirectory and file can not be found.

I do not know if the site will actually work on the subdirectory, but the fist step is to remove the ~ from all that reference and make sure that work at last local. Maybe some other appears, but actually this is your issue.

Upvotes: 1

Related Questions