I can't deploy a website (call it "zzz") to our production environment. Here's the exception:
Server Error in '/Admin' 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 'zzz.Admin.Default'. Source Error: Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="zzz.Admin.Default" %> Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Source File: /Admin/default.aspx Line: 1 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
Similar error is addressed at here or here but I'm not interested in changing the code (
CodeFile) because 1) the project works perfectly fine, both on my local machine and when deployed to development (the only changes in code are in the web.config pointing to a different database) and 2) there are some indications there is some other underlying problem.
This is an old website I had to make some changes to, and took the opportunity to do some cleanup (like merging conflicting duplicated code that was different across projects...). The solution was previously divided into four different projects (Admin, Account, the "default website" root, and one other), each of which had their own virtual directory on IIS (3 underneath the root website). I combined this into one project and got rid of the virtual directories. Everything works fine on my machine. Everything works fine in the development environment. But it does not work in production.
If I copy the /bin folder the way things used to be, the website works again.
old version/code; works on local, dev, & production; virtual directories.
+-+ website zzz +-+ /Account | +-- /Account/bin (Account.dll) | +-+ /Admin | +-- /Admin/bin (Admin.dll) | +...
new version/code; works on local, dev; shared dll in bin folder; no virtual directories. Does not work on production.
+-+ website zzz +-+ /Account | +-+ /Admin | +-+ /bin (zzz.dll) | +...
In order to get the website to work on production I have to copy the bin folder into the previous locations:
+-+ website zzz +-+ /Account | +-- /Account/bin (zzz.dll) | +-+ /Admin | +-- /Admin/bin (zzz.dll) | +...
If I remove temp files, I can see the /Admin and /Account folders being created in the temp location (with new dll), even though everything should just be under one folder (right?).
I'm expecting temp files to show up in
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\ but instead they are being created one level up, e.g.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\admin, one for each location the /bin folder is copied to.
I've tried removing the temp files for this website, starting and stopping the website, and starting and stopping the app pools. Rebooting has not yet been tried as there are a number of different websites being hosted from the same instance, but this will probably happen soon.
Two different machines, behind a load balancer, but both are referencing a shared folder the website is located in. In fact, DFS Management is actually used to sync the website folder between the two machines (could this be related?).
AFAIK our dev and prod environments are the same, but there could be something out of sync, which has happened before. Not sure what I'm looking for as IIS settings look to be the same, in general.
There's nothing in the web.config about caching.
app pool "Enable 32-Bit application" is set to false in all environments.
superfetch is not (has not ever been) enabled.
win forms project targeting .net framework 4
Windows Server 2008 R2
There are 15 patches on dev not on prod, and 65 patches on prod not on dev. Trying to figure out the best way to sort through this (with help from here ).