473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ASP.NET and shared assemblies

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
Nov 18 '05 #1
9 4154
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.)

Nov 18 '05 #2
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>
<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\gacutil.exe" /nologo /if "$(TargetPath)"'
RootNamespace = "Xyz.Common"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = "" <Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Data.dll
"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.XML.dll"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.ExceptionManageme nt"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Web.dll"
/>
<Reference
Name = "System.Security"
AssemblyName = "System.Security"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Security
..dll"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Web.Serv
ices.dll"
/>
</References>
</Build>

The followings are the project file fragment of the asp.net web application

<VisualStudioProject>
<CSHARP
ProjectType = "Web"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{B92F596B-4F30-4FC2-9F84-5AD62B56C0DA}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK" <Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Subscribers"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Flow"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Xyz.Web.Subscribers"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = "" <Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Drawing.dll
"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Data.dll"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.XML.dll"
/>
<Reference
Name = "Xyz.Common"
Project = "{90AB26A7-505B-4E2F-9B80-0B910AFD215F}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.ExceptionManageme nt"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.Service
s.dll"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Xyz.DAL"
Project = "{6559D88E-6265-4424-AC2D-8E4BC4462361}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Accounts"
Project = "{FAE55257-8189-49CC-8421-AE34C85300BF}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Async"
Project = "{E6D51F3B-F4A7-4A25-BAC1-6013EF66C4B4}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
</References>
</Build>

We used queued components for asynchronous processes. If the

ILN

"MSFT" <lu******@online.microsoft.com> wrote in message
news:0C**************@cpmsftngxa06.phx.gbl... 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.)

Nov 18 '05 #3
BTW
from this article
http://www.aspalliance.com/226
the asp.net will not look for the latest version from GAC, and this is what
I have experienced.

ILN

"Invalidlastname" <in*************@toomanyvalidations.page> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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>
<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\gacutil.exe" /nologo /if "$(TargetPath)"'
RootNamespace = "Xyz.Common"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
> <Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Data.dll "
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.XML.dll" />
<Reference
Name = "Microsoft.ApplicationBlocks.ExceptionManageme nt" Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Web.dll" />
<Reference
Name = "System.Security"
AssemblyName = "System.Security"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Security .dll"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Web.Serv ices.dll"
/>
</References>
</Build>

The followings are the project file fragment of the asp.net web application
<VisualStudioProject>
<CSHARP
ProjectType = "Web"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{B92F596B-4F30-4FC2-9F84-5AD62B56C0DA}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
> <Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Subscribers"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Flow"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Xyz.Web.Subscribers"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>

<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath =

"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Drawing.dll "
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Data.dll"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.XML.dll"
/>
<Reference
Name = "Xyz.Common"
Project = "{90AB26A7-505B-4E2F-9B80-0B910AFD215F}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.ExceptionManageme nt" Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.Service s.dll"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Xyz.DAL"
Project = "{6559D88E-6265-4424-AC2D-8E4BC4462361}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Accounts"
Project = "{FAE55257-8189-49CC-8421-AE34C85300BF}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Async"
Project = "{E6D51F3B-F4A7-4A25-BAC1-6013EF66C4B4}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
</References>
</Build>

We used queued components for asynchronous processes. If the

ILN

"MSFT" <lu******@online.microsoft.com> wrote in message
news:0C**************@cpmsftngxa06.phx.gbl...
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.)


Nov 18 '05 #4
ILN,

That article is not entirely accurate. As long as you don't make a change
that causes the assembly hash value to change, you can update a new version
of the assembly in the GAC and the ASP.NET application will automatically
use the new version without changing anything. (It should be noted that
you do still have to reload the app domain.)

What changes the hash value? If you change the assembly name, the major or
minor version, the public key token, or the culture, the hash value will
change. As long as you don't modify any one of these, you would use the
following procedure to update the assembly in the GAC.

1. Run sn to create a new verification entry for the new version. Do that
as
follows:

sn -Vr <assembly>

