473,569 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4189
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.co m
"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.c om> wrote in
message news:uU******** ******@TK2MSFTN GP10.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.co m
"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
2022
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 compiling the code. the problem arises when I try to install the service using installutil. The error message I get is the following
3
2339
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 outlook application object.
4
5735
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 and giving the appropriate machine where the service runs.. How shud I got about doing the same thing if the client is written in C#.. I tried using...
5
8759
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 : System.IO.FileNotFoundException: The specified module could not be found. at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32...
7
3033
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 application it works perfectly fine, but when the assembly containing the reference is load from a windows service an exception is thrown with the following...
0
2215
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". There are no other statements to indicate what object cannot be created. Otherwise, everything on the test Windows Server 2003 works fine—all...
2
6881
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 (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no...
41
11611
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 exits immediately with a start/stop/nothing to do error. What could be wrong?
16
34106
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 Windows Vista 32-bit w/ Office 2007 and keep getting the following error:...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.