Could not load file or assembly App_Web - Revisited!!!

G

Guest

We recently moved an important ASP.Net 1.1 web application to 2.0 using Web
Application Projects. Testing went well in our staging environment. We moved
to the production environment, and everything was great for a full day. A day
later we changed the trace enabled setting to false in the web.config. At
that point, all 5 of our web servers which the site was deployed to got a
FileNotFoundException - Could not load file or assembly App_Web_xxxx error
(full error below) for just about any page on the site.

I could only reproduce the issue once in our staging environment. I have
tried to reproduce countless more times in our staging and production
environments, but am unable to. I have scoured the internet and MS knowledge
base articles, and can find no definite fix (details below). I found the MS
knowledge base article and hotfix 915782. So I contact MS support to receive
the hotfix. Well, we found that our current version of the ASP.Net files is
..210, but the hotfix versions are .80. So basically MS said that it may or
may not fix the issue, and could potentially cause other issues as well.

Soooo, does anyone know the status on this error? What exactly is the cause
of the error? Can someone who has first hand knowledge of this error, or a MS
employee respond to this?

Here are the various things I have read that apparently fixed the issue. Can
anyone comment on whether these worked for them or not (would be nice to get
an MS person here to get an official response):
1. Change compilation mode to batch="false". This compiles each page as it
is accessed. I read that this is not recommended for large sites, though I'm
a little unsure why. Will it work, and is it really bad to do for large sites?
2. Pre-compile the site. This is OK, though it will be a pain to have to
deploy the whole site again if we just want to change the wording of a
sentence. But will it work?
3. Reference all controls that a page might reference in the top of the ASPX
page, even if the control is in another control that the page is referencing.
This would be crazy to do for our site, and would be a complete maintenance
nightmare. I don't think this one is practical for us.
4. Avoid nested control references. This really isn't practical for us either.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 1/26/2007 4:46:29 PM
Event time (UTC): 1/26/2007 9:46:29 PM
Event ID: 2bd565d1e320409a86b92dba8a088cfa
Event sequence: 297
Event occurrence: 148
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/Root-2-128143212203368910
Trust level: Full
Application Virtual Path: /
Application Path: D:\inetpub\websitename\
Machine name: WWW1
Process information:
Process ID: 3616
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM

Exception information:
Exception type: FileNotFoundException
Exception message: Could not load file or assembly 'App_Web_wshnbbhs,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. The system cannot find the file specified.

Request information:
Request URL: http://192.168.200.61/Home.aspx
Request path: /Home.aspx
User host address: 192.168.200.4

User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM

Thread information:
Thread ID: 5
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False

Stack trace: at
ASP.ui_controls_websiteheader_ascx.__BuildControltagLinePhone() at
ASP.ui_controls_websiteheader_ascx.__BuildControl__control13(HtmlTableCellCollection
__ctrl) at
ASP.ui_controls_websiteheader_ascx.__BuildControlpersonalWithTag() at
ASP.ui_controls_websiteheader_ascx.__BuildControlTree(ui_controls_websiteheader_ascx
__ctrl) at ASP.ui_controls_websiteheader_ascx.FrameworkInitialize() at
System.Web.UI.UserControl.InitializeAsUserControlInternal() at
System.Web.UI.UserControl.InitializeAsUserControl(Page page) at
ASP.home_aspx.__BuildControlwebsiteHeader() at
ASP.home_aspx.__BuildControlHome() at
ASP.home_aspx.__BuildControlTree(home_aspx __ctrl) at
ASP.home_aspx.FrameworkInitialize() at
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) at
System.Web.UI.Page.ProcessRequest() at
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.home_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

If I find anything else out, I will follow up here as well.

Thanks for taking the time to read about my issue!
-Mike
 
G

Guest

Also, below is an ASP.Net post from Scott Guthrie on 7/12/2006. I haven't
heard any progress on option #3 below, which I assume is what my situation is
since we can't reproduce the issue. Note, this thread is about "Unable to
cast object of type 'ASP.masterpage_master to...", but according to the
915782 MS support article, and according to Microsofts Jim Chesire at this
link http://forums.asp.net/1/1290177/ShowThread.aspx, they are the same issue.

Scott Guthrie post from http://forums.asp.net/7/1169996/ShowThread.aspx
about MS issue 915782
Many apologies for the issues with this....
To answer a few questions above, there are a few reasons this error happens:
1) Due to a problem with user-code (meaning you make a coding mistake that
causes this and which isn't a product bug).
2) Due to a bug with dynamic compilation that is fixed and that there is a
patch for that you can obtain for free from Microsoft support.