2. Run Gacutil to reinstall the assembly as follows:

gacutil /nologo /if <assembly>

Once you do that, simply open the web.config, add a new blank line, and
save the web.config. That will force a reload of the app domain and your
application will use the new assembly.

If you have changed the hash value by changing one of the above, the
easiest way to force your application to use the new version in cases where
you can't redirect the assembly binding in a configuration file is to use a
publisher policy assembly. Most people will say that you should use a
publisher policy file, but that's not entirely accurate. The publisher
policy file is used to create the publisher policy assembly, and it's
actually the publisher policy assembly that redirects the binding.

Here is an example of doing this. In this example, my assembly is called
jcGAC.dll and I am changing the version number from 1.0.0.0 to 2.0.0.0.

1. Change code in version 1.0.0.0 of the assembly.

2. Change version number in assemblyinfo.cs to reflect new version.

3. Rebuild assembly.

4. Create publisher policy file in any text editor. You will need to
replace "<public_key>" with the public key for your version 1.0 assembly.

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="jcGAC"
publicKeyToken="<public_key>"
culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

5. Use al to create the publisher policy assembly. The publisher policy
assembly MUST have the following file format:
policy.major_ver.minor_ver.assembly.dll

The major and minor version shown here would be the major and minor
versions for your original version, not the updated new version. Below is
an example of the command entered to create the publisher policy assembly
for my assembly jcGAC.dll using the keyfile jcgac.snk. Note that the
publisher policy file in created in step 4 was saved as pub.config.

al /link:pub.config /out:policy.1.0.jcGAC.dll /keyfile:jcgac.snk
6. Install publisher policy assembly into the GAC.

gacutil /i policy.2.0.jcGAC.dll

7. Install version 2.0.0.0 of your assembly into the GAC.

gacutil /i jcGAC.dll

8. Restart the app domains by either saving a change to the machine.config
or by resetting IIS.

9. Run the ASP.NET app.

After taking these steps, any ASP.NET application that originally
referenced version 1.0.0.0 will now bind to version 2.0.0.0.
Assembly binding is a fairly complex subject, but I hope that this helps
explain a bit.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>Subject: Re: ASP.NET and shared assemblies
Date: Tue, 2 Dec 2003 11:09:34 -0500
Lines: 349
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <ec**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path: cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10.
phx.gblXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:194484
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

BTW
from this article
http://www.aspalliance.com/226
the asp.net will not look for the latest version from GAC, and this is what
I have experienced.

ILN

"Invalidlastname" <in*************@toomanyvalidations.page> wrote in messagenews:ut**************@tk2msftngp13.phx.gbl...
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>
<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\gacutil.exe" /nologo /if "$(TargetPath)"'
RootNamespace = "Xyz.Common"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>

<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Data.dl

l
"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.XML.dll

"
/>
<Reference
Name =

"Microsoft.ApplicationBlocks.ExceptionManagemen t"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Web.dll

"
/>
<Reference
Name = "System.Security"
AssemblyName = "System.Security"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Securit

y
.dll"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Web.Ser

v
ices.dll"
/>
</References>
</Build>

The followings are the project file fragment of the asp.net web

application

<VisualStudioProject>
<CSHARP
ProjectType = "Web"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{B92F596B-4F30-4FC2-9F84-5AD62B56C0DA}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
>

<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Subscribers"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Flow"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Xyz.Web.Subscribers"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>

<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath =

"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v 1.1.4322\System.Drawing.dl

l
"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Data.dll" />
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.XML.dll"
/>
<Reference
Name = "Xyz.Common"
Project = "{90AB26A7-505B-4E2F-9B80-0B910AFD215F}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =

"Microsoft.ApplicationBlocks.ExceptionManagemen t"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =

"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v 1.1.4322\System.Web.Servic

e
s.dll"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Xyz.DAL"
Project = "{6559D88E-6265-4424-AC2D-8E4BC4462361}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Accounts"
Project = "{FAE55257-8189-49CC-8421-AE34C85300BF}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Async"
Project = "{E6D51F3B-F4A7-4A25-BAC1-6013EF66C4B4}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
</References>
</Build>

