473,406 Members | 2,549 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,406 software developers and data experts.

Accessing a windows Service from a web form

Can a .Net web form interact with a .Net web service? More importantly...
How?

I have written a web-service which runs on a timer to check for data in a
database that needs to be 'operated' on. The data is entered into the
database from web, telephone and Windows applications. Rather than write 3
versions of the same code I wrote it once in a windows service which happens
to run on the web server.

What I would like to do; from the web when a user completes the steps
necessary to create the data which needs to be used, access the function in
the Windows Service to start the operations on the data, rather than wait
for the timer.

Does anyone have a sample of code (preferably VB but I will try to figure
out C# if I need to) showing how a web-form might call/use a function in a
Windows Service?

Thanks.
Nov 19 '05 #1
6 1665
Get you web application to make files with the data to be passed and equip
the windows service with a file watcher that will detect file creating and
initiate data consuming.

Eliyahu

"Roger Twomey" <ro******@vnet.on.ca> wrote in message
news:O2**************@TK2MSFTNGP14.phx.gbl...
Can a .Net web form interact with a .Net web service? More importantly...
How?

I have written a web-service which runs on a timer to check for data in a
database that needs to be 'operated' on. The data is entered into the
database from web, telephone and Windows applications. Rather than write 3
versions of the same code I wrote it once in a windows service which happens to run on the web server.

What I would like to do; from the web when a user completes the steps
necessary to create the data which needs to be used, access the function in the Windows Service to start the operations on the data, rather than wait
for the timer.

Does anyone have a sample of code (preferably VB but I will try to figure
out C# if I need to) showing how a web-form might call/use a function in a
Windows Service?

Thanks.

Nov 19 '05 #2
I am not familiar with a file watcher. I looked it up in the visual
studio help files, it sounds like that would work.

Any idea what kind of a load that puts on the CPU? It must check on some
kind of timer?
Sandy Murdock MCP

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
Sandy,

It doesn't put any load on the CPU at all. I have a multi-thread windows
service with tens of watchers watching in the same time. I think it works
with windows events. That's why it doesn't work with network directories.

Eliyahu

"Sandy Murdock" <sa***@murdocks.on.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I am not familiar with a file watcher. I looked it up in the visual
studio help files, it sounds like that would work.

Any idea what kind of a load that puts on the CPU? It must check on some
kind of timer?
Sandy Murdock MCP

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #4
That sounds like a very handy piece of code!

I will give that a try. Thanks!

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ue*************@TK2MSFTNGP14.phx.gbl...
Sandy,

It doesn't put any load on the CPU at all. I have a multi-thread windows
service with tens of watchers watching in the same time. I think it works
with windows events. That's why it doesn't work with network directories.

Eliyahu

"Sandy Murdock" <sa***@murdocks.on.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I am not familiar with a file watcher. I looked it up in the visual
studio help files, it sounds like that would work.

Any idea what kind of a load that puts on the CPU? It must check on some
kind of timer?
Sandy Murdock MCP

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #5
the .net approach would be to have your service support remoting. then the
web service could call the windows service to trigger the work.

-- bruce (sqlwork.com)
"Roger Twomey" <ro******@vnet.on.ca> wrote in message
news:O2**************@TK2MSFTNGP14.phx.gbl...
Can a .Net web form interact with a .Net web service? More importantly...
How?

I have written a web-service which runs on a timer to check for data in a
database that needs to be 'operated' on. The data is entered into the
database from web, telephone and Windows applications. Rather than write 3
versions of the same code I wrote it once in a windows service which
happens to run on the web server.

What I would like to do; from the web when a user completes the steps
necessary to create the data which needs to be used, access the function
in the Windows Service to start the operations on the data, rather than
wait for the timer.

Does anyone have a sample of code (preferably VB but I will try to figure
out C# if I need to) showing how a web-form might call/use a function in a
Windows Service?

Thanks.

Nov 19 '05 #6
the .net approach would be to have your service support remoting. then the
web service could call the windows service to trigger the work.

-- bruce (sqlwork.com)
"Roger Twomey" <ro******@vnet.on.ca> wrote in message
news:O2**************@TK2MSFTNGP14.phx.gbl...
Can a .Net web form interact with a .Net web service? More importantly...
How?

I have written a web-service which runs on a timer to check for data in a
database that needs to be 'operated' on. The data is entered into the
database from web, telephone and Windows applications. Rather than write 3
versions of the same code I wrote it once in a windows service which
happens to run on the web server.

What I would like to do; from the web when a user completes the steps
necessary to create the data which needs to be used, access the function
in the Windows Service to start the operations on the data, rather than
wait for the timer.

Does anyone have a sample of code (preferably VB but I will try to figure
out C# if I need to) showing how a web-form might call/use a function in a
Windows Service?

Thanks.

Nov 19 '05 #7

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

Similar topics

6
by: Jeff | last post by:
Has anyone had any luck accessing an Oracle database from a web service? I have a C# DLL with various code to query an Oracle database. If I call the methods in this DLL from a Windows Forms...
1
by: mbah Sumani via .NET 247 | last post by:
(Type your message here) I Think it's the stupidness of Windows. Why the service can't access network drive but console apps or windows application can do it? So my suggestion is make the program...
2
by: hazz | last post by:
I don't get it. I have a VS2005 solution with a web service project and a windows project. The web service when tested on its own works fine. But when I add it as a web reference and refer to it my...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
3
by: Evan Camilleri | last post by:
I have a problem for a Windows Service to login on an SQL server (different machine) - neither Windows Authentication nor SQL Authentication worked. LOGIN FAILED FOR USER sa (for example). If...
5
by: Khalique | last post by:
Hi everyone, I Hope that someone will be able to give me a hint to the solution to my problem. I have developed a web service (vb.net) that needs to access the folders / files and copy files to...
7
by: David Laub | last post by:
I've also posted this issue to a Sun/java formum, but since it appears to be an integration issue, this may be the better place to posr: I have written a dot net/c# Web Services doesn't fully...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
10
by: Ben | last post by:
I'm trying to access a c# web service from a web form. I set up the web reference proxy object as follows: proxy.PreAuthenticate = true; proxy.Credentials = CredentialCache.DefaultCredentials;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.