Specific Cast Is Not Valid In Client Server Socket Program

Jun 14, 2012

I am Working on Teghax Component.Using This Component we want to find out Block title attribute of dwg file in a client server socket application.

1> We get Block title attributes properly of dwg file in windows application form using the getattribute function().

2> We get Block title Attributes properly in that way:-We take a class library where we take a class.in this class we use getattribute function().Then We access the particular class from another project

But when we use the same class(Keep same structure) in client server socket program.Then it gives an exception.i.e ,"Spaicfied cast is not valid"I am Not getting any reply form teghax developer..I attached exception screen sort.Give me Suggestion How to solve this Exception

Code given Bellow :

Public Function Get_DwgFileAttribute(ByVal Sender As ClsTcpConnection, ByVal msgTag As Byte, ByVal message As String) As String
Dictionary = GetHashtable(message)
Dim varfilepath As String = CStr(Dictionary.Item("filePath"))

[code]....

View 1 Replies


ADVERTISEMENT

Client Socket - Send Message Through Client Socket Receive Specified Argument Was Out Of Range Of Valid Values

Oct 15, 2011

Below is my code, but when i send the message thru client socket i receive Specified argument was out of the range of valid values. Parameter name: size

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim serverStream As NetworkStream = clientSocket.GetStream()
Dim outStream As Byte() = _
System.Text.Encoding.ASCII.GetBytes("0800822000000000000004000000000000000920092126012345001")

[CODE]...

View 1 Replies

Info: Multithreaded Server Socket Program Or Client/Server?

Oct 26, 2011

