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 - 22 Oct 2003 10:53 GMT
1)Fix the assembly version, for example
<Assembly: AssemblyVersion("1.0.0.0")>
2) add Guid attribute to the classes and interfaces.
Slava Gurevich
>Hi!
>
[quoted text clipped - 41 lines]
>
>Jonas
Jonas - 23 Oct 2003 09:47 GMT
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
> 1)Fix the assembly version, for example
> <Assembly: AssemblyVersion("1.0.0.0")>
[quoted text clipped - 48 lines]
> >
> >Jonas
Slava Gurevich - 23 Oct 2003 13:14 GMT
inline
>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?
It should be fine. Once you have your interfaces defined you should
fix the GUIDs.
> Can I still have a fixed GUID and
>only change the version no?
Yes
>Brgds
>
[quoted text clipped - 56 lines]
>> >
>> >Jonas