473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Windows Service with COM interop

Is it possible to make a Windows Service that has a COM interop.

I want to synchronize my database and ISA server blocklist. The application
is quite simple and should do the trick, provided I could start the ***
thing as a Windows Service (to make the process automatic at regular
intervals).

What do I need to configure to get it installed as a service (on a
non-development box Win2k3)?

Strong names don't work: interop has no strong name...

- Joris
Nov 16 '05 #1
2 4158
Joris,

That's not actually true. You can call TLBIMP, and strong name the
interop assembly using the keycontainer or keyfile options.

I think that a service is a bad idea for this kind of operation, because
you will have the process running, and not doing much of anything at other
times.

You should use the Task Scheduler to run your program which will perform
the update. You can create a new one from the Control Panel. Just have it
point to your executable which performs the task.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Joris Dobbelsteen" <jo***************@mail.com> wrote in message
news:41**********************@news.wanadoo.nl...
Is it possible to make a Windows Service that has a COM interop.

I want to synchronize my database and ISA server blocklist. The
application
is quite simple and should do the trick, provided I could start the ***
thing as a Windows Service (to make the process automatic at regular
intervals).

What do I need to configure to get it installed as a service (on a
non-development box Win2k3)?

Strong names don't work: interop has no strong name...

- Joris

Nov 16 '05 #2
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uU**************@TK2MSFTNGP10.phx.gbl...
Joris,

That's not actually true. You can call TLBIMP, and strong name the
interop assembly using the keycontainer or keyfile options.
Just didn't know this function, thanks.
Now I have that working.

On the server I added the assembly as a trusted assembly. This made
installation complete.
I think that a service is a bad idea for this kind of operation, because you will have the process running, and not doing much of anything at other
times.
I'm planning to let it do more soon. However I'm just trying to get it
working here step by step first.
Besided I want to try out using the Windows Services.

You solution might actually be much better afterwards...
You should use the Task Scheduler to run your program which will perform the update. You can create a new one from the Control Panel. Just have it point to your executable which performs the task.

Hope this helps.
It did!
Thank you.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Joris Dobbelsteen" <jo***************@mail.com> wrote in message
news:41**********************@news.wanadoo.nl...
Is it possible to make a Windows Service that has a COM interop.

I want to synchronize my database and ISA server blocklist. The
application
is quite simple and should do the trick, provided I could start the ***
thing as a Windows Service (to make the process automatic at regular
intervals).

What do I need to configure to get it installed as a service (on a
non-development box Win2k3)?

Strong names don't work: interop has no strong name...

- Joris


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: W Akthar | last post by:
Hi All, I have created a simple Windows Service which needs to be able to send appointments to Outlook. I have no problem makeing a reference to Microsoft Outlook 11.0 Object Library and...
3
by: W Akthar | last post by:
Hi I am trying to create a windows service which queries SQL Server on timed intervals and depending on the results send appointments to Outlook. The problem lies when I try to create an...
4
by: Jasleen | last post by:
I have written one Widows Service in ATL, having a ATL component running. Now it is very easy to create the VC client by calling CoCreateINstanceEx to create the component running in the service...
5
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown :...
7
by: Ollie Riches | last post by:
I am trying to dynamically load an assembly that has a reference to 'Interop.WMEncoderLib.dll' which is a PIA to the windows media player DRM components. When I run the code from a console...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
41
by: pbd22 | last post by:
Hi. I know my windows service works when i run it in debug mode on my dev machine. It also works in release mode on my dev machine. But, when I move the service to a production server, it...
16
emibt08
by: emibt08 | last post by:
Hello fellow programmers. I am working on a project that is a windows service. It should open an excel file and read it and it worked good on WinXP SP2 w/ Office 2003. Now the customer upgraded to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.