We used queued components for asynchronous processes. If the

ILN

"MSFT" <lu******@online.microsoft.com> wrote in message
news:0C**************@cpmsftngxa06.phx.gbl...
> 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.)
>




Nov 18 '05 #5
Hi Jim,
Greatly thanks for the excellent details you provided. However, back to my
original question about how to setup the ASP.NET development environment for
using shared assemblies. Please correct me if I am wrong, it seems to me
that we need to add a post-build event to restart the IIS, or "touch" the
web.config for every changes made to the shared assembly projects ( in order
to reload the AppDomain).

I believe developers would appreciate if Microsoft can provide some
guidelines for developing ASP.NET applications with shared assemblies
scenarios. Actually the only reason we need to have shared assemblies is we
are using queued components from EnterpriseService namespace.

ILN

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:Z$**************@cpmsftngxa06.phx.gbl...
ILN,

That article is not entirely accurate. As long as you don't make a change
that causes the assembly hash value to change, you can update a new version of the assembly in the GAC and the ASP.NET application will automatically
use the new version without changing anything. (It should be noted that
you do still have to reload the app domain.)

What changes the hash value? If you change the assembly name, the major or minor version, the public key token, or the culture, the hash value will
change. As long as you don't modify any one of these, you would use the
following procedure to update the assembly in the GAC.

1. Run sn to create a new verification entry for the new version. Do that as
follows:

sn -Vr <assembly>

2. Run Gacutil to reinstall the assembly as follows:

gacutil /nologo /if <assembly>

Once you do that, simply open the web.config, add a new blank line, and
save the web.config. That will force a reload of the app domain and your
application will use the new assembly.

If you have changed the hash value by changing one of the above, the
easiest way to force your application to use the new version in cases where you can't redirect the assembly binding in a configuration file is to use a publisher policy assembly. Most people will say that you should use a
publisher policy file, but that's not entirely accurate. The publisher
policy file is used to create the publisher policy assembly, and it's
actually the publisher policy assembly that redirects the binding.

Here is an example of doing this. In this example, my assembly is called
jcGAC.dll and I am changing the version number from 1.0.0.0 to 2.0.0.0.

1. Change code in version 1.0.0.0 of the assembly.

2. Change version number in assemblyinfo.cs to reflect new version.

3. Rebuild assembly.

4. Create publisher policy file in any text editor. You will need to
replace "<public_key>" with the public key for your version 1.0 assembly.

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="jcGAC"
publicKeyToken="<public_key>"
culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

5. Use al to create the publisher policy assembly. The publisher policy
assembly MUST have the following file format:
policy.major_ver.minor_ver.assembly.dll

The major and minor version shown here would be the major and minor
versions for your original version, not the updated new version. Below is
an example of the command entered to create the publisher policy assembly
for my assembly jcGAC.dll using the keyfile jcgac.snk. Note that the
publisher policy file in created in step 4 was saved as pub.config.

al /link:pub.config /out:policy.1.0.jcGAC.dll /keyfile:jcgac.snk
6. Install publisher policy assembly into the GAC.

gacutil /i policy.2.0.jcGAC.dll

7. Install version 2.0.0.0 of your assembly into the GAC.

gacutil /i jcGAC.dll

8. Restart the app domains by either saving a change to the machine.config or by resetting IIS.

9. Run the ASP.NET app.

After taking these steps, any ASP.NET application that originally
referenced version 1.0.0.0 will now bind to version 2.0.0.0.
Assembly binding is a fairly complex subject, but I hope that this helps
explain a bit.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
Subject: Re: ASP.NET and shared assemblies
Date: Tue, 2 Dec 2003 11:09:34 -0500
Lines: 349
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <ec**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path:

cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10. phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:194484
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

BTW
from this article
http://www.aspalliance.com/226
the asp.net will not look for the latest version from GAC, and this is whatI have experienced.