I made a simple TCP server (I've found the example on the web) in VB to receive data from about 40 TCP clients.The clients are not synchronized but sends data about every 18 minutes; the problem is sometimes several clients sends data at the same moment, so I can't receive data.I also made a second program that reads the data (server program writes data on a file, read from the second program) scheduled.

My question is this: I've seen on the web examples about Multithreaded Server Socket Program, so I suppose this could manage my 40 clients (but now the clients are syncronized and send data at the same time in client mode) or is better get data (I have a central client that asks data to all 40 devices in server mode)?

Second question: can I make a single program where I run both TCP client and TCP server at the same time?

View 1 Replies

Identify Connection Lost Between Socket Server And Socket Client?

May 21, 2011

I wrote a Socket Client which will send the Socket Server some data and get some response from Server. This process will be running once in every 2 seconds.

Now what I need to know is How we can identify the connection lost between Server and Client?

I need this to be implemented in the Client side. If there is no connection then Client should automatically close the connection. Once the connection with the server is available in the next attempt it should connect automatically.

View 1 Replies

.net - Specific Cast Not Valid?

Apr 12, 2011

Dear friends I face a strange problem I use Linq-to-SQL to insert data in vb.net. When I insert data into SQL Server through a DataGridView it gives error of which column data type is "integer" but when I insert data through textbox it not give any error

So I face problem of datatype "integer" to error of specific cast not valid

View 2 Replies

Specific Cast Is Not Valid

Jun 14, 2012

I am Working on Teghax Component.Using This Component we want to find out Block title attribute of dwg file or autocad file in a client server socket application.

1> We get Block title attributes properly of dwg file in windows application form using the Get_DwgFileAttribute function().

2> We also get Block title Attributes properly in that way:-We take a class library where we take a class.in this class we use Get_DwgFileAttribute function().Then We access the particular class from another project

But when we use the same class(Keep same structure) in client server socket program.Then it gives an exception.i.e ,"Spaicfied cast is not valid"I am Not getting any reply form teghax developer..I attached exception screen sort. How to solve this Exception

Code given Below :

CODE:

How to fix this Exception...........

View 10 Replies

Client Server Winsock Or Socket Programming?

Jul 14, 2009

how to access client side activity i.e. which client is connected and which computer connected at the same time from server.

View 1 Replies

.net - Check The Connection State Of A TCP Server (Socket) With TCP Client?

Apr 23, 2012

For almost a week I am reading and trying to find a solution for checking connection state using a TCP Client (using socket class) In my scenario I have a TCP Client that is connected to a server (it is not controlled by me) and i want that from time to time to check the connection state, and reconnect if necessary.I have read a lot of information on the internet but i did not find a suitable solution.Briefly, these are the methods that i have found on the internet and try to implement.But unfortunatelly, i have found some scenarios where the TCP Server is closed and the TCP Client is still saying Connected 1.Example from MSDN

[code]...

View 1 Replies

Get The Client Connection Parameters Of The Socket On Server Side?

Sep 13, 2011

I want both the client and server to write and read resp. at a constant rate (which can be configured on the GUI of the client) to the buffer.I am able to send from the client at 150 bytes per packet Now, I should be able to read also at 150 bytes per packet on the server too Since, both are connected through a socket, can we retrieve the socket params (set on the client size, like 150 here) from the server end, using the tcpServer object.Or is it must to send an initial setup packet which tells about these client params and so accordingly the server can continue?

View 1 Replies

TCP Client Error While Reading Data From Socket Server?

Apr 20, 2012

I have a TCP Socket Client (using the Socket Class) that is connected to a simple TCP socket server (just for testing)I have this code snippet :

Dim aSocket as Socket
While aSocket.Connected = True
byteRead = aSocket.Receive(dataByte) 'number of bytes

[code].....

View 1 Replies

Specified Cast Is Not Valid Error On Development But Not On Test Server?

Sep 1, 2010

I have a .Net 2 solution with some asp classic pages.I get a specified cast is not valid error when I access the page on my local. Below is the vb function where I get the Error:

Public Function Retrieve(ByVal vntSeqId As String, ByRef vntPart As String, ByRef vntPartKey As String, ByRef vntEntDate As String _
, ByRef vntStatus As String, ByRef vntOrigGblId As String, ByRef vntOrigNetId As String,

[code].....

View 1 Replies

VS 2010 TCP Chat Server Closes Socket On Client DisConnect?

Jun 24, 2010

I am working on a chat client and server, and so far it works well, but when I close the client, the server throws an exception because it continues to try to do processes on the disconnected client. I have tried adding clientSocket.Close() in various places throughout the client and server with no luck. Does someone know how to add the disconnect code to either the server or client with this code?Server:

Imports System.Net.Sockets
Imports System.Text
Module Module1

[code].....

View 5 Replies

Asynchronous Socket Programming Vb 2008(.net) Again Server Should Able To Send The Data To Client

Feb 2, 2011

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.

View 5 Replies

Implement TCP KeepAlive In Program On A TCP Client(socket)?

Apr 24, 2012

I want to implement the TCP KeepAlive in order to check dropped connections by running a timer.

In my case, I have a TCP Client (using socket class) and a third party server (i have no control on it).

How can i use the TCP KeepAlive on my TCP Client in order to check the connection state?[code]...

View 1 Replies

Communications :: Client-server Communication Program - Click On CmdListen In The Server Form And CmdConnect In The Client Form

Jul 23, 2008

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

[CODE]...

View 3 Replies

Writing A Program With 1 Client And Server Where Client Side Creates A Text File

Dec 1, 2008

I have been reading through Atheists posts in regards to client-server and TCP client/server connection's. But how do i go about writing a program with 1 client and server where the client side creates a text file.Once the server sees there is a text file it connects and downloads it to itself or the client pushes the text file to the server.Once on the server i will read the text file and put its info into a sql db.

View 14 Replies

Client / Server Application - Error: InvalidArgument Value Of 0 Is Not Valid For SelecteD Index

Apr 27, 2011

I have created player to stream(broadcast) a video from server to clinet in Lan network,my problem is when I send URL of the video to client it take it and add to playlist but when I want to play it message box show's "InvalidArgument value of 0 is not valid for selecteD Index parameter name:selectedIndexSystem.windows. form" I will but the code of client and server but the I have determine the video which will be broacast in client side. [Code]

View 3 Replies

Communicate From Client To Server From Multiple Clients On Multiple Requests In Socket Programming?

Jan 8, 2010

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.

View 1 Replies

VS 2008 Multi-User Chat Program (Server & Client) With Main Server?

Aug 10, 2009

Multi-User Chat Program (Server & Client) with Main Server?

View 1 Replies

Update Server Program When Client Program Added Record To Database?

Aug 18, 2010

I am creating a very simple Voting System, that will be use on electing new set of officer in a teacher cooperative...

So I have to create two separate program, a Server Program that will manage all the information in the election and a Client Program where voters will vote their selected candidate...

The election officers wanted that the Server Program will display the Voting Results at real time... So when the Voter finished voting, The Voting Result displayed by the Server Program will also be updated every time the Client Program Insert the data to Database....

An action listener in Server Program that will execute if new data is inserted in a Table in the Database made by the Client Program...

View 11 Replies

VS 2008 TCP Server / Client - Client To Send The Server 4 Numbers - Depending On The User's Choice

May 9, 2009

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])

