Ok, a .NET question this time

I have a question ?

Is it possible to create a windows service that performs a specific function. Lets say add two numbers.

Next i want to call the fucntion AddNumbers from a windows forms application.

How hard can this be, So many guru's around here can anybody point me in the right direction ?

 

 

Published 10-05-2004 3:11 PM by Patrick Wellink
Filed under:

Comments

# re: Ok, a .NET question this time

Tuesday, October 05, 2004 3:56 PM by Patrick Wellink
Why have a service to do something that a Class Library can do?

# re: Ok, a .NET question this time

Tuesday, October 05, 2004 3:58 PM by Patrick Wellink
Because a class can't.....

Complicated biztalk issue.....

I tried a class and it won't work from within Biztalk.....

I have to use a service.....

# re: Ok, a .NET question this time

Tuesday, October 05, 2004 4:18 PM by Patrick Wellink
It looks like you need another security context for your class (am I right?).

I guess the best way to go is Enterprise Services. Configure your component with a specific identity that suites your need. That way you can directly call it from you code.

Sounds easier then it is, though.

# re: Ok, a .NET question this time

Tuesday, October 05, 2004 4:36 PM by Patrick Wellink
Well carlo,

I have a component that performs a submitsync (it is from the biztalk samples) if i use this component form a forms app everything works as expected. But if I use it in an orchestration i get error messages.

I really don't know why but some other guru From Microsoft told me submitsync in an orchestration rings a bell and he thought it wouldn't work.

I REALLY need the submitsync Functionality so i now want to wrap that in a service and then call the service from the orchestration....

I know this solution doesn't deserve a 'Schoonheidsprijs' but the other programmers keep shifting all problems my way.

# re: Ok, a .NET question this time

Tuesday, October 05, 2004 8:48 PM by Patrick Wellink
Windows Services is Ch. 6 from QUE MCAD 70-320. Send me a message and I'll mail you back the examples zip of that chapter. I guess that is legal given that we are colleagues and our company paid for the book.

# re: Ok, a .NET question this time

Friday, October 08, 2004 12:52 PM by Patrick Wellink
My guess is you want your Windows Service to act as a container for a Math component implementing the AddNumbers function?

- Expose the service interface using .Net remoting (note that .Net remoting offers no build-in security)

- Host the Math component in COM+ and generate a proxy referenced by your WinForm client

- Wire up a web service as the Facade over your Math component

And Roland is correct, 320 offers a lot of information on how to service functionality.