ILN

"Invalidlastname" <in*************@toomanyvalidations.page> wrote in

message
news:ut**************@tk2msftngp13.phx.gbl...
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>
<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\gacutil.exe" /nologo /if "$(TargetPath)"'
RootNamespace = "Xyz.Common"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.dll" />
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =

"..\..\..\..\..\.\WINDOWS\Microsoft.NET\Framework \v1.1.4322\System.Data.dl
l "
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.XML.dll
" />
<Reference
Name =

"Microsoft.ApplicationBlocks.ExceptionManagemen t"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Web.dll
" />
<Reference
Name = "System.Security"
AssemblyName = "System.Security"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Securit
y .dll"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =

"..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framewor k\v1.1.4322\System.Web.Ser
v ices.dll"
/>
</References>
</Build>

The followings are the project file fragment of the asp.net web

application

<VisualStudioProject>
<CSHARP
ProjectType = "Web"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{B92F596B-4F30-4FC2-9F84-5AD62B56C0DA}"
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "Subscribers"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Flow"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "Xyz.Web.Subscribers"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath =

"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v 1.1.4322\System.Drawing.dl
l "
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Data.dll" />
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.Web.dll" />
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath =
"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1 .1.4322\System.XML.dll" />
<Reference
Name = "Xyz.Common"
Project = "{90AB26A7-505B-4E2F-9B80-0B910AFD215F}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =

"Microsoft.ApplicationBlocks.ExceptionManagemen t"
Project = "{386CBF50-F4A9-4F05-98CB-B387D2D8F357}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name =
"Microsoft.ApplicationBlocks.ExceptionManagement.I nterfaces"
Project = "{5F25F8C2-DA02-46C6-A6CA-01E719EAD35D}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "System.Web.Services"
AssemblyName = "System.Web.Services"
HintPath =

"..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v 1.1.4322\System.Web.Servic
e s.dll"
/>
<Reference
Name = "Microsoft.ApplicationBlocks.Data"
Project = "{30933672-466E-4F67-A111-ABF267539146}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
<Reference
Name = "Xyz.DAL"
Project = "{6559D88E-6265-4424-AC2D-8E4BC4462361}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Accounts"
Project = "{FAE55257-8189-49CC-8421-AE34C85300BF}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Xyz.Async"
Project = "{E6D51F3B-F4A7-4A25-BAC1-6013EF66C4B4}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
Private = "False"
/>
</References>
</Build>

We used queued components for asynchronous processes. If the

ILN

"MSFT" <lu******@online.microsoft.com> wrote in message
news:0C**************@cpmsftngxa06.phx.gbl...
> 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.)
>


Nov 18 '05 #6
ILN,

Yes, you would have to reload the app domain. ASP.NET is written
explicitly so that it doesn't rebind to assemblies directly on each need.
If it had to do that, it would cause a critical bottleneck.

The first thing that happens in the binding order is that the CLR says,
"Have I bound to this assembly already?" If the answer is Yes, it simply
uses the previous binding.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
<ec**************@TK2MSFTNGP10.phx.gbl>
<Z$**************@cpmsftngxa06.phx.gbl>Subject: Re: ASP.NET and shared assemblies
Date: Wed, 3 Dec 2003 11:26:10 -0500
Lines: 527
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <eS**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path: cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10.
phx.gblXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:194754
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi Jim,
Greatly thanks for the excellent details you provided. However, back to my
original question about how to setup the ASP.NET development environment forusing shared assemblies. Please correct me if I am wrong, it seems to me
that we need to add a post-build event to restart the IIS, or "touch" the
web.config for every changes made to the shared assembly projects ( in orderto reload the AppDomain).

I believe developers would appreciate if Microsoft can provide some
guidelines for developing ASP.NET applications with shared assemblies
scenarios. Actually the only reason we need to have shared assemblies is we
are using queued components from EnterpriseService namespace.

