473,672 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling Windows service from a website.

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
Aug 14 '07 #1
6 6981
It is much easier to communicate with the service via a file that the web
app will write and the service will read.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Lalit" <xy*@xyz.comwro te in message
news:ey******** ******@TK2MSFTN GP02.phx.gbl...
>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


Aug 14 '07 #2
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

"Lalit" wrote:
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
Aug 14 '07 #3
"Lalit" <xy*@xyz.comwro te in message
news:ey******** ******@TK2MSFTN GP02.phx.gbl...
>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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 14 '07 #4
Hi,

Ladislav Mrnka wrote:
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
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Aug 15 '07 #5
"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

>
"Lalit" <xy*@xyz.comwro te in message
news:ey******** ******@TK2MSFTN GP02.phx.gbl...
>>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



Aug 15 '07 #6
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.

"Ladislav Mrnka" <La***********@ discussions.mic rosoft.comwrote in message
news:3B******** *************** ***********@mic rosoft.com...
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

"Lalit" wrote:
>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

Aug 16 '07 #7

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

Similar topics

2
3302
by: msnews.microsoft.com | last post by:
Hello everyone I was wondering if anyone has come across my problem? I programmed a Windows Service that uses httpWebRequest and httpWebResponse in VB.NET. Everything works fine until I use the webresponse object. What the Windows Service does is when the timer in the windows service elapses, the request to the website is made and a response is retrieve in a simple myhttpWebrequest.GetResponse(). I don't even do anything with the...
1
5790
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
3
8540
by: Gary | last post by:
I am using VS.Net 2002 with windows 2000 advanced server and windows 2000 professional. I have a requirement to use windows service with a GUI. I want to show my own User Interface(Dialog) to get user input, before windows login screen. For that I have created a windows service, in the onstart event of this service, I am calling a vb.net exe, which has windows form. But it throws error bcoz of the form. I even tried by calling a vb.net...
3
3556
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it looks like the data is not transferred to the asp page from the web service. just after going to internet option -> security -> Custom level -> Access data sources across domains -> and check the enable radio -> the problem is fixed. I need a...
3
9079
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. If the web service is taking a long time to complete, the aspx page returns a ‘The operation has timed-out.’ Message to the web browser after 100 seconds. I’ve added: <httpRuntime executionTimeout="300" /> to the web.config files
1
1416
by: Jaime Stuardo | last post by:
i all, I have a web service in a Windows 2003 Server machine and ASP.NET 2.0. The website has windows integrated security so that, in order to allow domain users to connect to it, I add permissions using Front Page Server extensions. What about calling the web service over the Internet? do I need to create a special account on the machine and allow access to the website? Do you have an example of calling a web service under these...
3
2892
by: =?Utf-8?B?bGVvMg==?= | last post by:
Hi All, I have a question which might be a beginner's question. I have a webservice whose webmethod has to call a window's service and get back the results. What is the best way to implement this scenario. I am asking this as windows service is an exe and i could not figure out a way call its methods from webservice.
4
3416
by: =?Utf-8?B?QmlsbCBNaWxk?= | last post by:
Feel free to let me know if there is a better place to post this question I'm a website developer trying to write a Windows Service, and I think I'm running into trouble due to the paradigm shift. In website development, I change the web.config file on the fly without re-building a project. How does this work with the app.config in a Windows Service? It seems like when I update a ConnectionString in app.config after rolling to a...
0
1877
by: cosmo | last post by:
Hello, I would like to develop a: - Windows Service for doing specific Tasks - Web Service as a communication gateway between the Windows Service and a ASP.NET Website - ASP.NET Website The scenario: A user clicks a button on a ASP.NET website to get some forecast. The button invokes a web service method i.e. GetForecast(). Now the web method calls a task method on the Windows Service. Finally the windows service returns a result...
0
8403
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8930
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8677
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5704
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.