ASP.NET和共享程序集 [英] ASP.NET and shared assemblies

查看:71
本文介绍了ASP.NET和共享程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们开发了一些使用EnterpriseServices排队组件的程序集。

为了使用EnterpriseServices,需要安装这些程序集

进入GAC。我使用预构建和后构建事件来自动化GAC

安装过程,而asp.net应用程序已经复制到本地。对于这些共享程序集的引用,将
设置为false。


但是,每次我们对共享程序集进行更改时,我们都必须

重启IIS以强制asp.net使用新版本的

共享程序集。如果我们没有重启IIS,asp.net将继续

来使用旧版本的共享程序集。我相信回收IIS的原因实际上是回收AppDomain,因此ASP.NET将绑定到最新版本的共享程序集。我知道通过更改

web.config也会回收AppDomain,但由于web.config是绑定到SourceSafe的
,默认情况下它是只读的,并且我们不想对每个对共享程序集所做的更改进行修改。


我认为这是ASP的一个非常常见的问题。使用共享

程序集的.NET开发。这种开发必须有一个更好的设置。

任何帮助将不胜感激


ILN

Hi,
We developed some assemblies which use EnterpriseServices queued components.
In order to use EnterpriseServices, these assemblies need to be installed
into GAC. I used the pre-build and post-build events to automate GAC
installation processes and the asp.net application has "copy to local" set
to false for the references of these shared assemblies.

However, every time we made the changes to the shared assemblies, we had to
restart the IIS in order to force the asp.net to use the new version of the
shared assemblies. If we did not restart the IIS, the asp.net will continue
to use the older version of the shared assemblies. I believe the reason of
recycling the IIS is actually to recycle the AppDomain so the ASP.NET will
bind to the most recent version of the shared assemblies. I know by changing
the web.config will recycle the AppDomain too, but since the web.config is
bound to the SourceSafe, by default it is read-only, and we don''t want to
modify it for every changes made to the shared assemblies.

I believe this is a very common issue for ASP.NET development using shared
assemblies. There must be a better setup for this kind of the development.
Any helps will be appreciated

ILN

推荐答案

您好,


您是如何添加对Web应用程序的引用的?根据我的测试,

Web应用程序将尝试查找引用的

程序集的最新版本。 (我通过浏览到classlibrary文件添加了引用,并将

设置为copy local为false。


Luke

Microsoft在线支持


安全! www.microsoft。 com / security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)

Hello,

How did you add the reference to the web application? Based on my test, the
web application will try to find the latest version of the referenced
assembly. (I added the reference by browsing to the classlibrary file and
set "copy local" to false.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Luke,

引用的项目,共享程序集与

asp.net项目在同一解决方案中。从添加引用对话框中添加了引用>

项目选项卡。对于

共享程序集的引用,copy local设置为false。对于私有程序集的引用,为true。


以下是共享程序集的项目文件片段

(Xyz.Common)

< VisualStudioProject>

< CSHARP

ProjectType =" Local"

ProductVersion =" 7.10.3077"

SchemaVersion =" 2.0"

ProjectGuid =" {90AB26A7-505B-4E2F-9B80-0B910AFD215F}"

SccProjectName =" SAK"

SccLocalPath =" SAK" ;

SccAuxPath =" SAK"

SccProvider =" SAK"
Luke,
The referenced projects, shared assemblies, are in the same solution as
asp.net project. The references were added from Add Reference dialog box >
Projects tab. The "copy local" was set to "false" for the references to the
shared assemblies and to "true" for the references to private assemblies.

the followings are the project file fragment of the shared assembly
(Xyz.Common)
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{90AB26A7-505B-4E2F-9B80-0B910AFD215F}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"

< Build>

<设置

ApplicationIcon =""

AssemblyKeyContainerName =""

AssemblyName =" Xyz.Common"

AssemblyOriginatorKeyFile =""

DefaultClientScript =" JScript"

DefaultHTMLPageLayout =" Grid"

DefaultTargetSchema =" IE50"

DelaySign =" false"

OutputType =" Library"

PreBuildEvent =''" C: \Program Files \ Microsoft Visual Studio

..NET 2003 \SDK\v1.1 \ Bin \\\ quotgtiltil.exe" / nologo / uf"
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Xyz.Common"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ''"C:\Program Files\Microsoft Visual Studio
..NET 2003\SDK\v1.1\Bin\gacutil.exe" /nologo /uf "


(TargetPath)"''

PostBuildEvent =''" C:\Program Files \ Microsoft Visual Studio

..NET 2003 \ SDK \v1.1 \ Bin \ agattil.exe" / nologo / if"
(TargetPath)"''
PostBuildEvent = ''"C:\Program Files\Microsoft Visual Studio
..NET 2003\SDK\v1.1\Bin\gacutil.exe" /nologo /if "


这篇关于ASP.NET和共享程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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