ILN

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:Z$**************@cpmsftngxa06.phx.gbl...
ILN,

That article is not entirely accurate. As long as you don't make a change that causes the assembly hash value to change, you can update a new

version
of the assembly in the GAC and the ASP.NET application will automatically
use the new version without changing anything. (It should be noted that
you do still have to reload the app domain.)

What changes the hash value? If you change the assembly name, the major

or
minor version, the public key token, or the culture, the hash value will
change. As long as you don't modify any one of these, you would use the
following procedure to update the assembly in the GAC.

1. Run sn to create a new verification entry for the new version. Do

that
as
follows:

sn -Vr <assembly>

2. Run Gacutil to reinstall the assembly as follows:

gacutil /nologo /if <assembly>

Once you do that, simply open the web.config, add a new blank line, and
save the web.config. That will force a reload of the app domain and your
application will use the new assembly.

If you have changed the hash value by changing one of the above, the
easiest way to force your application to use the new version in cases

where
you can't redirect the assembly binding in a configuration file is to use

a
publisher policy assembly. Most people will say that you should use a
publisher policy file, but that's not entirely accurate. The publisher
policy file is used to create the publisher policy assembly, and it's
actually the publisher policy assembly that redirects the binding.

Here is an example of doing this. In this example, my assembly is called
jcGAC.dll and I am changing the version number from 1.0.0.0 to 2.0.0.0.

1. Change code in version 1.0.0.0 of the assembly.

2. Change version number in assemblyinfo.cs to reflect new version.

3. Rebuild assembly.

4. Create publisher policy file in any text editor. You will need to
replace "<public_key>" with the public key for your version 1.0 assembly.

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="jcGAC"
publicKeyToken="<public_key>"
culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

5. Use al to create the publisher policy assembly. The publisher policy assembly MUST have the following file format:
policy.major_ver.minor_ver.assembly.dll

The major and minor version shown here would be the major and minor
versions for your original version, not the updated new version. Below is an example of the command entered to create the publisher policy assembly
for my assembly jcGAC.dll using the keyfile jcgac.snk. Note that the
publisher policy file in created in step 4 was saved as pub.config.

al /link:pub.config /out:policy.1.0.jcGAC.dll /keyfile:jcgac.snk
6. Install publisher policy assembly into the GAC.

gacutil /i policy.2.0.jcGAC.dll

7. Install version 2.0.0.0 of your assembly into the GAC.

gacutil /i jcGAC.dll

8. Restart the app domains by either saving a change to the

machine.config
or by resetting IIS.

9. Run the ASP.NET app.

After taking these steps, any ASP.NET application that originally
referenced version 1.0.0.0 will now bind to version 2.0.0.0.
Assembly binding is a fairly complex subject, but I hope that this helps
explain a bit.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Invalidlastname" <in*************@toomanyvalidations.page>
>References: <um*************@tk2msftngp13.phx.gbl>

<0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
>Subject: Re: ASP.NET and shared assemblies
>Date: Tue, 2 Dec 2003 11:09:34 -0500
>Lines: 349
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <ec**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: dc.cvent.com 65.117.187.221
>Path:

cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10

Nov 18 '05 #7
Jim,
Again, thank you for giving me such detailed explanations. It is really
helpful.

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:iF**************@cpmsftngxa06.phx.gbl...
ILN,

Yes, you would have to reload the app domain. ASP.NET is written
explicitly so that it doesn't rebind to assemblies directly on each need.
If it had to do that, it would cause a critical bottleneck.

The first thing that happens in the binding order is that the CLR says,
"Have I bound to this assembly already?" If the answer is Yes, it simply
uses the previous binding.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
<ec**************@TK2MSFTNGP10.phx.gbl>
<Z$**************@cpmsftngxa06.phx.gbl>
Subject: Re: ASP.NET and shared assemblies
Date: Wed, 3 Dec 2003 11:26:10 -0500
Lines: 527
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <eS**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path:

cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10. phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:194754
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi Jim,
Greatly thanks for the excellent details you provided. However, back to myoriginal question about how to setup the ASP.NET development environment

for
using shared assemblies. Please correct me if I am wrong, it seems to me
that we need to add a post-build event to restart the IIS, or "touch" the
web.config for every changes made to the shared assembly projects ( in

order
to reload the AppDomain).

I believe developers would appreciate if Microsoft can provide some
guidelines for developing ASP.NET applications with shared assemblies
scenarios. Actually the only reason we need to have shared assemblies is weare using queued components from EnterpriseService namespace.

ILN

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:Z$**************@cpmsftngxa06.phx.gbl...
ILN,

That article is not entirely accurate. As long as you don't make a change that causes the assembly hash value to change, you can update a new

version
of the assembly in the GAC and the ASP.NET application will automatically use the new version without changing anything. (It should be noted that you do still have to reload the app domain.)

What changes the hash value? If you change the assembly name, the majoror
minor version, the public key token, or the culture, the hash value
will change. As long as you don't modify any one of these, you would use the following procedure to update the assembly in the GAC.

1. Run sn to create a new verification entry for the new version. Do

that
as
follows:

sn -Vr <assembly>

2. Run Gacutil to reinstall the assembly as follows:

gacutil /nologo /if <assembly>

Once you do that, simply open the web.config, add a new blank line, and
save the web.config. That will force a reload of the app domain and your application will use the new assembly.

If you have changed the hash value by changing one of the above, the
easiest way to force your application to use the new version in cases

where
you can't redirect the assembly binding in a configuration file is to use
a
publisher policy assembly. Most people will say that you should use a
publisher policy file, but that's not entirely accurate. The publisher
policy file is used to create the publisher policy assembly, and it's
actually the publisher policy assembly that redirects the binding.

Here is an example of doing this. In this example, my assembly is

called jcGAC.dll and I am changing the version number from 1.0.0.0 to 2.0.0.0.

1. Change code in version 1.0.0.0 of the assembly.

2. Change version number in assemblyinfo.cs to reflect new version.

3. Rebuild assembly.

4. Create publisher policy file in any text editor. You will need to replace "<public_key>" with the public key for your version 1.0 assembly.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="jcGAC"
publicKeyToken="<public_key>"
culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

5. Use al to create the publisher policy assembly. The publisher

policy assembly MUST have the following file format:
policy.major_ver.minor_ver.assembly.dll

The major and minor version shown here would be the major and minor
versions for your original version, not the updated new version. Below is an example of the command entered to create the publisher policy assembly for my assembly jcGAC.dll using the keyfile jcgac.snk. Note that the
publisher policy file in created in step 4 was saved as pub.config.

al /link:pub.config /out:policy.1.0.jcGAC.dll /keyfile:jcgac.snk
6. Install publisher policy assembly into the GAC.

gacutil /i policy.2.0.jcGAC.dll

7. Install version 2.0.0.0 of your assembly into the GAC.

gacutil /i jcGAC.dll

8. Restart the app domains by either saving a change to the

machine.config
or by resetting IIS.

9. Run the ASP.NET app.

After taking these steps, any ASP.NET application that originally
referenced version 1.0.0.0 will now bind to version 2.0.0.0.
Assembly binding is a fairly complex subject, but I hope that this helps explain a bit.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Invalidlastname" <in*************@toomanyvalidations.page>
>References: <um*************@tk2msftngp13.phx.gbl>
<0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
>Subject: Re: ASP.NET and shared assemblies
>Date: Tue, 2 Dec 2003 11:09:34 -0500
>Lines: 349
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <ec**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: dc.cvent.com 65.117.187.221
>Path:


cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10

Nov 18 '05 #8
Jim,
Again, thank you for giving me such detailed explanations. It is really
helpful.

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:iF**************@cpmsftngxa06.phx.gbl...
ILN,

Yes, you would have to reload the app domain. ASP.NET is written
explicitly so that it doesn't rebind to assemblies directly on each need.
If it had to do that, it would cause a critical bottleneck.