View 9 Replies

VS 2010 : Send Data From Client To Server (encrypted) And The String Sent From The Client Is Not The Same As Received From The Server?

Jun 27, 2011

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)

[code]....

View 4 Replies

Server And Client Tcp/ip Program?

Jan 2, 2010

I have been working on a server and client tcp/ip program and am having some issues. I start the server and then start the client, and the connection always fails. I don't know what's going wrong. Here's the

Server:
Imports System.Net
Imports System.Net.Sockets
Imports System.IO

[Code]...

View 2 Replies

Client Server Program Without Winsock?

Apr 16, 2011

how can i make claint/server program without winsocet

View 1 Replies

Create A Server And Client Program

Oct 17, 2011

I have been a web developer for a number of years now and I am making the move over to form based applications. I am trying to do what I believe should be relatively simple, yet I have no idea where to start.At home I have a machine that family members tend to use P2P programs, which causes my online gaming to suffer with glitches.I want to create a server and client program.where the client app (on my laptop) consists of only one button, when the button is pressed I want the server app (my Desktop) to kill the P2P program.I already know how to kill/start the application in question.I have previously done something similar but I had used winsock (not in VS2010) and was a long time ago.

1) Sending a value/string from the client app

2) receiving the value/string on the server app

I was told to look into the system.net.sockets namespace, but I haven't found anything on the web or here that isn't a full project / over-engineered "Basic Tutorial" that helps to break this down

View 5 Replies

Create A Server And Client Program?

Mar 20, 2009

I Want To Create A Server Program On My Computer AndClient Program That Can Run On Other Computers, The Client Program Will Connect To The Server On My Computer, But I Don't Know Code To Do This.

View 1 Replies

Create Server/Client Program In .NET?

May 7, 2009

I am trying to create a server/client program in vb.net. What I am trying to do is test a battery that is running on a handheld (which runs Windows CE 5) by connecting to a "server" and sending information every 10 seconds or so. I am very new to .NET, and am not really sure how to go about doing this. I want two separate applications running, with the server-side keeping all of the data, since the battery is going to die, and I will lose any information if I keep it client-side. I am also new to networking, so I was not sure of whether I should create a Socket, or if I should try to do something else.

View 1 Replies

Program That Uses Sockets To Connect Server To Client

Aug 2, 2010

i made a program that uses sockets to connect the server to client but there is a problem with it when i try it on this ip"127.0.0.1"wich is not a real ip just a loopback to my computer it works just fine when i use my local ip it works as well when i use my main ip from http:whatsmyip.org it doesnt work at all i dont know why it doesnt say an error or an exception but its not connecting so i gave the server to a friend of mine i tried using both his real ip and his local but still not working i dont know why?i mean i am 100% sure of my code...

View 7 Replies

Send Files From Program Client To C++ Server?

Feb 19, 2012

What's the best way to do this without using FTP?

The client would need to be able to communicate with the server for several simple tasks, such as checking if the file on the client is different from the file on the server. Or issue a "create folder" command. And of course the file transfer itself.[code]...

View 1 Replies

VS 2010 Client/Server Program Port 80?

May 24, 2012

I'm trying to make a Client that will automatically run a .DLL that I have created and send information over port 80 to my Server program that will take that data and import it into a database for me. Problem is, I don't know where to start as I have never done this before. I want to do this in VB .NET as this is the programming language that I know. What are methods of doing this? Is there sample code out there for something like this? My google searches are failing me.

A better layout of what I'm trying to do:1. Client Runs .DLL, retrieving information from an Excel file.2. Client takes these properties with the data it contains and sends it to a program outside of the local network through port 80, my boss refuses to let me use any other port.3. Server accepts the data and builds its own properties to be imported into my Access Database.4. Repeat over, and over, and over, and over.

I plan for the server application to be a console application, and the client to be a windows form.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved