all groups > dotnet component services > september 2003 >
You're in the

dotnet component services

group:

COM+ problems when going from VS 2002 -> 2003


COM+ problems when going from VS 2002 -> 2003 j_a_gbg NO[at]SPAM hotmail.com
9/26/2003 5:23:15 AM
dotnet component services:
Hi,

After upgrading to VS 2003 I cannot get a simple COM+ serviced
component (VB.NET) to work on my test server (W2K SP4). On my
development machine (XP Pro) it works just fine and if I use the same
code in VS 2002 it works fine on the server.

The problem:

I have a small client which calls my component (using lazy
registration) and at the first call I get the following error:

The system cannot find the file specified.
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type
serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj)
at complustest.Form1.Button1_Click(Object sender, EventArgs e) in
C:\Form1.vb:line 83

Then, if I call the component again I get this:

No such interface supported
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type
serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj)
at complustest.Form1.Button1_Click(Object sender, EventArgs e) in
C:\Form1.vb:line 83

The code on line 83 in Form1.vb is this: Dim x As New
compluslib.Transaction1

The code in the serviced component is:

Imports System.EnterpriseServices
Imports System

<Assembly: ApplicationActivation(ActivationOption.Library)>
<Assembly: ApplicationAccessControl(False)>

<Transaction(TransactionOption.Required), _
EventTrackingEnabled(True)> _
Public Class Transaction1
Inherits ServicedComponent

Public Function MySub() As Integer
Try
Return 2003
Catch ex As Exception
ContextUtil.SetComplete()
Finally
ContextUtil.SetAbort()
End Try
End Function
End Class

When I take a look in Component Services at the server the component
is installed but the ApplicationAccessControl seems to be enabled even
though I disabled it. Don't know if that has anything to do with the
problem, but it's strange...

Any help is appreciated since this prevents me from upgrading my
customers' applications.

TIA

Re: COM+ problems when going from VS 2002 -> 2003 Slava Gurevich
9/26/2003 11:02:16 PM
Are you able to register your component in COM+ statically with
regsvcs.exe ?

[quoted text, click to view]
Re: COM+ problems when going from VS 2002 -> 2003 Jeppe A
9/27/2003 1:27:24 PM
Thanks for your reply.

The errors disappeared after I re-installed .NET Framework 1.1, but one
question still remains and that's why the authentication/authorization
checkboxes on the COM+ application are checked when I use dynamic
registration and not checked when I use static registration. Do I have
to set more attributes or could it be a COM+ bug?

/Jeppe



*** Sent via Developersdex http://www.developersdex.com ***
Re: COM+ problems when going from VS 2002 -> 2003 Slava Gurevich
9/27/2003 11:17:41 PM
As far as I know the in-code settings via attributes override the
declarative settings in COM+. Just add it to the code if you always
need it set in a specific way.

Slava Gurevich

On Sat, 27 Sep 2003 13:27:24 -0700, Jeppe A <j_a_gbg@hotmail.com>
[quoted text, click to view]
AddThis Social Bookmark Button