all groups > dotnet distributed apps > april 2008 >
dotnet distributed apps :
My Serviced component doesn't expose any methods!
Hello, PLs help: I have a component written in VB2005. It contains a class that inherits System.EnterpriseServices.ServicedComponent. The class contains a default constructor without any parameters or implementation. It also contains several public instance methods. The component installs as a COM+ application under Component Services on an XP machine, with all interfaces present. However, the class interface (_classname) exposes no methods at all! Could anyone please advice on how to address this.
Hi Karre, From your description, you're encountering some error when try calling a ..NET serviced component ,correct? Based on my experience, for serviced component, you can check the following things to see whether there is anything incorrect: ** the attributes and class/method setting in the serviced component asssembly. Have you marked the class and methods as public, whether the class is COM visible or have you apply a strong-name for the assembly ** the deployment of the serviced component assembly. Whether you've added the assemly into GAC(better to do this), and did you use regsvcs to explicitly install it(any error or warning occurs)? Here is a simple test serviced component I've used which worked correct on a local XP box: ================================ Imports System.EnterpriseServices Imports System.Data.SqlClient Imports System.IO Imports System.Runtime.InteropServices <ComVisible(True)> _ <Transaction(TransactionOption.RequiresNew)> _ Public Class VBServCom Inherits EnterpriseServices.ServicedComponent Public Sub New() End Sub <AutoComplete()> _ Public Sub DoTxAuto() Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) sw.Close() End Sub End Class ================================ ========in assemblyInfo,vb=============== <Assembly: ComVisible(False)> <Assembly: ApplicationActivation(ActivationOption.Library)> <Assembly: ApplicationName("SimpleTrans")> <Assembly: Description("Simple Transactional application to show Enterprise Services")> ============ also, I applied a strong-name to the assembly and installed it into GAC. here is another web thread mentioend some potential problem which may be also helpful: #ServicedComponent RegistrationException - Invalid Derived Classes http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- [quoted text, click to view] >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >Subject: My Serviced component doesn't expose any methods! >Date: Thu, 3 Apr 2008 04:11:02 -0700 > >Hello, >PLs help: >I have a component written in VB2005. It contains a class that inherits >System.EnterpriseServices.ServicedComponent. >The class contains a default constructor without any parameters or >implementation. >It also contains several public instance methods. >The component installs as a COM+ application under Component Services on an >XP machine, with all interfaces present. >However, the class interface (_classname) exposes no methods at all! >Could anyone please advice on how to address this. > >Thankx in advance! >
I believe COMVisible attribute is what I forgot! I'll check on Monday! Thanks! [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Hi Karre, > > From your description, you're encountering some error when try calling a > .NET serviced component ,correct? > > Based on my experience, for serviced component, you can check the following > things to see whether there is anything incorrect: > > ** the attributes and class/method setting in the serviced component > asssembly. Have you marked the class and methods as public, whether the > class is COM visible or have you apply a strong-name for the assembly > > ** the deployment of the serviced component assembly. Whether you've added > the assemly into GAC(better to do this), and did you use regsvcs to > explicitly install it(any error or warning occurs)? > > Here is a simple test serviced component I've used which worked correct on > a local XP box: > > ================================ > Imports System.EnterpriseServices > Imports System.Data.SqlClient > Imports System.IO > Imports System.Runtime.InteropServices > > <ComVisible(True)> _ > <Transaction(TransactionOption.RequiresNew)> _ > Public Class VBServCom > Inherits EnterpriseServices.ServicedComponent > > Public Sub New() > > > End Sub > > <AutoComplete()> _ > Public Sub DoTxAuto() > > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > sw.Close() > > End Sub > > End Class > > > ================================ > > > ========in assemblyInfo,vb=============== > > <Assembly: ComVisible(False)> > <Assembly: ApplicationActivation(ActivationOption.Library)> > <Assembly: ApplicationName("SimpleTrans")> > <Assembly: Description("Simple Transactional application to show Enterprise > Services")> > > ============ > > also, I applied a strong-name to the assembly and installed it into GAC. > > here is another web thread mentioend some potential problem which may be > also helpful: > > #ServicedComponent RegistrationException - Invalid Derived Classes > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >Subject: My Serviced component doesn't expose any methods! > >Date: Thu, 3 Apr 2008 04:11:02 -0700 > > > > >Hello, > >PLs help: > >I have a component written in VB2005. It contains a class that inherits > >System.EnterpriseServices.ServicedComponent. > >The class contains a default constructor without any parameters or > >implementation. > >It also contains several public instance methods. > >The component installs as a COM+ application under Component Services on > an > >XP machine, with all interfaces present. > >However, the class interface (_classname) exposes no methods at all! > >Could anyone please advice on how to address this. > > > >Thankx in advance! > > >
Thanks for your reply Karre, BTW, you can apply ComVisible attribute at both class level and assembly level, make sure you properly set both ones. You can refer to the examples I pasted previously. Feel free to let me know if you've got it resolved. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. [quoted text, click to view] >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> <JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> >Subject: RE: My Serviced component doesn't expose any methods! >Date: Fri, 4 Apr 2008 10:25:00 -0700 49 >X-Tomcat-NG: microsoft.public.dotnet.distributed_apps > >I believe COMVisible attribute is what I forgot! >I'll check on Monday! >Thanks! > >"Steven Cheng [MSFT]" wrote: > >> Hi Karre, >> >> From your description, you're encountering some error when try calling a >> .NET serviced component ,correct? >> >> Based on my experience, for serviced component, you can check the following >> things to see whether there is anything incorrect: >> >> ** the attributes and class/method setting in the serviced component >> asssembly. Have you marked the class and methods as public, whether the >> class is COM visible or have you apply a strong-name for the assembly >> >> ** the deployment of the serviced component assembly. Whether you've added >> the assemly into GAC(better to do this), and did you use regsvcs to >> explicitly install it(any error or warning occurs)? >> >> Here is a simple test serviced component I've used which worked correct on >> a local XP box: >> >> ================================ >> Imports System.EnterpriseServices >> Imports System.Data.SqlClient >> Imports System.IO >> Imports System.Runtime.InteropServices >> >> <ComVisible(True)> _ >> <Transaction(TransactionOption.RequiresNew)> _ >> Public Class VBServCom >> Inherits EnterpriseServices.ServicedComponent >> >> Public Sub New() >> >> >> End Sub >> >> <AutoComplete()> _ >> Public Sub DoTxAuto() >> >> Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") >> sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) >> sw.Close() >> >> End Sub >> >> End Class >> >> >> ================================ >> >> >> ========in assemblyInfo,vb=============== >> >> <Assembly: ComVisible(False)> >> <Assembly: ApplicationActivation(ActivationOption.Library)> >> <Assembly: ApplicationName("SimpleTrans")> >> <Assembly: Description("Simple Transactional application to show Enterprise >> Services")> >> >> ============ >> >> also, I applied a strong-name to the assembly and installed it into GAC. >> >> here is another web thread mentioend some potential problem which may be >> also helpful: >> >> #ServicedComponent RegistrationException - Invalid Derived Classes >> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 >> >> Sincerely, >> >> Steven Cheng >> >> Microsoft MSDN Online Support Lead >> >> >> Delighting our customers is our #1 priority. We welcome your comments and >> suggestions about how we can improve the support we provide to you. Please >> feel free to let my manager know what you think of the level of service >> provided. You can send feedback directly to my manager at: >> msdnmg@microsoft.com. >> >> ================================================== >> Get notification to my posts through email? Please refer to >> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif >> ications. >> >> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues >> where an initial response from the community or a Microsoft Support >> Engineer within 1 business day is acceptable. Please note that each follow >> up response may take approximately 2 business days as the support >> professional working with you may need further investigation to reach the >> most efficient resolution. The offering is not appropriate for situations >> that require urgent, real-time or phone-based interactions or complex >> project analysis and dump analysis issues. Issues of this nature are best >> handled working with a dedicated Microsoft Support Engineer by contacting >> Microsoft Customer Support Services (CSS) at >> http://msdn.microsoft.com/subscriptions/support/default.aspx. >> ================================================== >> This posting is provided "AS IS" with no warranties, and confers no rights. >> -------------------- >> >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >> >Subject: My Serviced component doesn't expose any methods! >> >Date: Thu, 3 Apr 2008 04:11:02 -0700 >> >> > >> >Hello, >> >PLs help: >> >I have a component written in VB2005. It contains a class that inherits >> >System.EnterpriseServices.ServicedComponent. >> >The class contains a default constructor without any parameters or >> >implementation. >> >It also contains several public instance methods. >> >The component installs as a COM+ application under Component Services on >> an >> >XP machine, with all interfaces present. >> >However, the class interface (_classname) exposes no methods at all! >> >Could anyone please advice on how to address this. >> > >> >Thankx in advance! >> > >> >> >
I'm not sure if my previous post disappeared: When using regsvcs I get a Warning: "The assembly does not declare an ApplicationAccessControl Attribute. Application security will be enabled by default. No matter how I apply these settings I get the same warning. ? /kk [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Hi Karre, > > From your description, you're encountering some error when try calling a > .NET serviced component ,correct? > > Based on my experience, for serviced component, you can check the following > things to see whether there is anything incorrect: > > ** the attributes and class/method setting in the serviced component > asssembly. Have you marked the class and methods as public, whether the > class is COM visible or have you apply a strong-name for the assembly > > ** the deployment of the serviced component assembly. Whether you've added > the assemly into GAC(better to do this), and did you use regsvcs to > explicitly install it(any error or warning occurs)? > > Here is a simple test serviced component I've used which worked correct on > a local XP box: > > ================================ > Imports System.EnterpriseServices > Imports System.Data.SqlClient > Imports System.IO > Imports System.Runtime.InteropServices > > <ComVisible(True)> _ > <Transaction(TransactionOption.RequiresNew)> _ > Public Class VBServCom > Inherits EnterpriseServices.ServicedComponent > > Public Sub New() > > > End Sub > > <AutoComplete()> _ > Public Sub DoTxAuto() > > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > sw.Close() > > End Sub > > End Class > > > ================================ > > > ========in assemblyInfo,vb=============== > > <Assembly: ComVisible(False)> > <Assembly: ApplicationActivation(ActivationOption.Library)> > <Assembly: ApplicationName("SimpleTrans")> > <Assembly: Description("Simple Transactional application to show Enterprise > Services")> > > ============ > > also, I applied a strong-name to the assembly and installed it into GAC. > > here is another web thread mentioend some potential problem which may be > also helpful: > > #ServicedComponent RegistrationException - Invalid Derived Classes > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >Subject: My Serviced component doesn't expose any methods! > >Date: Thu, 3 Apr 2008 04:11:02 -0700 > > > > >Hello, > >PLs help: > >I have a component written in VB2005. It contains a class that inherits > >System.EnterpriseServices.ServicedComponent. > >The class contains a default constructor without any parameters or > >implementation. > >It also contains several public instance methods. > >The component installs as a COM+ application under Component Services on > an > >XP machine, with all interfaces present. > >However, the class interface (_classname) exposes no methods at all! > >Could anyone please advice on how to address this. > > > >Thankx in advance! > > >
Error code 80020009 turned up at one try, when trying to install into COM+. [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Thanks for your reply Karre, > > BTW, you can apply ComVisible attribute at both class level and assembly > level, make sure you properly set both ones. You can refer to the examples > I pasted previously. Feel free to let me know if you've got it resolved. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> > <JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> > >Subject: RE: My Serviced component doesn't expose any methods! > >Date: Fri, 4 Apr 2008 10:25:00 -0700 > 49 > >X-Tomcat-NG: microsoft.public.dotnet.distributed_apps > > > >I believe COMVisible attribute is what I forgot! > >I'll check on Monday! > >Thanks! > > > >"Steven Cheng [MSFT]" wrote: > > > >> Hi Karre, > >> > >> From your description, you're encountering some error when try calling a > >> .NET serviced component ,correct? > >> > >> Based on my experience, for serviced component, you can check the > following > >> things to see whether there is anything incorrect: > >> > >> ** the attributes and class/method setting in the serviced component > >> asssembly. Have you marked the class and methods as public, whether the > >> class is COM visible or have you apply a strong-name for the assembly > >> > >> ** the deployment of the serviced component assembly. Whether you've > added > >> the assemly into GAC(better to do this), and did you use regsvcs to > >> explicitly install it(any error or warning occurs)? > >> > >> Here is a simple test serviced component I've used which worked correct > on > >> a local XP box: > >> > >> ================================ > >> Imports System.EnterpriseServices > >> Imports System.Data.SqlClient > >> Imports System.IO > >> Imports System.Runtime.InteropServices > >> > >> <ComVisible(True)> _ > >> <Transaction(TransactionOption.RequiresNew)> _ > >> Public Class VBServCom > >> Inherits EnterpriseServices.ServicedComponent > >> > >> Public Sub New() > >> > >> > >> End Sub > >> > >> <AutoComplete()> _ > >> Public Sub DoTxAuto() > >> > >> Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > >> sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > >> sw.Close() > >> > >> End Sub > >> > >> End Class > >> > >> > >> ================================ > >> > >> > >> ========in assemblyInfo,vb=============== > >> > >> <Assembly: ComVisible(False)> > >> <Assembly: ApplicationActivation(ActivationOption.Library)> > >> <Assembly: ApplicationName("SimpleTrans")> > >> <Assembly: Description("Simple Transactional application to show > Enterprise > >> Services")> > >> > >> ============ > >> > >> also, I applied a strong-name to the assembly and installed it into GAC. > >> > >> here is another web thread mentioend some potential problem which may be > >> also helpful: > >> > >> #ServicedComponent RegistrationException - Invalid Derived Classes > >> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > >> > >> Sincerely, > >> > >> Steven Cheng > >> > >> Microsoft MSDN Online Support Lead > >> > >> > >> Delighting our customers is our #1 priority. We welcome your comments > and > >> suggestions about how we can improve the support we provide to you. > Please > >> feel free to let my manager know what you think of the level of service > >> provided. You can send feedback directly to my manager at: > >> msdnmg@microsoft.com. > >> > >> ================================================== > >> Get notification to my posts through email? Please refer to > >> > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > >> ications. > >> > >> Note: The MSDN Managed Newsgroup support offering is for non-urgent > issues > >> where an initial response from the community or a Microsoft Support > >> Engineer within 1 business day is acceptable. Please note that each > follow > >> up response may take approximately 2 business days as the support > >> professional working with you may need further investigation to reach > the > >> most efficient resolution. The offering is not appropriate for > situations > >> that require urgent, real-time or phone-based interactions or complex > >> project analysis and dump analysis issues. Issues of this nature are > best > >> handled working with a dedicated Microsoft Support Engineer by > contacting > >> Microsoft Customer Support Services (CSS) at > >> http://msdn.microsoft.com/subscriptions/support/default.aspx. > >> ================================================== > >> This posting is provided "AS IS" with no warranties, and confers no > rights. > >> -------------------- > >> >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >> >Subject: My Serviced component doesn't expose any methods! > >> >Date: Thu, 3 Apr 2008 04:11:02 -0700 > >> > >> > > >> >Hello, > >> >PLs help: > >> >I have a component written in VB2005. It contains a class that inherits > >> >System.EnterpriseServices.ServicedComponent. > >> >The class contains a default constructor without any parameters or > >> >implementation. > >> >It also contains several public instance methods. > >> >The component installs as a COM+ application under Component Services > on > >> an > >> >XP machine, with all interfaces present. > >> >However, the class interface (_classname) exposes no methods at all! > >> >Could anyone please advice on how to address this. > >> > > >> >Thankx in advance! > >> > > >> > >> > > >
Intriguing: I backed down, tried to install your sample component in my COM+. gacutil returns "Assembly successfully added to the cache." regsvcs returns "WARNING: The assembly does not declare an ApplicationAccessControl Attribute. Application security will be enabled by default." !!! So, is it my environment? Some setting from my VB6 COM+ component? Or what? ? /kk [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Hi Karre, > > From your description, you're encountering some error when try calling a > .NET serviced component ,correct? > > Based on my experience, for serviced component, you can check the following > things to see whether there is anything incorrect: > > ** the attributes and class/method setting in the serviced component > asssembly. Have you marked the class and methods as public, whether the > class is COM visible or have you apply a strong-name for the assembly > > ** the deployment of the serviced component assembly. Whether you've added > the assemly into GAC(better to do this), and did you use regsvcs to > explicitly install it(any error or warning occurs)? > > Here is a simple test serviced component I've used which worked correct on > a local XP box: > > ================================ > Imports System.EnterpriseServices > Imports System.Data.SqlClient > Imports System.IO > Imports System.Runtime.InteropServices > > <ComVisible(True)> _ > <Transaction(TransactionOption.RequiresNew)> _ > Public Class VBServCom > Inherits EnterpriseServices.ServicedComponent > > Public Sub New() > > > End Sub > > <AutoComplete()> _ > Public Sub DoTxAuto() > > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > sw.Close() > > End Sub > > End Class > > > ================================ > > > ========in assemblyInfo,vb=============== > > <Assembly: ComVisible(False)> > <Assembly: ApplicationActivation(ActivationOption.Library)> > <Assembly: ApplicationName("SimpleTrans")> > <Assembly: Description("Simple Transactional application to show Enterprise > Services")> > > ============ > > also, I applied a strong-name to the assembly and installed it into GAC. > > here is another web thread mentioend some potential problem which may be > also helpful: > > #ServicedComponent RegistrationException - Invalid Derived Classes > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >Subject: My Serviced component doesn't expose any methods! > >Date: Thu, 3 Apr 2008 04:11:02 -0700 > > > > >Hello, > >PLs help: > >I have a component written in VB2005. It contains a class that inherits > >System.EnterpriseServices.ServicedComponent. > >The class contains a default constructor without any parameters or > >implementation. > >It also contains several public instance methods. > >The component installs as a COM+ application under Component Services on > an > >XP machine, with all interfaces present. > >However, the class interface (_classname) exposes no methods at all! > >Could anyone please advice on how to address this. > > > >Thankx in advance! > > >
....and afterwards gacutil cannot uninstall it! Number of files: 0 Gaaaaaaaaah! [quoted text, click to view] "kkarre" wrote: > Intriguing: > I backed down, tried to install your sample component in my COM+. > gacutil returns "Assembly successfully added to the cache." > regsvcs returns "WARNING: The assembly does not declare an > ApplicationAccessControl Attribute. Application security will be enabled by > default." > > !!! > So, is it my environment? > Some setting from my VB6 COM+ component? > Or what? > ? > /kk > > "Steven Cheng [MSFT]" wrote: > > > Hi Karre, > > > > From your description, you're encountering some error when try calling a > > .NET serviced component ,correct? > > > > Based on my experience, for serviced component, you can check the following > > things to see whether there is anything incorrect: > > > > ** the attributes and class/method setting in the serviced component > > asssembly. Have you marked the class and methods as public, whether the > > class is COM visible or have you apply a strong-name for the assembly > > > > ** the deployment of the serviced component assembly. Whether you've added > > the assemly into GAC(better to do this), and did you use regsvcs to > > explicitly install it(any error or warning occurs)? > > > > Here is a simple test serviced component I've used which worked correct on > > a local XP box: > > > > ================================ > > Imports System.EnterpriseServices > > Imports System.Data.SqlClient > > Imports System.IO > > Imports System.Runtime.InteropServices > > > > <ComVisible(True)> _ > > <Transaction(TransactionOption.RequiresNew)> _ > > Public Class VBServCom > > Inherits EnterpriseServices.ServicedComponent > > > > Public Sub New() > > > > > > End Sub > > > > <AutoComplete()> _ > > Public Sub DoTxAuto() > > > > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > > sw.Close() > > > > End Sub > > > > End Class > > > > > > ================================ > > > > > > ========in assemblyInfo,vb=============== > > > > <Assembly: ComVisible(False)> > > <Assembly: ApplicationActivation(ActivationOption.Library)> > > <Assembly: ApplicationName("SimpleTrans")> > > <Assembly: Description("Simple Transactional application to show Enterprise > > Services")> > > > > ============ > > > > also, I applied a strong-name to the assembly and installed it into GAC. > > > > here is another web thread mentioend some potential problem which may be > > also helpful: > > > > #ServicedComponent RegistrationException - Invalid Derived Classes > > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > > > > Sincerely, > > > > Steven Cheng > > > > Microsoft MSDN Online Support Lead > > > > > > Delighting our customers is our #1 priority. We welcome your comments and > > suggestions about how we can improve the support we provide to you. Please > > feel free to let my manager know what you think of the level of service > > provided. You can send feedback directly to my manager at: > > msdnmg@microsoft.com. > > > > ================================================== > > Get notification to my posts through email? Please refer to > > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > > ications. > > > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > > where an initial response from the community or a Microsoft Support > > Engineer within 1 business day is acceptable. Please note that each follow > > up response may take approximately 2 business days as the support > > professional working with you may need further investigation to reach the > > most efficient resolution. The offering is not appropriate for situations > > that require urgent, real-time or phone-based interactions or complex > > project analysis and dump analysis issues. Issues of this nature are best > > handled working with a dedicated Microsoft Support Engineer by contacting > > Microsoft Customer Support Services (CSS) at > > http://msdn.microsoft.com/subscriptions/support/default.aspx. > > ================================================== > > This posting is provided "AS IS" with no warranties, and confers no rights. > > -------------------- > > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > > >Subject: My Serviced component doesn't expose any methods! > > >Date: Thu, 3 Apr 2008 04:11:02 -0700 > > > > > > > >Hello, > > >PLs help: > > >I have a component written in VB2005. It contains a class that inherits > > >System.EnterpriseServices.ServicedComponent. > > >The class contains a default constructor without any parameters or > > >implementation. > > >It also contains several public instance methods. > > >The component installs as a COM+ application under Component Services on > > an > > >XP machine, with all interfaces present. > > >However, the class interface (_classname) exposes no methods at all! > > >Could anyone please advice on how to address this. > > > > > >Thankx in advance! > > > > >
Hi Steven, thanks for your reply! I did apply the <Assembly: ApplicationAccessControl(AccessChecksLevelOption.Application)> setting in my component but somehow it didn't "stick". It seems to take a while, maybe today... Your component installs fine in GAC today, d&d or gacutil equally works fine. However when I add it to a COM+ application in Component Services there's trouble: I get all interfaces, including the class interface _TestClass. All interfaces show their methods EXCEPT the class interface. Am I adding it the wrong way? I use 'Install New Component' and I browse to the dll I used as original and drag'n'dropped it into GAC. The wizard won't let me select the one inside the GAC. As for VB6, my project is migrating a VB6 COM+ installed component of 30+ dlls. The code is now in VB2005 but I thought that the Upgrade Wizard might have brought a component setting or something from VB6 to VB2005. I've tried calling the component anyway but gets error of kind "couldn't create ActiveX component". This might be because the VB2005 dll references three COM components still in VS6/C++ through COMInterop. Perhaps it's impossible to use COMInterop inside COM+? Wouldn't be logical - that's the perfect place for COM Interop; large enterprise apps where you migrate step by step. I'd be happy to try your code on my machine to rule out funny policies or something on my machine. Thanks in advance! /kk [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Hi Kkarre, > > I'm sorry to hear that it still not work. As for the warning you mentioned > below: > > ========== > ns "WARNING: The assembly does not declare an > ApplicationAccessControl Attribute. Application security will be enabled by > default." > ======= > > I also got this warning since this is a simple test assembly. I ignored > this warning when testing. You can add the following attribute in > AssemblyInfo.vb file so as to eliminate the warning: > > ================= > <Assembly: ApplicationAccessControl(AccessChecksLevelOption.Application)> > ======================== > > Also, for gacutil, I haven't used it, but directly add/remove the > strong-named dll via drag/drop in the c:\windows\assembly folder. I've > also tried using GacUtil.exe to add/remove the assembly and it also worked. > BTW, as you mentioned: > > ============ > > So, is it my environment? > > Some setting from my VB6 COM+ component? > =========== > > i"m not sure whether there is anything involved VB6 here? So far my testing > is through a Enterprised component assembly created via VB.NET class > library project. For VB6 dll it can not be used via those .NET tools such > as GACutil or regsvcs > > If necessary, I can send you the test component I used on my side. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > -------------------- > >Thread-Topic: My Serviced component doesn't expose any methods! > >thread-index: AciYsCDKT7vfBb83QBiy8UQBhQBolg== > >X-WBNR-Posting-Host: 193.34.40.30 > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > > > > >...and afterwards gacutil cannot uninstall it! > >Number of files: 0 > >Gaaaaaaaaah! > > > >"kkarre" wrote: > > > >> Intriguing: > >> I backed down, tried to install your sample component in my COM+. > >> gacutil returns "Assembly successfully added to the cache." > >> regsvcs returns "WARNING: The assembly does not declare an > >> ApplicationAccessControl Attribute. Application security will be enabled > by > >> default." > >> > >> !!! > >> So, is it my environment? > >> Some setting from my VB6 COM+ component? > >> Or what? > >> ? > >> /kk > >> > >> "Steven Cheng [MSFT]" wrote: > >> > >> > Hi Karre, > >> > > >> > From your description, you're encountering some error when try calling > a > >> > .NET serviced component ,correct? > >> > > >> > Based on my experience, for serviced component, you can check the > following > >> > things to see whether there is anything incorrect: > >> > > >> > ** the attributes and class/method setting in the serviced component > >> > asssembly. Have you marked the class and methods as public, whether > the > >> > class is COM visible or have you apply a strong-name for the assembly > >> > > >> > ** the deployment of the serviced component assembly. Whether you've > added > >> > the assemly into GAC(better to do this), and did you use regsvcs to > >> > explicitly install it(any error or warning occurs)? > >> > > >> > Here is a simple test serviced component I've used which worked > correct on > >> > a local XP box: > >> > > >> > ================================ > >> > Imports System.EnterpriseServices > >> > Imports System.Data.SqlClient > >> > Imports System.IO > >> > Imports System.Runtime.InteropServices > >> > > >> > <ComVisible(True)> _ > >> > <Transaction(TransactionOption.RequiresNew)> _ > >> > Public Class VBServCom > >> > Inherits EnterpriseServices.ServicedComponent > >> > > >> > Public Sub New() > >> > > >> > > >> > End Sub > >> > > >> > <AutoComplete()> _ > >> > Public Sub DoTxAuto() > >> > > >> > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > >> > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > >> > sw.Close() > >> > > >> > End Sub > >> > > >> > End Class > >> > > >> > > >> > ================================ > >> > > >> > > >> > ========in assemblyInfo,vb=============== > >> > > >> > <Assembly: ComVisible(False)> > >> > <Assembly: ApplicationActivation(ActivationOption.Library)> > >> > <Assembly: ApplicationName("SimpleTrans")> > >> > <Assembly: Description("Simple Transactional application to show > Enterprise > >> > Services")> > >> > > >> > ============ > >> > > >> > also, I applied a strong-name to the assembly and installed it into > GAC. > >> > > >> > here is another web thread mentioend some potential problem which may > be > >> > also helpful: > >> > > >> > #ServicedComponent RegistrationException - Invalid Derived Classes > >> > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > >> > > >> > Sincerely, > >> > > >> > Steven Cheng > >> >
One step closer: I added ProgID attribute to your code and got my client to work! [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Hi Kkarre, > > I'm sorry to hear that it still not work. As for the warning you mentioned > below: > > ========== > ns "WARNING: The assembly does not declare an > ApplicationAccessControl Attribute. Application security will be enabled by > default." > ======= > > I also got this warning since this is a simple test assembly. I ignored > this warning when testing. You can add the following attribute in > AssemblyInfo.vb file so as to eliminate the warning: > > ================= > <Assembly: ApplicationAccessControl(AccessChecksLevelOption.Application)> > ======================== > > Also, for gacutil, I haven't used it, but directly add/remove the > strong-named dll via drag/drop in the c:\windows\assembly folder. I've > also tried using GacUtil.exe to add/remove the assembly and it also worked. > BTW, as you mentioned: > > ============ > > So, is it my environment? > > Some setting from my VB6 COM+ component? > =========== > > i"m not sure whether there is anything involved VB6 here? So far my testing > is through a Enterprised component assembly created via VB.NET class > library project. For VB6 dll it can not be used via those .NET tools such > as GACutil or regsvcs > > If necessary, I can send you the test component I used on my side. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > -------------------- > >Thread-Topic: My Serviced component doesn't expose any methods! > >thread-index: AciYsCDKT7vfBb83QBiy8UQBhQBolg== > >X-WBNR-Posting-Host: 193.34.40.30 > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > > > > >...and afterwards gacutil cannot uninstall it! > >Number of files: 0 > >Gaaaaaaaaah! > > > >"kkarre" wrote: > > > >> Intriguing: > >> I backed down, tried to install your sample component in my COM+. > >> gacutil returns "Assembly successfully added to the cache." > >> regsvcs returns "WARNING: The assembly does not declare an > >> ApplicationAccessControl Attribute. Application security will be enabled > by > >> default." > >> > >> !!! > >> So, is it my environment? > >> Some setting from my VB6 COM+ component? > >> Or what? > >> ? > >> /kk > >> > >> "Steven Cheng [MSFT]" wrote: > >> > >> > Hi Karre, > >> > > >> > From your description, you're encountering some error when try calling > a > >> > .NET serviced component ,correct? > >> > > >> > Based on my experience, for serviced component, you can check the > following > >> > things to see whether there is anything incorrect: > >> > > >> > ** the attributes and class/method setting in the serviced component > >> > asssembly. Have you marked the class and methods as public, whether > the > >> > class is COM visible or have you apply a strong-name for the assembly > >> > > >> > ** the deployment of the serviced component assembly. Whether you've > added > >> > the assemly into GAC(better to do this), and did you use regsvcs to > >> > explicitly install it(any error or warning occurs)? > >> > > >> > Here is a simple test serviced component I've used which worked > correct on > >> > a local XP box: > >> > > >> > ================================ > >> > Imports System.EnterpriseServices > >> > Imports System.Data.SqlClient > >> > Imports System.IO > >> > Imports System.Runtime.InteropServices > >> > > >> > <ComVisible(True)> _ > >> > <Transaction(TransactionOption.RequiresNew)> _ > >> > Public Class VBServCom > >> > Inherits EnterpriseServices.ServicedComponent > >> > > >> > Public Sub New() > >> > > >> > > >> > End Sub > >> > > >> > <AutoComplete()> _ > >> > Public Sub DoTxAuto() > >> > > >> > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") > >> > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) > >> > sw.Close() > >> > > >> > End Sub > >> > > >> > End Class > >> > > >> > > >> > ================================ > >> > > >> > > >> > ========in assemblyInfo,vb=============== > >> > > >> > <Assembly: ComVisible(False)> > >> > <Assembly: ApplicationActivation(ActivationOption.Library)> > >> > <Assembly: ApplicationName("SimpleTrans")> > >> > <Assembly: Description("Simple Transactional application to show > Enterprise > >> > Services")> > >> > > >> > ============ > >> > > >> > also, I applied a strong-name to the assembly and installed it into > GAC. > >> > > >> > here is another web thread mentioend some potential problem which may > be > >> > also helpful: > >> > > >> > #ServicedComponent RegistrationException - Invalid Derived Classes > >> > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 > >> > > >> > Sincerely, > >> > > >> > Steven Cheng > >> > > >> > Microsoft MSDN Online Support Lead > >> > > >> > > >> > Delighting our customers is our #1 priority. We welcome your comments > and > >> > suggestions about how we can improve the support we provide to you. > Please > >> > feel free to let my manager know what you think of the level of > service > >> > provided. You can send feedback directly to my manager at: > >> > msdnmg@microsoft.com. > >> > > >> > ================================================== > >> > Get notification to my posts through email? Please refer to > >> > > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > >> > ications. > >> > > >> > Note: The MSDN Managed Newsgroup support offering is for non-urgent > issues > >> > where an initial response from the community or a Microsoft Support > >> > Engineer within 1 business day is acceptable. Please note that each > follow > >> > up response may take approximately 2 business days as the support > >> > professional working with you may need further investigation to reach > the > >> > most efficient resolution. The offering is not appropriate for > situations > >> > that require urgent, real-time or phone-based interactions or complex > >> > project analysis and dump analysis issues. Issues of this nature are > best
I have used both regsvcs and the COM+ UI. regsvcs returns a happy message but I can't see the COM+ application that has the installed component. The people that will maintain this solution wanted to see the COM+ application and components/interface/methods in it, so I tried that with COM+ Management console. I'll try to read up on regsvcs to see how COM+ Management Console can show the installed component! Thanks! [quoted text, click to view] "Steven Cheng [MSFT]" wrote: > Thanks for your reply Karre, > > So the problem is at the Com+ registring stage. Why did you manually > register it into COM+ applications? As I mentioned in previous messages, > in my test, I used the .NET framework regsvcs.exe tool to install the > serviced component into COM+ applications. > > #.NET Services Installation Tool (Regsvcs.exe) > http://msdn2.microsoft.com/en-us/library/04za0hca(VS.80).aspx > > The command is quite simple. For example, for my case the serviced > component is named "SVCCOMLib.dll", I just run the following command in > Visual Studio command prompt: > > regsvcs.exe SVCCOMLib.dll > > and it will automatically do all the things without requiring me to do > anything in the COM+ management console. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msdnmg@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > This posting is provided "AS IS" with no warranties, and confers no rights. > -------------------- > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> > <JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> > <6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> > <6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> > <gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> > >Subject: RE: My Serviced component doesn't expose any methods! > >Date: Tue, 8 Apr 2008 00:24:00 -0700 > > > > >Hi Steven, thanks for your reply! > >I did apply the <Assembly: > >ApplicationAccessControl(AccessChecksLevelOption.Application)> setting in > my > >component > >but somehow it didn't "stick". It seems to take a while, maybe today... > >Your component installs fine in GAC today, d&d or gacutil equally works > fine. > >However when I add it to a COM+ application in Component Services there's > >trouble: I get all interfaces, including the class interface _TestClass. > >All interfaces show their methods EXCEPT the class interface. > > > >Am I adding it the wrong way? I use 'Install New Component' and I browse > to > >the > >dll I used as original and drag'n'dropped it into GAC. The wizard won't > let > >me select the one inside the GAC. > > > >As for VB6, my project is migrating a VB6 COM+ installed component of 30+ > >dlls. > >The code is now in VB2005 but I thought that the Upgrade Wizard might have > >brought a component setting or something from VB6 to VB2005. > > > >I've tried calling the component anyway but gets error of kind > >"couldn't create ActiveX component". This might be because the VB2005 dll > >references three COM components still in VS6/C++ through COMInterop. > >Perhaps it's impossible to use COMInterop inside COM+? > >Wouldn't be logical - that's the perfect place for COM Interop; large > >enterprise apps > >where you migrate step by step. > > > >I'd be happy to try your code on my machine to rule out funny policies or > >something on my machine. > > > >Thanks in advance! > >/kk >
Hi Kkarre, I'm sorry to hear that it still not work. As for the warning you mentioned below: ========== ns "WARNING: The assembly does not declare an ApplicationAccessControl Attribute. Application security will be enabled by default." ======= I also got this warning since this is a simple test assembly. I ignored this warning when testing. You can add the following attribute in AssemblyInfo.vb file so as to eliminate the warning: ================= <Assembly: ApplicationAccessControl(AccessChecksLevelOption.Application)> ======================== Also, for gacutil, I haven't used it, but directly add/remove the strong-named dll via drag/drop in the c:\windows\assembly folder. I've also tried using GacUtil.exe to add/remove the assembly and it also worked. BTW, as you mentioned: ============ [quoted text, click to view] > So, is it my environment? > Some setting from my VB6 COM+ component?
=========== i"m not sure whether there is anything involved VB6 here? So far my testing is through a Enterprised component assembly created via VB.NET class library project. For VB6 dll it can not be used via those .NET tools such as GACutil or regsvcs If necessary, I can send you the test component I used on my side. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- [quoted text, click to view] >Thread-Topic: My Serviced component doesn't expose any methods! >thread-index: AciYsCDKT7vfBb83QBiy8UQBhQBolg== >X-WBNR-Posting-Host: 193.34.40.30 >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> > >...and afterwards gacutil cannot uninstall it! >Number of files: 0 >Gaaaaaaaaah! > >"kkarre" wrote: > >> Intriguing: >> I backed down, tried to install your sample component in my COM+. >> gacutil returns "Assembly successfully added to the cache." >> regsvcs returns "WARNING: The assembly does not declare an >> ApplicationAccessControl Attribute. Application security will be enabled by >> default." >> >> !!! >> So, is it my environment? >> Some setting from my VB6 COM+ component? >> Or what? >> ? >> /kk >> >> "Steven Cheng [MSFT]" wrote: >> >> > Hi Karre, >> > >> > From your description, you're encountering some error when try calling a >> > .NET serviced component ,correct? >> > >> > Based on my experience, for serviced component, you can check the following >> > things to see whether there is anything incorrect: >> > >> > ** the attributes and class/method setting in the serviced component >> > asssembly. Have you marked the class and methods as public, whether the >> > class is COM visible or have you apply a strong-name for the assembly >> > >> > ** the deployment of the serviced component assembly. Whether you've added >> > the assemly into GAC(better to do this), and did you use regsvcs to >> > explicitly install it(any error or warning occurs)? >> > >> > Here is a simple test serviced component I've used which worked correct on >> > a local XP box: >> > >> > ================================ >> > Imports System.EnterpriseServices >> > Imports System.Data.SqlClient >> > Imports System.IO >> > Imports System.Runtime.InteropServices >> > >> > <ComVisible(True)> _ >> > <Transaction(TransactionOption.RequiresNew)> _ >> > Public Class VBServCom >> > Inherits EnterpriseServices.ServicedComponent >> > >> > Public Sub New() >> > >> > >> > End Sub >> > >> > <AutoComplete()> _ >> > Public Sub DoTxAuto() >> > >> > Dim sw As New StreamWriter("e:\temp\servicedcomponent.log") >> > sw.WriteLine("VBServCom+DoTxAuto: {0}", Date.Now) >> > sw.Close() >> > >> > End Sub >> > >> > End Class >> > >> > >> > ================================ >> > >> > >> > ========in assemblyInfo,vb=============== >> > >> > <Assembly: ComVisible(False)> >> > <Assembly: ApplicationActivation(ActivationOption.Library)> >> > <Assembly: ApplicationName("SimpleTrans")> >> > <Assembly: Description("Simple Transactional application to show Enterprise >> > Services")> >> > >> > ============ >> > >> > also, I applied a strong-name to the assembly and installed it into GAC. >> > >> > here is another web thread mentioend some potential problem which may be >> > also helpful: >> > >> > #ServicedComponent RegistrationException - Invalid Derived Classes >> > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=138251&SiteID=1 >> > >> > Sincerely, >> > >> > Steven Cheng >> > >> > Microsoft MSDN Online Support Lead >> > >> > >> > Delighting our customers is our #1 priority. We welcome your comments and >> > suggestions about how we can improve the support we provide to you. Please >> > feel free to let my manager know what you think of the level of service >> > provided. You can send feedback directly to my manager at: >> > msdnmg@microsoft.com. >> > >> > ================================================== >> > Get notification to my posts through email? Please refer to >> > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif >> > ications. >> > >> > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues >> > where an initial response from the community or a Microsoft Support >> > Engineer within 1 business day is acceptable. Please note that each follow >> > up response may take approximately 2 business days as the support >> > professional working with you may need further investigation to reach the >> > most efficient resolution. The offering is not appropriate for situations >> > that require urgent, real-time or phone-based interactions or complex >> > project analysis and dump analysis issues. Issues of this nature are best >> > handled working with a dedicated Microsoft Support Engineer by contacting >> > Microsoft Customer Support Services (CSS) at >> > http://msdn.microsoft.com/subscriptions/support/default.aspx. >> > ================================================== >> > This posting is provided "AS IS" with no warranties, and confers no rights. >> > -------------------- >> > >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >> > >Subject: My Serviced component doesn't expose any methods! >> > >Date: Thu, 3 Apr 2008 04:11:02 -0700 >> > >> > > >> > >Hello, >> > >PLs help:
Thanks for your reply Karre, So the problem is at the Com+ registring stage. Why did you manually register it into COM+ applications? As I mentioned in previous messages, in my test, I used the .NET framework regsvcs.exe tool to install the serviced component into COM+ applications. #.NET Services Installation Tool (Regsvcs.exe) http://msdn2.microsoft.com/en-us/library/04za0hca(VS.80).aspx The command is quite simple. For example, for my case the serviced component is named "SVCCOMLib.dll", I just run the following command in Visual Studio command prompt: regsvcs.exe SVCCOMLib.dll and it will automatically do all the things without requiring me to do anything in the COM+ management console. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- [quoted text, click to view] >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com>
<JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> <6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> <6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> <gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> [quoted text, click to view] >Subject: RE: My Serviced component doesn't expose any methods! >Date: Tue, 8 Apr 2008 00:24:00 -0700 > >Hi Steven, thanks for your reply! >I did apply the <Assembly: >ApplicationAccessControl(AccessChecksLevelOption.Application)> setting in my >component >but somehow it didn't "stick". It seems to take a while, maybe today... >Your component installs fine in GAC today, d&d or gacutil equally works fine. >However when I add it to a COM+ application in Component Services there's >trouble: I get all interfaces, including the class interface _TestClass. >All interfaces show their methods EXCEPT the class interface. > >Am I adding it the wrong way? I use 'Install New Component' and I browse to >the >dll I used as original and drag'n'dropped it into GAC. The wizard won't let >me select the one inside the GAC. > >As for VB6, my project is migrating a VB6 COM+ installed component of 30+ >dlls. >The code is now in VB2005 but I thought that the Upgrade Wizard might have >brought a component setting or something from VB6 to VB2005. > >I've tried calling the component anyway but gets error of kind >"couldn't create ActiveX component". This might be because the VB2005 dll >references three COM components still in VS6/C++ through COMInterop. >Perhaps it's impossible to use COMInterop inside COM+? >Wouldn't be logical - that's the perfect place for COM Interop; large >enterprise apps >where you migrate step by step. > >I'd be happy to try your code on my machine to rule out funny policies or >something on my machine. > >Thanks in advance! >/kk
Hi Karre, Have you got any progress on this? When you use regsvcs.exe to install the servicedcomponent into COM+ applications, it will create the COM+ application by the name you specified through <Assembly:ApplicationName("...." )> attribute(not the class name or assembly name), have you checked to see whether there is a COM+ application with this name? Also, are you using an administrator account when perform these tasks on the machine? Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- [quoted text, click to view] >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com>
<JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> <6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> <6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> <gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> <5D2DDD7B-9EC9-44CD-A340-1DD8ECFC351D@microsoft.com> <Dqm0euVmIHA.1036@TK2MSFTNGHUB02.phx.gbl> [quoted text, click to view] >Subject: RE: My Serviced component doesn't expose any methods! >Date: Tue, 8 Apr 2008 03:51:01 -0700 >I have used both regsvcs and the COM+ UI. >regsvcs returns a happy message but I can't see the COM+ application that >has the installed component. >The people that will maintain this solution wanted to see the COM+ application >and components/interface/methods in it, so I tried that with COM+ Management >console. >I'll try to read up on regsvcs to see how COM+ Management Console can show the >installed component! >Thanks! > >"Steven Cheng [MSFT]" wrote: > >> Thanks for your reply Karre, >> >> So the problem is at the Com+ registring stage. Why did you manually >> register it into COM+ applications? As I mentioned in previous messages, >> in my test, I used the .NET framework regsvcs.exe tool to install the >> serviced component into COM+ applications. >> >> #.NET Services Installation Tool (Regsvcs.exe) >> http://msdn2.microsoft.com/en-us/library/04za0hca(VS.80).aspx >> >> The command is quite simple. For example, for my case the serviced >> component is named "SVCCOMLib.dll", I just run the following command in >> Visual Studio command prompt: >> >> regsvcs.exe SVCCOMLib.dll >> >> and it will automatically do all the things without requiring me to do >> anything in the COM+ management console. >> >> Sincerely, >> >> Steven Cheng >> >> Microsoft MSDN Online Support Lead >> >> >> Delighting our customers is our #1 priority. We welcome your comments and >> suggestions about how we can improve the support we provide to you. Please >> feel free to let my manager know what you think of the level of service >> provided. You can send feedback directly to my manager at: >> msdnmg@microsoft.com. >> >> ================================================== >> Get notification to my posts through email? Please refer to >> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif >> ications. >> >> This posting is provided "AS IS" with no warranties, and confers no rights. >> -------------------- >> >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >> >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> >> <JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> >> <6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> >> <6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> >> <gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> >> >Subject: RE: My Serviced component doesn't expose any methods! >> >Date: Tue, 8 Apr 2008 00:24:00 -0700 >> >> > >> >Hi Steven, thanks for your reply! >> >I did apply the <Assembly: >> >ApplicationAccessControl(AccessChecksLevelOption.Application)> setting in >> my >> >component >> >but somehow it didn't "stick". It seems to take a while, maybe today... >> >Your component installs fine in GAC today, d&d or gacutil equally works >> fine. >> >However when I add it to a COM+ application in Component Services there's >> >trouble: I get all interfaces, including the class interface _TestClass. >> >All interfaces show their methods EXCEPT the class interface. >> > >> >Am I adding it the wrong way? I use 'Install New Component' and I browse >> to >> >the >> >dll I used as original and drag'n'dropped it into GAC. The wizard won't >> let >> >me select the one inside the GAC. >> > >> >As for VB6, my project is migrating a VB6 COM+ installed component of 30+ >> >dlls. >> >The code is now in VB2005 but I thought that the Upgrade Wizard might have >> >brought a component setting or something from VB6 to VB2005. >> > >> >I've tried calling the component anyway but gets error of kind >> >"couldn't create ActiveX component". This might be because the VB2005 dll >> >references three COM components still in VS6/C++ through COMInterop. >> >Perhaps it's impossible to use COMInterop inside COM+? >> >Wouldn't be logical - that's the perfect place for COM Interop; large >> >enterprise apps >> >where you migrate step by step. >> > >> >I'd be happy to try your code on my machine to rule out funny policies or >> >something on my machine. >> > >> >Thanks in advance! >> >/kk >> >> >
Hi Karre, I'm still monitoring the issue, have you got any progress? If there is anything else we can help, welcome to post here. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- [quoted text, click to view] >From: stcheng@online.microsoft.com (Steven Cheng [MSFT]) >Organization: Microsoft >Date: Thu, 10 Apr 2008 04:29:37 GMT >Subject: RE: My Serviced component doesn't expose any methods! > >Hi Karre, > >Have you got any progress on this? >When you use regsvcs.exe to install the servicedcomponent into COM+ >applications, it will create the COM+ application by the name you specified >through > ><Assembly:ApplicationName("...." )> > >attribute(not the class name or assembly name), have you checked to see >whether there is a COM+ application with this name? Also, are you using an >administrator account when perform these tasks on the machine? > >Sincerely, > >Steven Cheng > >Microsoft MSDN Online Support Lead > > >Delighting our customers is our #1 priority. We welcome your comments and >suggestions about how we can improve the support we provide to you. Please >feel free to let my manager know what you think of the level of service >provided. You can send feedback directly to my manager at: >msdnmg@microsoft.com. > >================================================== >Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#noti f >ications. > >This posting is provided "AS IS" with no warranties, and confers no rights. > >-------------------- >>From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >>References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> ><JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> ><6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> ><6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> ><gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> ><5D2DDD7B-9EC9-44CD-A340-1DD8ECFC351D@microsoft.com> ><Dqm0euVmIHA.1036@TK2MSFTNGHUB02.phx.gbl> >>Subject: RE: My Serviced component doesn't expose any methods! >>Date: Tue, 8 Apr 2008 03:51:01 -0700 > >>I have used both regsvcs and the COM+ UI. >>regsvcs returns a happy message but I can't see the COM+ application that >>has the installed component. >>The people that will maintain this solution wanted to see the COM+ >application >>and components/interface/methods in it, so I tried that with COM+ >Management >>console. >>I'll try to read up on regsvcs to see how COM+ Management Console can show >the >>installed component! >>Thanks! >> >>"Steven Cheng [MSFT]" wrote: >> >>> Thanks for your reply Karre, >>> >>> So the problem is at the Com+ registring stage. Why did you manually >>> register it into COM+ applications? As I mentioned in previous >messages, >>> in my test, I used the .NET framework regsvcs.exe tool to install the >>> serviced component into COM+ applications. >>> >>> #.NET Services Installation Tool (Regsvcs.exe) >>> http://msdn2.microsoft.com/en-us/library/04za0hca(VS.80).aspx >>> >>> The command is quite simple. For example, for my case the serviced >>> component is named "SVCCOMLib.dll", I just run the following command in >>> Visual Studio command prompt: >>> >>> regsvcs.exe SVCCOMLib.dll >>> >>> and it will automatically do all the things without requiring me to do >>> anything in the COM+ management console. >>> >>> Sincerely, >>> >>> Steven Cheng >>> >>> Microsoft MSDN Online Support Lead >>> >>> >>> Delighting our customers is our #1 priority. We welcome your comments >and >>> suggestions about how we can improve the support we provide to you. >Please >>> feel free to let my manager know what you think of the level of service >>> provided. You can send feedback directly to my manager at: >>> msdnmg@microsoft.com. >>> >>> ================================================== >>> Get notification to my posts through email? Please refer to >>> > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#noti f >>> ications. >>> >>> This posting is provided "AS IS" with no warranties, and confers no >rights. >>> -------------------- >>> >From: =?Utf-8?B?a2thcnJl?= <karre@newsgroup.nospam> >>> >References: <FB7340BE-9D32-468B-B037-38C3EEF146AE@microsoft.com> >>> <JZQ$7bglIHA.3756@TK2MSFTNGHUB02.phx.gbl> >>> <6E5901C9-88E9-4887-B684-AC51C1EBC752@microsoft.com> >>> <6980661C-663C-411F-B4F2-33C8836636C2@microsoft.com> >>> <gb1SHvTmIHA.9932@TK2MSFTNGHUB02.phx.gbl> >>> >Subject: RE: My Serviced component doesn't expose any methods! >>> >Date: Tue, 8 Apr 2008 00:24:00 -0700 >>> >>> > >>> >Hi Steven, thanks for your reply! >>> >I did apply the <Assembly: >>> >ApplicationAccessControl(AccessChecksLevelOption.Application)> setting >in >>> my >>> >component >>> >but somehow it didn't "stick". It seems to take a while, maybe today... >>> >Your component installs fine in GAC today, d&d or gacutil equally works >>> fine. >>> >However when I add it to a COM+ application in Component Services >there's >>> >trouble: I get all interfaces, including the class interface _TestClass. >>> >All interfaces show their methods EXCEPT the class interface. >>> > >>> >Am I adding it the wrong way? I use 'Install New Component' and I >browse >>> to >>> >the >>> >dll I used as original and drag'n'dropped it into GAC. The wizard won't >>> let >>> >me select the one inside the GAC. >>> > >>> >As for VB6, my project is migrating a VB6 COM+ installed component of >30+ >>> >dlls. >>> >The code is now in VB2005 but I thought that the Upgrade Wizard might >have >>> >brought a component setting or something from VB6 to VB2005. >>> > >>> >I've tried calling the component anyway but gets error of kind >>> >"couldn't create ActiveX component". This might be because the VB2005 >dll >>> >references three COM components still in VS6/C++ through COMInterop. >>> >Perhaps it's impossible to use COMInterop inside COM+? >>> >Wouldn't be logical - that's the perfect place for COM Interop; large >>> >enterprise apps >>> >where you migrate step by step. >>> > >>> >I'd be happy to try your code on my machine to rule out funny policies >or >>> >something on my machine.
Don't see what you're looking for? Try a search.
|
|
|