I have a project that compiles and runs fine on my development machine but when I run it on the web server I get the following error.
Parser Error Message: The file ‘/Views/Shared/Main.master.cs’ does not exist.
The file mentioned does not exist on the server but the file ‘/Views/Shared/Main.master’ does.
I use the ‘Publish’ command to upload the project. Is it missing the cs files?
Is there some setting where it does just in-time compiling that need to turn off?
I stumbled upon this solution.
The master page has the following attribute
CodeFile='Main.master.cs'. When I replaced this withCodeBehind='Main.master.cs'it works as expected.The file originally came from an older web application but I don’t know what the difference means. If someone else can come up with a better explanation I will accept their answer instead of this one.