Managed Code Response Problem
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Managed Code Response Problem

 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM
Author Message
NJC1
Guest





Posted: Thu Nov 03, 2005 5:51 pm    Post subject: Managed Code Response Problem Reply with quote

Hi,

I'm trying to set up a managed code response which runs a method within a
..NET assembly which is installed in the GAC.

MOM should be calling an instance method and passing in the Context object
and then two strings. However, it fails with event 21302 in the application
log saying that it could not find the default constructor despite the fact
that I have a public default constructor with no parameters in the code!

I have checked and double checked the settings in the Administrator console
and all appear to be correct - any help would be greatly appreciated!
Back to top
Colin
Guest





Posted: Fri Nov 04, 2005 9:41 am    Post subject: Re: Managed Code Response Problem Reply with quote

Did you write your code in VB.Net? If yes the context object cannot be
passed as Main() will not accept any parameters.

Colin.

"NJC1" <NJC1@discussions.microsoft.com> wrote in message
news:0E679095-B5DB-41D2-9144-49FD60C4B4F3@microsoft.com...
Hi,

I'm trying to set up a managed code response which runs a method within a
..NET assembly which is installed in the GAC.

MOM should be calling an instance method and passing in the Context object
and then two strings. However, it fails with event 21302 in the application
log saying that it could not find the default constructor despite the fact
that I have a public default constructor with no parameters in the code!

I have checked and double checked the settings in the Administrator console
and all appear to be correct - any help would be greatly appreciated!
Back to top
NJC1
Guest





Posted: Fri Nov 04, 2005 9:51 am    Post subject: Re: Managed Code Response Problem Reply with quote

Hi Colin,

Thanks for the reply - the assembly is written in C# and there is no Main()
method (the project is a class library). The default constructor is public
and takes no parameters as specified in the SDK documentation.

I did try writing static methods instead but the response didn't execute
with MOM saying that it could not find the method specified. I double
checked the response settings against the output of MCRUtil.exe from the
Resource Kit and all appeared to be correct. I'm presuming MOM is actually
locating the assembly (I've had no error to suggest otherwise) and so am at a
loss as to why this isn't working!

"Colin" wrote:

Quote:
Did you write your code in VB.Net? If yes the context object cannot be
passed as Main() will not accept any parameters.

Colin.

"NJC1" <NJC1@discussions.microsoft.com> wrote in message
news:0E679095-B5DB-41D2-9144-49FD60C4B4F3@microsoft.com...
Hi,

I'm trying to set up a managed code response which runs a method within a
..NET assembly which is installed in the GAC.

MOM should be calling an instance method and passing in the Context object
and then two strings. However, it fails with event 21302 in the application
log saying that it could not find the default constructor despite the fact
that I have a public default constructor with no parameters in the code!

I have checked and double checked the settings in the Administrator console
and all appear to be correct - any help would be greatly appreciated!


Back to top
NJC1
Guest





Posted: Fri Nov 04, 2005 1:50 pm    Post subject: Re: Managed Code Response Problem Reply with quote

Hi Colin,

I've worked out what the problem was - the assembly has to be installed in
the same directory as the MOM Service as well as being in the GAC.

"NJC1" wrote:

Quote:
Hi Colin,

Thanks for the reply - the assembly is written in C# and there is no Main()
method (the project is a class library). The default constructor is public
and takes no parameters as specified in the SDK documentation.

I did try writing static methods instead but the response didn't execute
with MOM saying that it could not find the method specified. I double
checked the response settings against the output of MCRUtil.exe from the
Resource Kit and all appeared to be correct. I'm presuming MOM is actually
locating the assembly (I've had no error to suggest otherwise) and so am at a
loss as to why this isn't working!

"Colin" wrote:

Did you write your code in VB.Net? If yes the context object cannot be
passed as Main() will not accept any parameters.

Colin.

"NJC1" <NJC1@discussions.microsoft.com> wrote in message
news:0E679095-B5DB-41D2-9144-49FD60C4B4F3@microsoft.com...
Hi,

I'm trying to set up a managed code response which runs a method within a
..NET assembly which is installed in the GAC.

MOM should be calling an instance method and passing in the Context object
and then two strings. However, it fails with event 21302 in the application
log saying that it could not find the default constructor despite the fact
that I have a public default constructor with no parameters in the code!

I have checked and double checked the settings in the Administrator console
and all appear to be correct - any help would be greatly appreciated!


Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB