Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / October 2003

Tip: Looking for answers? Try searching our database.

Restart of VS.NET demands re-registration of components?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonas - 22 Oct 2003 07:50 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.