Calling Windows service from a website.

L

Lalit

I want to create an application possibly windows service that will generate
PDF files and place them into a specific folder.
I have a website that will use this service to generate PDF files and return
them to user.

Is it possible to call this win service from within the website?
If yes how could we do this?

thanks
Lalit
 
G

Guest

Hi Lalit,
the basic technique you are looking for is called RPC (remote procedure
call) - in .net world it is known as remoting. But is this really what you
need? Why do you need to run you pdf component as separate application?

Regards,
Ladislav
 
M

Mark Rae [MVP]

I want to create an application possibly windows service that will generate
PDF files and place them into a specific folder.
I have a website that will use this service to generate PDF files and
return
them to user.

Is it possible to call this win service from within the website?
If yes how could we do this?

Following on from Ladislav' response, have you considered something like
this: http://www.siberix.com ?

No need for a separate application at all...
 
L

Laurent Bugnion, MVP

Hi,

Ladislav said:
Hi Lalit,
the basic technique you are looking for is called RPC (remote procedure
call) - in .net world it is known as remoting. But is this really what you
need? Why do you need to run you pdf component as separate application?

Regards,
Ladislav

Note however that if you go the "remoting" route, you should definitely
take a good look at WCF (in .NET 3.0), which supercedes (and will
eventually replace) remoting.

Greetings,
Laurent
 
J

John Mott

"Eliyahu Goldin" wrote ..
It is much easier to communicate with the service via a file that the web
app will write and the service will read.

I agree with this assessment. Given the vagaries of knowing how many web
instances may be open at any time and the fact that there is only one web
service active, a good methodology is to have the web page create a command
file with the instructions for what to do a guid for a name in some format
(xml perhaps) and have it place it into a "drop" directory.

The web service has a loop where it waits on changes in the drop directory
and processes the files located there. Once processed they are deleted or
moved to a 'processed' directory. This makes it easy to handle a large burst
of activity, requests are just queued up and processed when the service gets
to it and the service is not overwhelmed.

John
nice clean examples at www.nicecleanexamples.com
 
L

Lalit

I have issues with the user rights while doing this. We are using a pdf
printer driver to create pdf.
Using ASPNet user we cannot do this. we tried impersanation but it gives
problem and that user has to be logged into the webserver while printing.
we tried WinAPI to call this but that did not work too.

So now we are trying to run this service outside of webserver (i.e.
webserver will not start the exe). It will just request to do the job.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top