Reputation: 1492
Infrastructure:
Issue:
Dynamic compilation occurs on each server, creating temporary asp.net files that have different names. Sometimes a postback will hit a different server than the previous request and I get a FileNotFoundException
- Could not load file or assembly 'PageName.aspx.551d078a.agzxzct4
. This file exists on the first server, but not the second.
Question:
How can I deploy my web forms website project to multiple web servers and allow each request to hit any server?
Ive tried:
aspnet_compiler
. I am using VirtualPathProvider
so precompiling is out, per these docs. I get a 404 on pages that use VirtualPathProvider
Upvotes: 1
Views: 179
Reputation: 1492
I had an enum
defined inside the code behind file. I just moved it to a separate class file.
Upvotes: 0
Reputation: 4246
I believe you have an ASP.NET website (not web application) project. While publishing the website project you can turn on the setting for merging pages and control outputs into a single assembly instead of creating a separate dll for each page which is default setting.
In the screenshot, on the publish dialog settings tab you can click on Configure link next to Precompile during publishing option
and set Advanced Precompile Settings
Upvotes: 0