The first thing that happens in the binding order is that the CLR says,
"Have I bound to this assembly already?" If the answer is Yes, it simply
uses the previous binding.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
<ec**************@TK2MSFTNGP10.phx.gbl>
<Z$**************@cpmsftngxa06.phx.gbl>
Subject: Re: ASP.NET and shared assemblies
Date: Wed, 3 Dec 2003 11:26:10 -0500
Lines: 527
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <eS**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path:

cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10. phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:194754
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi Jim,
Greatly thanks for the excellent details you provided. However, back to myoriginal question about how to setup the ASP.NET development environment

for
using shared assemblies. Please correct me if I am wrong, it seems to me
that we need to add a post-build event to restart the IIS, or "touch" the
web.config for every changes made to the shared assembly projects ( in

order
to reload the AppDomain).

I believe developers would appreciate if Microsoft can provide some
guidelines for developing ASP.NET applications with shared assemblies
scenarios. Actually the only reason we need to have shared assemblies is weare using queued components from EnterpriseService namespace.

ILN

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:Z$**************@cpmsftngxa06.phx.gbl...
ILN,

That article is not entirely accurate. As long as you don't make a change that causes the assembly hash value to change, you can update a new

version
of the assembly in the GAC and the ASP.NET application will automatically use the new version without changing anything. (It should be noted that you do still have to reload the app domain.)

What changes the hash value? If you change the assembly name, the majoror
minor version, the public key token, or the culture, the hash value
will change. As long as you don't modify any one of these, you would use the following procedure to update the assembly in the GAC.

1. Run sn to create a new verification entry for the new version. Do

that
as
follows:

sn -Vr <assembly>

2. Run Gacutil to reinstall the assembly as follows:

gacutil /nologo /if <assembly>

Once you do that, simply open the web.config, add a new blank line, and
save the web.config. That will force a reload of the app domain and your application will use the new assembly.

If you have changed the hash value by changing one of the above, the
easiest way to force your application to use the new version in cases

where
you can't redirect the assembly binding in a configuration file is to use
a
publisher policy assembly. Most people will say that you should use a
publisher policy file, but that's not entirely accurate. The publisher
policy file is used to create the publisher policy assembly, and it's
actually the publisher policy assembly that redirects the binding.

Here is an example of doing this. In this example, my assembly is

called jcGAC.dll and I am changing the version number from 1.0.0.0 to 2.0.0.0.

1. Change code in version 1.0.0.0 of the assembly.

2. Change version number in assemblyinfo.cs to reflect new version.

3. Rebuild assembly.

4. Create publisher policy file in any text editor. You will need to replace "<public_key>" with the public key for your version 1.0 assembly.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="jcGAC"
publicKeyToken="<public_key>"
culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

5. Use al to create the publisher policy assembly. The publisher

policy assembly MUST have the following file format:
policy.major_ver.minor_ver.assembly.dll

The major and minor version shown here would be the major and minor
versions for your original version, not the updated new version. Below is an example of the command entered to create the publisher policy assembly for my assembly jcGAC.dll using the keyfile jcgac.snk. Note that the
publisher policy file in created in step 4 was saved as pub.config.

al /link:pub.config /out:policy.1.0.jcGAC.dll /keyfile:jcgac.snk
6. Install publisher policy assembly into the GAC.

gacutil /i policy.2.0.jcGAC.dll

7. Install version 2.0.0.0 of your assembly into the GAC.

gacutil /i jcGAC.dll

8. Restart the app domains by either saving a change to the

machine.config
or by resetting IIS.

9. Run the ASP.NET app.

After taking these steps, any ASP.NET application that originally
referenced version 1.0.0.0 will now bind to version 2.0.0.0.
Assembly binding is a fairly complex subject, but I hope that this helps explain a bit.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Invalidlastname" <in*************@toomanyvalidations.page>
>References: <um*************@tk2msftngp13.phx.gbl>
<0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
>Subject: Re: ASP.NET and shared assemblies
>Date: Tue, 2 Dec 2003 11:09:34 -0500
>Lines: 349
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <ec**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: dc.cvent.com 65.117.187.221
>Path:


cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10

Nov 18 '05 #9
ILN,

You are very welcome. That's my day job. :) I'm glad the info helped.
We want developers to understand as much as possible about the internal
implementation of ASP.NET.

Here's a good article that might help as well:

http://msdn.microsoft.com/library/de...us/dnvbdev01/h
tml/vb01g10.asp

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Invalidlastname" <in*************@toomanyvalidations.page>
References: <um*************@tk2msftngp13.phx.gbl> <0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
<ec**************@TK2MSFTNGP10.phx.gbl>
<Z$**************@cpmsftngxa06.phx.gbl>
<eS**************@TK2MSFTNGP10.phx.gbl>
<iF**************@cpmsftngxa06.phx.gbl>Subject: Re: ASP.NET and shared assemblies
Date: Thu, 4 Dec 2003 09:06:49 -0500
Lines: 216
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.0
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Message-ID: <#D**************@TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: dc.cvent.com 65.117.187.221
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP11.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:194372
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Jim,
Again, thank you for giving me such detailed explanations. It is really
helpful.

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:iF**************@cpmsftngxa06.phx.gbl...
ILN,

Yes, you would have to reload the app domain. ASP.NET is written
explicitly so that it doesn't rebind to assemblies directly on each need.
If it had to do that, it would cause a critical bottleneck.

The first thing that happens in the binding order is that the CLR says,
"Have I bound to this assembly already?" If the answer is Yes, it simply
uses the previous binding.

Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: "Invalidlastname" <in*************@toomanyvalidations.page>
>References: <um*************@tk2msftngp13.phx.gbl>

<0C**************@cpmsftngxa06.phx.gbl>
<ut**************@tk2msftngp13.phx.gbl>
<ec**************@TK2MSFTNGP10.phx.gbl>
<Z$**************@cpmsftngxa06.phx.gbl>
>Subject: Re: ASP.NET and shared assemblies
>Date: Wed, 3 Dec 2003 11:26:10 -0500
>Lines: 527
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3790.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Message-ID: <eS**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: dc.cvent.com 65.117.187.221
>Path:

cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary Varga | last post by:
I have an application which runs on both CE.NET and the full framework. To allow for a shared code base the following describes the assembly structure: 1) There is an executable binary for each...
1
by: Dan | last post by:
Here's a scenario I'd like to discuss in order to setup my VS.NET IDE properly and be able to prepare a distribution: a) I have a windows forms C# app using 3 shared assemblies I developed to...
1
by: Tim Kohler | last post by:
I'm having a problem with shared assemblies > 2^16 bytes in size. My assembly is in a solution along with a console app that references the assembly. The app is set up to reference the assembly...
0
by: RadekP | last post by:
Hi Gurus .. I would really appreciate some insights for the problem that bugs me for quite some time. I keep my custom controls in their own shared (private/public key signed) assembly. I need...
0
by: Raffi Basmajian | last post by:
I am trying to understand the difference between signing ClickOnce manifests and signing shared assemblies. My company is building .Net 2005 WinForm applications for internal company use only....
7
by: tony | last post by:
Hello! Can somebody tell me exactly when do I use GAC where shared assembly dll is stored. //Tony
0
by: Tony Johansson | last post by:
Hello! Can somebody give me a hint when to use private assemblies and when to use shared assemblies ? One mode thing will shared assemblies alwayse be put in the GAC(global assembly cach) ? ...
3
by: Tony Johansson | last post by:
Hello! I just want to check with you if .NET assemblies consist of only shared assemblies ? It must be shared assemblies because you never copies these assemblies to the folder where your...
16
by: MA | last post by:
Hi, We have added a shared assembly in GAC so that our multiple solutions can use use it. We use the publisher policy to controls the different versions of the assembly. This shared assembly...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.