Continuous Integration Environment : Parser Error Message: The file XXX does not exist

This is something that definitely continuous integration able to identify.

Something to do with ASP.NET web page running well in development but not in the live environment or pre-screen - continuous integration environment.


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 '/XXX/XXXX.aspx.cs' does not exist.

Source Error:


Line 1:
Line 2: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="




For seasoned developers, if they have started development since .NET 1.1. This is something definitely they familiar with. Because, in the past, all this are not so automated in older version of Visual Studio.NET.So, in this case, it is the CodeFile directive that asking compiler to look for csharp code specify in the aspx file. This would in turn force the IIS server compile the aspx file with the *.cs file dynamically.
However, if you are deploying this to live environment, you would definitely end up puzzling how come it is not working now with the assemblies since you would not ship with source code.

So, the resolution would be to change it to

Codebehind="XXX.aspx.cs" instead. And once you publish the web site for deployment, it would still work and look for the respective DLL in bin folder.

You can also use "assembly= " directive if you want to handcraft the location of DLL.

Comments

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file

MSSQL GROUP_CONCAT