web.main getting an error about not finding this file. Not sure where it's normally located. I searched all my files on godaddy files

mark sails 1 Reputation point
2022-02-19T16:47:12.573+00:00

Hello,

I just loaded my website files (asp.net of course) up to godaddy

I tried to run the site on the web and got an error

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: Could not load type 'Web.Main'.

Source Error:

Line 1: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Main.master.cs" Inherits="Web.Main" %>
Line 2:
Line 3: <!DOCTYPE html>

Source File: /Main.Master Line: 1

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4465.0

Developer technologies ASP.NET Other
Developer technologies C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 30,186 Reputation points Microsoft External Staff
    2022-02-21T05:34:28.16+00:00

    Hi @mark sails ,
    I think you need to change CodeBehind to CodeFile.
    This is normally happening when you copy files from a Web application projects to Website Project.
    When you create a Web Application the Page directive is CodeBehind for the web pages.
    If you create your application as Website then the Page directive is CodeFile.
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.