Groups | Blog | Home
all groups > dotnet component services > october 2003 >

dotnet component services : Restart of VS.NET demands re-registration of components?



Slava Gurevich
10/22/2003 5:53:19 AM
1)Fix the assembly version, for example
<Assembly: AssemblyVersion("1.0.0.0")>

2) add Guid attribute to the classes and interfaces.

Slava Gurevich

[quoted text, click to view]
Jonas
10/22/2003 8:50:10 AM
Hi!

I'm developing an ASP.NET application using EnterpriseServices for business
and data layer components. Each time I restart VS.NET, I have to delete all
components from my COM+ application and reregister them, otherwise I get the
following message when I try to start a new debug session from within
VS.NET:

Failed to register assembly 'users.biz, Version=1.0.1390.13883,
Culture=neutral, PublicKeyToken=69760308791fe826'.
If I start the web application directly from Internet Explorer, it works
fine. This is the AssemblyInfo.vb for 'users.biz'

<Assembly: AssemblyKeyFileAttribute("C:\MyApp.snk")>
<Assembly: ApplicationNameAttribute("MyApp")>
<Assembly: DescriptionAttribute("MyApp")>
<Assembly: ApplicationActivation(ActivationOption.Server)>
<Assembly: ApplicationAccessControl(Value:=True,
AccessChecksLevel:=AccessChecksLevelOption.Application,
Authentication:=AuthenticationOption.Packet,
impersonationlevel:=ImpersonationLevelOption.Identify)>
<Assembly: SecurityRole("MyApp Users")>
<Assembly: CLSCompliant(True)>
'The following GUID is for the ID of the typelib if this project is exposed
to COM
<Assembly: Guid("B2E82158-CA02-4B96-A108-A5B4FC5EFF02")>
<Assembly: AssemblyVersion("1.0.*")>

And the classes in the assembly are declared as follows:

<ObjectPooling(Enabled:=True, MinPoolSize:=0, MaxPoolSize:=10,
CreationTimeout:=20000), _
TransactionAttribute(TransactionOption.Supported), _
JustInTimeActivation(True), EventTrackingEnabled(True), _
SecurityRole("MyApp Users")> _
Public Class MyClass
..
..
..


Any tips?

Brgds

Jonas

Slava Gurevich
10/23/2003 8:14:53 AM
inline

[quoted text, click to view]
It should be fine. Once you have your interfaces defined you should
fix the GUIDs.

[quoted text, click to view]
Yes

[quoted text, click to view]
Jonas
10/23/2003 10:47:11 AM
Ok, thanks for your answer. As I understand it this will remove the need to
reregister components while developing. Are there any disadvantages when I
later put my components into production? Can I still have a fixed GUID and
only change the version no?

Brgds

Jonas

[quoted text, click to view]

AddThis Social Bookmark Button