Asp.net -Processing And Listening For Additional Client Requests Simultaneously?
Feb 21, 2011
I need to build a Windows Service in VB.net under Visual Studio 2003.This Windows service should read the flat file (Huge file of about a million records) from the local folder and upload it to the corresponding database table.This should be done in Rollback mode(Database transaction).While transferring data to table, the service should also be listening to additional client requests.So, if in between client requests for a cancel operation, then the service should rollback the transactions and give feedback to the client. This windows service also keeps writing continuously to two log files about the status and error records. My client is ASPX page (A website). how to organize and achieve this functionality in a windows service(Processing and listening for additional client requests simultaneously. Ex. Cancellation request).
I have recently started playing with sockets, so now i have set up an instant messaging app. it works like it's supposed to however, theres a slight problem. short of arranging for both parties to come online via email or something there's no way for the other person to know that someones waiting for them. So i'm basically looking for a way to send a pop-up message to tell the other dude to get his ass online,is there a way to display a message on a target pc's screen without a client application running and actively listening for an incoming command?
Is it possible to view client transaction requests and host response in a self hosted console window?
Front end client sends request to service Service console displays requested data in console window and forwards to listening server Server responds with data Response is displayed in console window
I guess it would be displaying the traces in the console window.
I have been struggling to find a solution for this problem. What I need to do is build a server application that accepts tcp client requests from different clients running on same port say:1003. I experimented by using asynchronous mode call backs etc. but it disconnects once connection is established and does not respond for further requests from the same client.
I just learned some basics of multi threading in VB.net recently as I came across processing a large List of records and inserting them into SQL database one by one.
I have code look like this:
Private Sub btnLoadNow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadNow.Click
Dim autoLoad1 As New Thread(AddressOf AutoLoad) autoLoad1.Start()
[CODE]...
Itemlists is a global lists i retrieved from database, everything looks fine to me but when i run this program, I found that the threads are inserting one records 9 times into the database(I have 9 threads in total), which makes me think that maybe i need to specifically assign 1/9 of a list to each thread? Is there another way to do it which doesn't require the splitting of the list, if not , how do i split it then assign?
Im a college student and this is my first programming class, i am having extremely diffcult time with arrays and sequential file processing. Im not asking for the whole program, just something to get me started and hints along as i progress with it. Please help me get started on my program, its due in 2 days.
Here are the requirements....
1. The program must input any number of individual�s last and first names using two separate textboxes. 2. The array of names must be sorted by the last name using a bubble sort. You must code the sort. 3. The program must be able to recall the names from the file and add to the existing list of names so that more names can be added to, sorted, and written back to the file in sorted order. 4. Sort in ascending order: A to Z 5. All names must be displayed in a listbox in sorted order when the user wishes to see them. 6. In the listbox the last and first names must be separated by a comma and a space. Example: Smith, Mary 7. The user must be able to search for a name in the array, using the binary search algorithm. You must code the search. 8. Do not use module-level variables. Instead you may choose to use Static. 9. The program must be designed using Visual Basic 2008
We are creating a Who wants to be a millionaire style game in VB. Our server is pulling information such as questions and answers from a Access Database and sending them to the contestants (Clients). All transfer of information is directly from the server to each client. One of the "Life Lines" we want to use is "Ask a friend", where one client is able to Instant message another client for a short time to get help on the question.
I am trying to listen to the COM3 port and display the output in the TextBox.If I understood correctly I will have to implement this by using eventhandlers, delegates.I tried following these articles:
[URL]
And this is the code I came up with...Unfortunately it doesn't display anything. App just starts display "True" and no data is being displayed.I am monitoring Arduino platform which I know is sending data constantly.
Imports System.IO.Ports Imports System.Text Public Class ArduinoSerial
I'm broadcasting a simple message to ..*.255 (changing to 255 the last part of my ip) and i'm trying to listen to it. the code returns no error but i'm not receiving anything. In wireshark I can see the broacast is sent correctly, but with a different port each time (I don't know if that's a big deal).
Here's some parts of my code. Private Sub connect() setip() btnsend.Enabled = True btndisconnect.Enabled = True btnconnect.Enabled = False receive() [Code] .....
I am trying to listen to the COM3 port and display the output in the TextBox. If I understood correctly I will have to implement this by using eventhandlers, delegates. I tried following these articles:
[URL]
And this is the code I came up with... Unfortunately it doesn't display anything. App just starts display "True" and no data is being displayed. I am monitoring Arduino platform which I know is sending data constantly.
Code: Imports System.IO.Ports Imports System.Text Public Class ArduinoSerial
[code].....
I am really new into the vb.net. I am sure there are some horrible mistakes with this code but I am kind of stuck for the past 2 days on this one.
Listening for an event from one program and capture it on another?is this possible, I'm asuming I would want to send a system wide event so I could capture it.My scenarioLet�s say I have this separate Splash animation (a series of png/bmp etc) but instead of having them in the main program itself I want them separate in a DLL/EXE.So how can I raise an event (probably system wide event I would imagine) letting the Main program know that the Splash DLL/EXE has finished it animation so the main app can continue?
I am trying to create a windows service (visual basic 2005) that will listen for a UDbroadcast. If it detects the broadcast it then run an external program. I havesuccessfully created the server and client programs using basic forms. I used the code from this forum
I have another question about my customizable Menu/Tool/StatusStrip control.
I have three controls called CustomizableMenuStrip, CustomizableToolStrip and CustomizableStatusStrip. Each of those controls has a property called Appearance, which accepts an instance of a component called AppearanceControl.
The AppearanceControl component basically exposes all color properties for the customizable strips, so the user can edit them, and more importantly exposes a ToolStripProfessionalRenderer which the three strips have to use. This way the three strips are rendered with the colors the user chooses in the AppearanceControl.
Now, I'm wondering if I'm doing things the right way. When any of the color properties in the AppearanceControl has changed, all the strips that use that particular AppearanceControl should have their Renderer set again, and should be invalidated.
I figured the easiest way (and probably the only way?) to go about this was to have the AppearanceControl raise an event (AppearanceChanged), which the three strip controls listen for. When that event is raised, the strip controls can set their Renderer to the Renderer that the AppearanceControl exposes, and then invalidate themselves.
I'm writing a remote desktop software that starts a connection in reverse mode, using RDP API. My problem is that I try to setup the port that the listening socket may use, but it seems not working: it uses always a random port. [Code] The problem is the seems PortId is ignored: my connection string reports other ports number, and the incoming socket is open on port different from 4000.
How hard is make listening connection? Game? Program? Example: Server where people can connect? Just ready opened connection example where another program connects or something? (Console where you see when people connects and disconnects.....=>)
Lets say i got a listview and that listview contains ip and open port, i wan't the form to search open ports and put them in the Right lisview/Column example : messagebox("Ip Found")
I have a website and say a user comes along and fills out the form with bogus data. Then after he fills it out, he enters another one and another one and another one of bogus data. He's basically just trying to clog up the data base.
How is the best way to combat this? Would it make sense to when they submit the data track the IP address?
I'm writing a web crawler for a specific site. The application is a VB.Net Windows Forms application that is not using multiple threads - each web request is consecutive. However, after ten successful page retrievals every successive request times out. I have reviewed the similar questions already posted here on SO, and have implemented the recommended techniques into my GetPage routine, shown below:
I'm wanting to write a program in vb .net that could monitor outgoing print requests from any program on the PC, prompt the user if they would like to add a header to the document, and if they say yes, then tack it on (if the user has printed something in the space where the header will go, just print on top of it). Is this possible? I've looked around for ideas on how to do this, but I can't seem to find anything.
this is general to any operation calling an SQL server, or anything requiring an open connection at that.
Say I have anywhere from 20 to 1000 Select calls to make for each item in data being looped. For each step, I'll select from sql, store data locally in a struct, then proceed. This is not a very expensive call, so should I keep the connection open for the entire loop? Or should I open and close every step?
How expensive in run time is opening a connection? I would think it'd be better to keep the connection open, but would like to get the correct response for this.
while using HTTP web Requests, when i try and read the stream i always get an error saying 403 Forbidden but if i try to do it in the VB.Net web browser it works fine. Here is my code:
I have a server making a head request to a database dump I've created. The remote server does this to make sure that it's not using excessive bandwidth when not necessary.However, due to some other circumstances outside my control this causes the script to be hit twice: once for the head request, and then another time to download the data.
What I'd like is to have the script I've written detect the head request, send back a couple of headers (e.g. last modified is right now, filesize different than before), and exit. Is there a way to do this?
I have a server making a head request to a database dump I've created. The remote server does this to make sure that it's not using excessive bandwidth when not necessary.However, due to some other circumstances outside my control this causes the script to be hit twice: once for the head request, and then another time to download the data.