从1.1到2.0 swit,appDomain不会在web.config上进行回收更改 [英] AppDomain won't recycle on web.config change since 1.1 to 2.0 swit

查看:63
本文介绍了从1.1到2.0 swit,appDomain不会在web.config上进行回收更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这已经好几个月了。由于我们从ASP.NET

1.1切换到2.0,因此更新我们的

应用程序时会出现持续且零星的问题。


触摸web.config大约40%的时间可以使AppDomain重新加载并刷新所有程序集。有时候它可以完美地工作,但是其他的一些程序集都没有被重新加载到AppDomain中,即使在多个web.config文件接触后也是如此。有时会加载同一个

程序集的多个版本,即使web.config明确定义了要加载的正确的

版本。


有时,我们必须强制整个应用程序池在

程序集正确加载之前进行回收。没有任何web.config触摸将修复它。


大多数时候一些程序集将加载,并随机其他程序集

将无法加载。 />

我们收到2条主要错误消息:


System.IO.FileLoadException:找到的程序集的清单定义确实如此
与程序集引用不匹配。 (HRESULT异常:0x80131040)


类型''Core.CMS.Page''含糊不清:它可能来自汇编

''C: \ WINDOWS \assembly\GAC_MSIL\Core \4.2.100.6__3262 59bf81ba92e7 \ AmeriCommerce.dll''

或来自大会

''C:\\ \\ WINDOWS \assembly\GAC_MSIL\Core \4.2.100.8__3262 59bf81ba92e7 \ AmeriCommerce.dll''。请在类型名称中明确指定程序集。


我的环境如下:

多个Web服务器访问家庭的DFS共享一个站点的目录。


自动更新系统将新版本的程序集添加到Web上的GAC

服务器。


Web.Config文件更新了所有新的组件版本。


-

Stefan Barlow

MCSD.Net

This has been working perfectly for months. Since we switched from ASP.NET
1.1 to 2.0, we have constant and sporadic issues with updating our
applications.

Touching the web.config works about 40% of the time to cause an AppDomain to
reload and flush all assemblies. Sometimes it works perfectly, but other
times some Assemblies are not reloaded into the AppDomain, even after
multiple web.config file touches. Sometimes multiple versions of the same
assembly are loaded, even though the web.config clearly defines the correct
version to load.

Sometimes, we have to force the entire app pool to recycle before the
assemblies load correctly. No amount of web.config touching will fix it.

Most of the time some assemblies will load, and randomly other assemblies
will not load.

We are receiving 2 primary error messages:

System.IO.FileLoadException: The located assembly''s manifest definition does
not match the assembly reference. (Exception from HRESULT: 0x80131040)

The type ''Core.CMS.Page'' is ambiguous: it could come from assembly
''C:\WINDOWS\assembly\GAC_MSIL\Core\4.2.100.6__3262 59bf81ba92e7\AmeriCommerce.dll''
or from assembly
''C:\WINDOWS\assembly\GAC_MSIL\Core\4.2.100.8__3262 59bf81ba92e7\AmeriCommerce.dll''. Please specify the assembly explicitly in the type name.

My environment is as follows:

Multiple web servers access a DFS share for the home directory for a site.

Automated update system adds new versioned assemblies to the GAC on the web
servers.

Web.Config file is updated with all new assembly versions.

--
Stefan Barlow
MCSD.Net

推荐答案

您好Stefan,


根据我的理解,此问题仅在您迁移后才会出现

您的网络应用程序是2.0?


我在

内部似乎无法找到这种症状的相关或已知问题支持数据库。作为一般的故障排除方法,您可以打开Fusion日志来查看装配加载失败的原因。请

按照本博客中的步骤学习如何生成融合日志和

发布在此处进行进一步调查:


#Suzanne Cook的.NET CLR注释:调试程序集加载失败
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx

此致,

Walter Wang(wa****@online.microsoft.com,删除''在线。'')

Microsoft在线社区支持


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

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。如果您使用的是Outlook Express,请确保清除

复选框工具/选项/读取:一次获取300个标题及时看到你的回复




注意:MSDN托管新闻组支持服务是针对非紧急问题

其中来自社区或Microsoft支持的初步响应

工程师可在1个工作日内完成。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

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


此帖子按原样提供。没有保证,也没有授予任何权利。

Hi Stefan,

Based on my understanding, this issue only occurs after you''ve migrated
your web application to 2.0?

I cannot seem to find some related or known issue for such symptom in our
internal support database. As a general troubleshooting method, you could
turn on the Fusion log to see why the assembly loading is failing. Please
follow the steps in this blog to learn how to generate the fusion log and
post here for further investigation:

#Suzanne Cook''s .NET CLR Notes : Debugging Assembly Loading Failures
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove ''online.'')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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/subscripti...t/default.aspx.
==================================================

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


