Re: Trigger action in C# executable from web application
- From: Peter Duniho <no.peted.spam@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 08 Dec 2009 16:51:50 -0800
Passiday wrote:
[...]
I am now wondering if we could set it up in more elegant way:
1) Have a local C# app triggering regularly far web server "is there
anything for printing".
- pros: seems simple to implement
- cons: regular far webserver triggering sounds like bad architecture.
Also delays could be a problem.
2) Have a local C# app that acts as simple http server
- pros: sounds like the most direct way to pass down info to local app
from the browser
- cons: potential security problems? Could be complex to develop?
Maybe there is some other smart idea how a local process can be
triggered from a web app?
Why does it have to be a local process other than the web application? Can a web application not print? I see Javascript-based pages print all the time (or at least, invoke the print dialog so the browser can print). And I've seem web applications that can download and save files to my computer, so how is it that your web application cannot be designed to somehow place a file in the correct place?
(These are rhetorical questions...I don't personally need an answer to them, I'm just asking them as a way of prompting some thought along those lines).
It seems to me that you really should be asking your question in a newsgroup where questions about web applications are specifically on-topic. There you may find advice from someone who knows how your web application can directly handle the printing needed, rather than using an independent process the web application needs to communicate with.
Barring that, certainly I'd agree that having a local program with which the web application can communicate directly is much better than having the web application notify a remote server that the local program is polling on a regular basis.
As far as security problems go, I suppose it's true that any time you've got a process running that can accept data from an external source, there's a potential for issues. But using .NET, hopefully the biggest threat would be some kind of denial-of-service or abuse-of-service, and if you accept requests only from local IP addresses, that should be minimized.
If I were you, I'd post my question to a more relevant newsgroup, and see if there is better advice from people actually writing web applications on a regular basis, including the possibility that someone can explain to you how to get the printing to work without a separate process at all.
Pete
.
- References:
- Trigger action in C# executable from web application
- From: Passiday
- Trigger action in C# executable from web application
- Prev by Date: Re: Avoiding Default Parameter Checking in C# 4.0
- Next by Date: Re: Avoiding Default Parameter Checking in C# 4.0
- Previous by thread: Trigger action in C# executable from web application
- Next by thread: Re: Trigger action in C# executable from web application
- Index(es):
Relevant Pages
|