VS 2008 Read Server Data From A Client App Through A DLL?
Sep 9, 2009
I need to solve the following problem:- Create a server application which generates a random number every second- Have any number of client applications access the current random number through a dll (associated to the server) at anytime How would I do this? Anyone has a prototype VB.Net code for the server which does this kind of thing? I'm pretty sure I know how to write the client code.
Hey guys, I am trying to send data from client to server (encrypted) and the string sent from the client is not the same as recieved from the server. I've been killing my brain for hours to get this to work but I cant manage. Im converting everything to Base64 string.
Client:
Public Sub SendMessage(ByVal msg As String) Try SyncLock myclient.GetStream sw = New IO.StreamWriter(myclient.GetStream)
how to create a client/server... But I couldn't... I don't want anything fancy. Just want the client to send the server 4 numbers, depending on the user's choice; after that, the server would turn off the pc, restart it, etc. It all depends on the number received. Is there a rather "simple" way to do it? If it's not to much trouble you could use Atheist's example. (Btw I don't understand the code and, yes, I've checked on [URL])
My problem is that I would like to know that if some data from client has arrived to the server, I would know its length.Now I m getting an error at: mClient.GetStream.EndRead(ar). It is saying that ar cannot be empty. [code]
I'm not sure what I have done wrong, I am trying to get my program to send data (UsernamesPasswords) from client to server, then the server says if it's right or wrong.
The error is on this line: Dim networkStream As NetworkStream = TcpClient.GetStream()
Heres the Client: Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("You must enter UN/PW!") [Code] .....
I am facing problem in asynchronous socket communication.
1)I wanted to perform connect(from client to server) operation on enter button and send the data whatever client want to send and disconnect from server. And again client should get connect to server whenever client wanted to send data. this is the mechanism.
i.e how to reuse the socket.
2)Again Server should able to send the data to client.
Ive been working recently on a chat. Ive been using FTP to comunicate through both forms but it need to constantly download the new data and make the application freeze. Even with a Backgroundworker. So my question is : is there a way to keep a constant connection between the form and the host? And not LAN ,I mean that doesnt need to be on the same router.
Im using the code from [URL] as a starter, most of the code is the same. the chat system works fine but on the client a added a disconnect button "clientSocket.Close()" and as soon as i click that i get errors, on the client, this is the code...
Private Sub getMessage() For infiniteCounter = 1 To 2
[CODE]...
And this line...
serverStream.Read(inStream, 0, buffSize) gives me "Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall."
Now im talking the server, after the client clicks disconnect or closes by task manager, looses connection, etc the server crashes and gives me.
I've got a bunch if labels that are changed as a user inputs data into a form of mine. The Labels are changes with js on the client side. I then after all the submission are in put use a vb script to pull the string values from these labels. The problem is the vb net part is not reading the new values of these labels. Anyway I can get it to read the new values? I have over 40 labels.
I have a small program which is a tcp client. I send a string from this client to a device over ethernet (it acts as the tcp server). As soon as the device recieves the input string it will respond back with response data. My problem is i am not getting the entire response data back from the server. (device).
Dim serverStream As NetworkStream = clientSocket2.GetStream() Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes("my-cmd") serverStream.Write(outStream, 0, outStream.Length)
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 creating a software that needs to transfer data between client and server. i m storing the data in client in a database. but how does server access every clients data.
I have a Linq query on the server side of a Silverlight 4 Ria project that returns a number of distinct items based on a time period(Month).The problem I am getting is when the client callback fires the data has been corrupted and all the items returned from the server are duplicates of the last item in the collection.
Server Call Public Function GetBusinessHeadCountHistory(ByVal businessUnit As String) As IEnumerable(Of EngineeringHeadCountBusinessHistory) Return From t In ObjectContext.tblTimes
I have programmed a chat application in VB but as soon as I send any data from a client the server will send it to all. It should send a reply only to a particular client. This is the function I have used.
I've been working on this project for about a year now. It's a basic clientserver chat program. After a long time of improvement, I decided to test out the strength of my server.
On the client, I fired off 200 chat messages ("FLOOD# 1"... "FLOOD# 200") to the server as fast as possible. The result: Server immediately crashes. After some slight tampering, I was able to get the server to process 135 of the 200 messages before giving up. It no longer crashes, but something different happens. The data from the client is received in order, but when I pass that message to a function (myForm.OnLineReceived), The data is completely out of order. If I add a slight delay between the calling of the OnLineRecieved function, The messages are in perfect order.
Each message from the client is first encrypted, then encoded in base64. An "-" is appended to the end so that the server can easily find the end of each data "packet".
Server Code:
Imports System.Net.Sockets Imports System.Text ' The UserConnection class encapsulates the functionality of a TcpClient connection ' with streaming for a single user.
i have been working on a chat program Server side and client side i have most of the features i was asked to put in but then once i got most of the bugs out i noticed something the server admin could send whispers and alerts to single users but then when you try do do it on the client side it wont work so i looked through it all and found my issue the user list on the client is only a list of the names in server hash table so i was wondering how do i send the hashtable and all of its data E.G. user connection information to the client so that it can send commands to individual users like the server side can
vb Public clients As New Hashtable() ' This subroutine checks to see if username already exists in the clients ' Hashtable. If it does, send a REFUSE message, otherwise confirm with a JOIN.
[code]....
i tried to send the hashtable over the same method used to send the user names to the client but it cannot convert the hashtable to a string so that wont work so my question is How do i send the hash table to the user from the server then display the username on the client ??
The problem I have is: When I click on cmdListen in the server form and cmdConnect in the client form,both programs won't respond and they crash for some reason I don't know.
Client source code:
Code:
Imports System.Net.Sockets Imports System.Text Public Class Form1
[CODE]...
Code: Imports System.Net.Sockets Imports System.Text Public Class Form1
I need to encrypt some basic data being sent from server to client.
I was going to open a file in bytes, convert it to chrs (Modify odd numbers by adding 2 and even numbers by adding 3) then use Base 32 (Triacontakaidecimal) or Base 16 (although base 16 will occupy twice the space). Convert the data back to bytes and after do the same with the decryptor.
About using base 32, is there some sort of class in vb.net or maybe an api?
For example, i installed the windows application in more than one pc. All the pc's are in network. I want to save the data in a single database. How it is possible?
I developed a simple examination system with registration forms. I used VB.Net as the programming language. I haven't tried manual coding for my problem yet.Anyway this is a project for the company from which I am an intern. The plan is to get every client pc to have this examination/registration application and this application will send the personal info and the score to a central database(server pc).I used MySql as the dbms and developed the application on the same machine which means that the Database server I used is only on the local host.
Now I was about to try to implement the application to one client pc(as a beta test) and installed the necessary files(.net framework) and I also installed MySQL Server(and workbench) in the server pc.When I run the application in the client PC it didn't detect/connect to the ServerPC's MySQL server instance and therefore was not able to record the dummy values I input in the client application. Take note I changed the connection string of my app to point to the ip address of the serverPC.
Should I install the MySQL Server(and Workbench) to every ClientPC so that I can create a server instance that uses the REMOTE HOST option and configure it such that it will connect to the SERVERPC's Database?How should I setup the server so it gives access to the application I installed in all clientPCs?
In our project we've decided to put an exam generator using vb.net and after generate you can send it to client computer/students. *server computer/teacher will the one who will use exam generator and send it to the client computer/student*student will recieve it and then send it back again to the server computer/teacher*teachers will going to generate an exam depends on the type of exam, so i think im going to make it a wizard type environment
I have a Client/ server application where the Server is in java and Client is in Vb.net.When i send large string from client to server am not receiving complete text.code attached below.
client-- VB.net- Try Dim clientSocket As New System.Net.Sockets.TcpClient()
I'm creating a reporting web page as part of a standard VB.NET web application. The page is data driven, with jquery making calls to a web service local to the application to get values of elements that are dynamically created in the DOM. Ultimately these dynamic elements and their values are all wrapped up in a JSON object, so that part of the client side is fine.
Right now, I can pass that JSON object to a method in the web service which creates an SQL Data adapter from the values and queries a database. My ultimate goal is to have this client JSON data be used to query the database and construct an excel file to send back to the user, or failing that a CSV file.
It's my understanding (from working with PDF file generation) that this type of function can only be done on the server side of the web application, not even from the web service (i.e. I can't have the web service return an array of bytes and have JavaScript/jQuery present that as a file).
So, how do I go about this? Now I have my JSON object on the client side, where should I be sending it, how, and how do I go about returning my file?
I've read about either storing the JSON in a hidden field and having the server take the elements value and go from there, or using AJAX to send the JSON to the server just before a postback is made to fire off the server-side function to run the query and return the data.
I just need a little guidance, and a little help understanding where to use the hidden field, or what I am actually doing with the pre-postback AJAX call.