我绝对肯定它从切换到2.0开始。


我们将研究Fusion日志,谢谢。我会发布我的调查结果。


-

Stefan Barlow

MCSD.Net

Walter Wang [MSFT]"写道:
I am absolutely positive it started with the switch to 2.0.

We will look into the Fusion logs, thanks. I''ll post my findings.

--
Stefan Barlow
MCSD.Net
"Walter Wang [MSFT]" wrote:

嗨Stefan,


根据我的理解,这个问题只发生在你迁移后/>
你的网络应用程序是2.0?


我似乎无法在我们的

内部支持数据库中找到这种症状的相关或已知问题。作为一般的故障排除方法,您可以打开Fusion日志来查看装配加载失败的原因。请

按照本博客中的步骤学习如何生成融合日志和

发布在此处进行进一步调查:


#Suzanne Cook的.NET CLR注释:调试程序集加载失败
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx


此致,

Walter Wang(wa****@online.microsoft.com,删除''在线。'')

Microsoft在线社区支持


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

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。如果您使用的是Outlook Express,请确保清除

复选框工具/选项/读取:一次获取300个标题及时看到你的回复




注意:MSDN托管新闻组支持服务是针对非紧急问题

其中来自社区或Microsoft支持的初步响应

工程师可在1个工作日内完成。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

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


此帖子按原样提供。没有保证,也没有赋予权利。

Hi Stefan,

Based on my understanding, this issue only occurs after you''ve migrated
your web application to 2.0?

I cannot seem to find some related or known issue for such symptom in our
internal support database. As a general troubleshooting method, you could
turn on the Fusion log to see why the assembly loading is failing. Please
follow the steps in this blog to learn how to generate the fusion log and
post here for further investigation:

#Suzanne Cook''s .NET CLR Notes : Debugging Assembly Loading Failures
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove ''online.'')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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/subscripti...t/default.aspx.
==================================================

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


代码继续旧版本,但在触摸web.config之后它也是

将新代码版本加载到app域中。当我用这个

代码调用一个页面时:

System.Web.HttpRuntime.UnloadAppDomain();


重新加载页面,所有工作都按预期进行。肯定有一个问题

,它是如何看待web.config的。可能是因为使用了DFS分享。


-

Stefan Barlow

MCSD.Net

Stefan Barlow写道:
The code continues the old version, but after touching the web.config it also
loads the new code version into the app domain. When I call a page with this
code on it:

System.Web.HttpRuntime.UnloadAppDomain();

And re-load the page, all works as expected. There is definaltely an issue
with how it is watching the web.config. Possibly due to using the DFS share.

--
Stefan Barlow
MCSD.Net
"Stefan Barlow" wrote:

我绝对肯定它开始切换到2.0。


我们将研究Fusion日志,谢谢。我会发布我的调查结果。


-

Stefan Barlow

MCSD.Net


Walter Wang [MSFT]"写道:
I am absolutely positive it started with the switch to 2.0.

We will look into the Fusion logs, thanks. I''ll post my findings.

--
Stefan Barlow
MCSD.Net
"Walter Wang [MSFT]" wrote:

嗨Stefan,


根据我的理解,这个问题只发生在你迁移后/>
你的网络应用程序是2.0?


我似乎无法在我们的

内部支持数据库中找到这种症状的相关或已知问题。作为一般的故障排除方法,您可以打开Fusion日志来查看装配加载失败的原因。请

按照本博客中的步骤学习如何生成融合日志和

发布在此处进行进一步调查:


#Suzanne Cook的.NET CLR注释:调试程序集加载失败
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx

此致,

Walter Wang(wa****@online.microsoft.com,删除''在线。'')

Microsoft在线社区支持


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

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。如果您使用的是Outlook Express,请确保清除

复选框工具/选项/读取:一次获取300个标题及时看到你的回复




注意:MSDN托管新闻组支持服务是针对非紧急问题

其中来自社区或Microsoft支持的初步响应

工程师可在1个工作日内完成。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx

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


此帖子按原样提供。没有保证,也没有授予任何权利。
Hi Stefan,

Based on my understanding, this issue only occurs after you''ve migrated
your web application to 2.0?

I cannot seem to find some related or known issue for such symptom in our
internal support database. As a general troubleshooting method, you could
turn on the Fusion log to see why the assembly loading is failing. Please
follow the steps in this blog to learn how to generate the fusion log and
post here for further investigation:

#Suzanne Cook''s .NET CLR Notes : Debugging Assembly Loading Failures
http://blogs.msdn.com/suzcook/archiv.../29/57120.aspx
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove ''online.'')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

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/subscripti...t/default.aspx.
==================================================

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


这篇关于从1.1到2.0 swit,appDomain不会在web.config上进行回收更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