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

Transferring Data Between ASP.NET and Windows Forms

What is the best way to send / receive data between an ASP.NET application and a windows forms application running on the same computer? I want users to be able to go to an ASP.NET page and based on their input, have the windows application that is also running on that server perform different actions. Any ideas?
Mar 14 '08 #1
1 1577
balabaster
797 Expert 512MB
What is the best way to send / receive data between an ASP.NET application and a windows forms application running on the same computer? I want users to be able to go to an ASP.NET page and based on their input, have the windows application that is also running on that server perform different actions. Any ideas?
I would put the data entered into a database of some description - any database would suffice. The ASP.NET page could write a flat file which the windows app could monitor for changes, the ASP.NET page could write to a SQL Server, Oracle or Access database. The trick is if multiple users are entering data from the ASP.NET page, there are a number of processes you could use.

Personally I would use SQL Server to store the data that was entered over the web, however using this type of data store means that your windows application won't auto-refresh the data so you'd have to handle that yourself.

If you want a data-push type mechanism then a flat files may suffice to mimic this behaviour by using the FileSystemMonitor object in the System.IO namespace. As someone sends data through the ASP.NET web page it saves to a flat file or an Access database in a set directory on the web server. The FileSystemMonitor instance would then trigger your windows application to refresh the data.

You could achieve the same effect using a database server like SQL Server or Oracle but you'd have to write a refresh mechanism that checks the database for updates in the background and then when updates occur it triggers your windows form to refresh the data.

The advantage to using a database server such as SQL Server or Oracle is that your Windows application no longer needs to reside on the web server, you could run it from any machine on the network that can connect to the database server. In fact, you could even dispose of the windows application and use AJAX in a Web Application to do the same thing in a web browser. This way you can achieve the same effect from any machine without having to install your application on them.
Mar 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: Joseph Geretz | last post by:
Up to this point, our application has been using Windows File Sharing to transfer files to and from our application document repository. This approach does not lend itself toward a secure...
6
by: Tejpal Garhwal | last post by:
I have datagrid filled with some data rows. At the run time i want know how many total rows are there in the data grid ? Any idea ? Any Suggestions ? Thanks in advance Tej
1
by: Angus Lepper | last post by:
I'm writing a stock ticker for a stock market simulation, and can load the data into the xmlreader in the first place, but can't figure out how to refresh/update the data in it. Any ideas? Code:...
15
by: http://www.visual-basic-data-mining.net/forum | last post by:
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2..... That means after i fill in any data in textBox1 and click Next button... It will bring me to...
10
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another...
1
by: Asaf | last post by:
Hi, I am developing a windows forms client application that will send a large XML data to a web server using Web Services. I saw this article http://www.codeproject.com/soap/MTOMWebServices.asp...
3
by: JayD | last post by:
(Not sure whether it is a general aspnet problem or a specific security problem, hence posting it in 2 groups). This will solve for us a number of problems. I have developed a website on my...
5
by: meetalps | last post by:
Hi All, Can you please help me with a step by step procedure to transfer files from my PC to DB2-AIX and vice versa. I am new to both. Example transferring a sql file to run from PC to DB2 on AIX....
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.