Write An App That Communicates With A Server That Was Written In C?
Aug 23, 2009
I am trying to write an app that communicates with a server that was written in C. Not knowing C at all so i have some problems understanding the messages in c-style struct format that i need to send from the vb.net side.
[Code]...
View 3 Replies
ADVERTISEMENT
Jul 18, 2009
I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...
Option Explicit On
Option Strict On
Imports System.IO.Ports
Public Class Form1
[Code]...
Every time when i click the button, I get the timeout exception error message.
View 1 Replies
Oct 12, 2010
I'm not sure if this is where I should post as to this is my first time on these forums. But, I am creating something that communicates to a server, and on the server part it's giving me troubles, and I am confused on how to fix it. I did rip the code off some where online.The line that I am getting the error "Warning2'Public Sub New(port As Integer)' is obsolete: 'This method has been deprecated. Please use TcpListener(IPAddress localaddr, int port) instead.[URL].. on is this line:
Dim tcpListener As New TcpListener(portNumber)
Imports System.Net.Sockets
Imports System.Text
Module Module1
[Code]...
View 1 Replies
Feb 24, 2012
I am hoping to get some advice on a project that I am wanting to work on. I have never done a web service/windows service or anything along the lines of what I am thinking so I would like some advice from some more experienced developers.I will be using VS2008 and VB.NET. My company currently mostly works in .NET 2.0 for our commercial application, but since this will be used mostly in house I would be able to use .NET 3.5 if suggested (am just not overly familiar with the additional features in .NET 3.5).What I would like is to have a server/service that communicates with multiple PCs. I want to create an application/web page (not familiar with web development so would probably start out as a winform app and possibly move to a web app to consume the service) that would query the web service/remoting service/whatever to retrieve information from each of the PCs (track the version of the application that is running, retrieve log files, push an update program to the PC (to be run manually)).
Not being too familiar with this type of scenario I was thinking something to the effect of:Each PC run a Windows Service that monitored the local PC. When something changes (software update installed?), tell the web service that the new version is installed.A service (web service? remoting server? other?) running on a PC that would be the interface to the windows service (not sure how the web service would talk to the Windows service without the Windows service initiating, though, unless it is also running a server) on the individual PCs. The service could request an update from the PCs (get the software version, request a file). The service would also be able to push an update program to the PCs to be run manually.
View 2 Replies
Dec 19, 2008
Basically, I have an app that communicates with a server. I need a way to monitor all the sent and received packets that are being transmitted through the app. I've been killing myself the past two days trying to figure a way to hook into ws2_32.dll to monitor these packets but I can't find a way!
View 2 Replies
Jul 13, 2010
In my application, I've built an object that communicates with an OPC server and whenever the value of a certain OPC item changes, it logs all the OPC items to a database. This all works beautifully. However, I'm having a problem with disposing of the instances of this class. Whenever I want to remove an instance of this class from the application, I'm dereferencing the object (objDevice = Nothing) and letting GC take care of the rest. I've inserted breakpoints and am monitoring to ensure that the object is dereferenced (it is).
Problem is, even after the object has been dereferenced and is CONFIRMED to be equal to Nothing, the object is still logging data to the database. I'm still trying to get a handle on disposing of objects properly, but most everything I read tells me to dereference and let Garbage Collection take over.
View 5 Replies
Oct 31, 2009
I need to write in the text of the button written in it "—10x" but when I copy it from MS word it is copied like that " —10x"
View 3 Replies
Sep 10, 2009
I want to pass an XmlDocument as a parameter to my webservice method. After I have loaded an XML file from a path, when I try to send the XmlDocument as a parameter by webservice method, I come across this error. What can be the reason? I use StreamWriter and I close it. I don't use XmlWriter.The development environment is VS 2008
Error Message:
Cannot write XML declaration. WriteStartDocument method has already written it.
Edit (from comments):I can't post all the code because it has more than 1000 lines. Also when I load Xmldocument in web, I can't use this method without problem. Maybe Webservice causes a problem?
Dim xml As New XmlDocument
xml.Load("My Documents" & xmlfile & ".xml")
myTransfer.Save_XML(xml, 1)
[code]....
View 1 Replies
Mar 6, 2011
I tried to write a text written in my textbox to file.(a .txt). I scanned it to see if it contained any illegal characters, the program said that it did not. However, when I went to save it it said that the program performed an illegal operation.
System.Runtime.InteropServices.COMException was unhandled Message: Exception from HRESULT: 0x800A0005 (CTL_E_ILLEGALFUNCTIONCALL).
It created the text file but did not write the content of the textbox to the file.I can save the text in Microsoft word without a problem. Is there something wrong with the encoding for the textbox and how do I set the encoding for the characters so I can write it to a text file.
View 4 Replies
Dec 20, 2011
I am parsing a web page with the HTML agility pack in vb.net and it works great most of the time, but I have come across a site I need help with.
When I go to grab the web page with my http object (I am using chilkat http and it does not have a javascript engine) I get back the page which is poorly written with document.writes for basically the entire page.
I do not want to use the browser control to first render the page.
Do you know of anything that will allow me to parse this page easily with xpath... does xpath work with javascript? Is there a way for me to remove the javascript with the agility pack?
View 1 Replies
Feb 20, 2009
I have recently written a few TCP Client/Server classes for an application. The main thing I am worried about is if the server class is built efficient enough; I don't have any previous experience with tcp networking so I need someone to give constructive criticism and feedback on the design. I'll explain the server design below.At the very bottom of my framework is a ServerClient class, which is pretty much a TCP client with some extra methods, properties, and events. Each ServerClient continiously read for packets, once one in received, they raise a packet received event... this will come in later on.
The actual server class is simple, it uses another thread to endlessly loop waiting for connections. When a connection is found, it converts the TCP Client into one of the above ServerClients then adds event handlers for the packet received and disconnected events. Finally, it stores the newly created ServerClient into a hashtable with all of the other people who are connected to the server.
When a packet is received by one of the ServerClients it is forwarded to the server(because the event handler was set when the connection was established) and then in turn forwarded onto the application with the sender's ID.Just a brief overview, I'm not attaching any code because I don't like doing that. If you want to see it then send me a PM. I'm just looking for constructive feedback on the design; will this system work, will it scale with a lot of users, and how do large servers handle so many clients at one time?
View 6 Replies
Oct 27, 2010
I am trying to run simple application (e.g. generated from template by VS.NET 2010) on IIS6. I changed it to run with .NET 4.0 (its application pool) and checked with regiis (this pool has 4.0). I also changed all possible httpHandlers (svc etc), to run with NET4.0. All possible rights are checked (i think so). Almost every request results in "Server Application Unavailable" (sometimes it is empty page with -2146232576 (0x80131700) value) and "...Please review this log entry to discover what caused this error to occur." but EventViewer and IIS Log are empty.
View 2 Replies
Jun 5, 2009
I want to make a program that can communicate with other programs, Like a tcpserver/client.But i don't know where to start. I want the user to be able to submit several urls to pictures on the internet and for other users to be able to view those pictures. How can I do this?
View 1 Replies
Nov 9, 2011
I Have a problem with vb.net. Basically I created an application that communicates via system.net.socket. on the server side of client connect, and a thread checks whether there are new incoming data. if there are data, puts them in a few tread declared variables, together with the "index" of the server. once this is done through "INVOKE" calls a routine that checks the incoming data andperforms an operation based on the data. I'll see what I do not work
Dim returndata As String = System.Text.Encoding.ASCII.GetString(data)
TextBox1.Text = ("DATA : " & returndata & "Socketindex =" & socketindex.ToString & " Index=" & index.ToString)
But that does not appear in the texbox, appears only "returndata", the rest c 'is same thing with the messagebox, individually, can display a messagebox with variable,but when I try to make a messagebox that displays them together, the texbox same thing!
And the same thing if I want to compare them with each other, for example
if index
= 0 then msgbox ("OK")
It does not work ...
View 2 Replies
Sep 20, 2011
Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
View 2 Replies
Apr 26, 2010
I need to have my visual basic.net application write to my sql server database. I followed a video tutorial, and have matched the code exactly, replacing my table names where theres are. It runs, but I can an error. This is the code that I have
Imports System.Data.SqlClient
Public Class frmAlcOrderForm
Private cs As New SqlConnection("Data Source=hbgsqlserver.hbg.psu.edu;Initial Catalog=IST421-03;Persist Security Info=True;User ID=IST421-03;Password=IST421sql")
[Code].....
This is the error that I am getting on the cmb.GetUpdateCommand - Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
There are 2 fields in the table, and I have tried making one or both primary keys and I get the same error.
View 1 Replies
Jul 9, 2009
I need to write a couple of columns to a csv or possibly xls file. I cannot find any good tutorials on this.
View 2 Replies
Aug 11, 2010
I currently have an HTML form that saves one input to a txt file that exists on my website.
I want to do this using visual basic(not vb script) in a codebehind page for and aspx form. everything i find on google tells me how to save the file on my computer or to a server on my system. This server exsists on a hosted website and I don't have access to the permissions on that host.
This works fine for the form post. how do i do it with vb
View 9 Replies
Jul 30, 2009
how i read data from Sql server and write that in .csv file with vb.net , after that saving the .csv file with my own name and path? what must i do? for information data in sql like this one:
[Code]....
View 9 Replies
Nov 29, 2011
I'm currently creating an SSIS job that will pull picture data from a SQL database and write each picture to a file. We have an ID system that stores all images taken of staff directly to database fields, but we're going to be moving to a new system that stores all of the images as files in paths by User ID.
I have already created my main data flow that gets all of the users and the proper path, but I'm having trouble writing the script component that will create the images. I have the image data as a string, but how do I get it to go out to a file at the proper path?
[Code]...
View 2 Replies
Dec 4, 2011
I have 2 labels that need to be given value from sql server db
[code]...
now how do i put two different values in these two labels??
View 3 Replies
Mar 4, 2010
I am looking into writing a web-based vehicle tracking system. The framework I have in mind looks something like this:
Client application --- Database --- Database updater.
Client application: This would query the database for information and then display this information on a map.
Database: holds vehicle information such as speed, location, payload etc.
Database update: This application would need to continually check for information received from vehicles and then add that to the database.
I am confident that with my current skill set and some research and learning, I could write the client application and interface it to a database. However, I am at a loss as to how to write the database updater. Presumably, this would be an application running continually on the server, waiting for information to be received from vehicles and updating the database. Is this something I can do with ASP.NET and Visual Basic? Or would this require a different way of thinking than writing web pages?
View 2 Replies
Feb 10, 2010
I'm new to network programming and i'm trying to write a server that can communicate with multiple clients through tcp/ip, the clients need to communicate with the server to and with the other clients. Currently i've got a client server program that works fine for only one client:
[Code]...
I'll guess to accept multiple clients i have to create some clienthandler class at server side, but i have no idea which code it has to contain, i've already spend hours searching on google but didn't find anything usefull. Can somebody help me with this ?
View 1 Replies
Jul 20, 2010
I'm trying to write a windows app that will download files from a server. It is working fine for small files, but not the larger ones (50Mb+)- I get the error "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."This is the code I am using:
Private Function DownloadFile(ByVal fileSource As String, _
ByVal fileDestination As String, _
ByVal WebRequestType As String) As Boolean
[code]....
View 1 Replies
Nov 7, 2009
I've been scrambling my brain to figure out how to access my FTP server thing to get a list of text files in a folder and to edit the contents of those files online.
View 1 Replies
Jul 29, 2011
I am looking for some code to help me backup up my table data to a text file using vb.net, I just want to write all the rows in the table to the text file.
View 1 Replies
Aug 5, 2010
How do i read information from a mysql server and write all info on table name links to a file?
View 3 Replies
Jan 31, 2012
I am looking to make a SMTP (Port 25) listener to listen in and accept incoming mail, look at the message source, make changes if needed, and retransmit the message out another port. This iwll make it act like a sort-of intermediary service.how one would write a port listener in VB.net, that could listen in on the port, and display the message in a text box (the whole source, headers and all, since that's what the mail comes in as anyway).
View 3 Replies
Oct 2, 2011
I'd like to write a simple Windows form that will make it easy to record a voice message before uploading it to a remote web server and sending the URL to the recipient(s):
[URL]
Currently, the user has to use Sound Record to record the message, use an FTP client to upload it to a web server, and finally, use an e-mail client to send the URL. I'd like to combine those three features into one.
View 14 Replies
Nov 22, 2011
I have question to ask.
I have a dll file written for reading&writing data on USB.To use dll in VB.Net, one needs to integrate a .vb file which interface to that dll file to use its functions, properties etc..
What I need is to use this dll in a C# project. is this possible?[code]...
View 3 Replies