3) Due to a (very rare and hard to isolate) bug with dynamic compilation
that we haven't been able to fully isolate down or get a consistent repro for
yet.

To obtain the patch for #2, please call Microsoft support using the local
country number listed here:
http://support.microsoft.com/common/international.aspx?rdpath=gp;en-us;offerprophone
(note: you do not need to call the US -- there is a local number in each
country). When you call, ask for a hotfix for issue: 915782. They will then
give you the patch for free (no charge at all).

The reason we haven't made the patch more broadly available yet is because
we are trying to still nail down case #3 above -- which is a rare case we've
seen with some people where the patch doesn't fix the issue entirely for
them. The challange is that we haven't been able to find a customer yet who
has been able to consistently get the error (instead it seems to happen every
few weeks or so). We are working with some customers right now to try and
catch it the next time it happens.

If you would like to be included in the list of folks we work with to help
isolate the problem, please first call product support above and install the
patch that is available, and then if you still see issues send me email at:
(e-mail address removed). I will then put you in touch with people who are
dedicated to this problem. We will send information on how you can produce a
process dump for us to examine the next time the issue occurs on your system,
and we will be able to identify the issue and release a broader patch that
fixes all scenarios.

Thanks for your patience, and apologies again for the inconvenience,
Scott
 
S

Steven Cheng[MSFT]

Hello Scott,

Regarding on the FileNotFoundException you encounterred, I think it is most
likely a assembly referencing issue(for dynamically compiled assembly).
I've also found the knowledge base article you mentioned:

http://support.microsoft.com/kb/915782/en-us

It is about cross referencing issue which may occur in ASP.NET 2.0 web
application whether page and usercontrols has referenced each other and
those classes are compiled into the same assembly.

I have also checked the callstack you pasted in the initial response

=========================
Stack trace: at
ASP.ui_controls_websiteheader_ascx.__BuildControltagLinePhone() at
ASP.ui_controls_websiteheader_ascx.__BuildControl__control13(HtmlTableCellCo
llection
__ctrl) at
ASP.ui_controls_websiteheader_ascx.__BuildControlpersonalWithTag() at
ASP.ui_controls_websiteheader_ascx.__BuildControlTree(ui_controls_websitehea
der_ascx
__ctrl) at ASP.ui_controls_websiteheader_ascx.FrameworkInitialize() at
System.Web.UI.UserControl.InitializeAsUserControlInternal() at
System.Web.UI.UserControl.InitializeAsUserControl(Page page) at
ASP.home_aspx.__BuildControlwebsiteHeader() at
ASP.home_aspx.__BuildControlHome() at
ASP.home_aspx.__BuildControlTree(home_aspx __ctrl) at
ASP.home_aspx.FrameworkInitialize() at
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) at
System.Web.UI.Page.ProcessRequest() at
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at
System.Web.UI.Page.ProcessRequest(HttpContext context) at
ASP.home_aspx.ProcessRequest(HttpContext context) at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplicati
on.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
=========================

the error/exception raise at the initialization time of the
websiteheader_ascx usercontrol(I think you have a usercontrol named
"websiteheader.ascx" in your project, correct?). Therefore, I think you
may concentrate on pages which use this usercontrol, and the usercontrol
may also reference some other page class? Anyway, for such scenario, I
don't think there is any rapid or direct means that can get the problem
resolve on the fly, we need to troubleshoot gradually. And IMO, it would
be much better if we can repro the issue through a simplified web project
with only the necessary pages/usercontrols.

Please feel free to let me know if you have any further ideas or finding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello Scott,

How are you doing on this issue, have you got any progress on this? Based
on the nature of this issue, if you still need further research on this, I
would suggest you contact CSS for further assistance since some more
detailed and thorough troubleshooting would be necessary.

http://msdn.microsoft.com/subscriptions/support/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

Thanks for looking at this Steven. I did contact some folks at MS whom Mr.
Guthrie directed me to. Basically the problem is that I can't come up with a
way to reproduce the issue. So they recommended going with the compilation
batch="false" solution as long as we didn't see it slow down our site too
much. I also have a production server set up with batch="true" in the hopes
that we will run accross the error again and be able to figure out how to
reproduce it.
 
S

Steven Cheng[MSFT]

Thanks for your followup Scott,

Yes, it is quite important to create a simplified repro or can definitely
reproduct in product environment so that some dedicated troubleshooting
such as debugging and dump analyisis can be performed. Anyway if you get
any new progress or resolve the issue, please feel free to share the result
with us.

Wish you good luck!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,821
Messages
2,569,747
Members
45,726
Latest member
RaleighAll

Latest Threads

Top