VS 2008 - API Functions To Use For Getting Remote Host Name
Jul 6, 2010
Does someone know what api funtion to use for getting remote host name right now i use System.Net.Dns.GetHostName and the nbtstat -a function, but still have some computers that i dont get their host name but i do get their mac with send arp...so how cna i get their host names with an API call..
This is my code for dns.hostname ..
vb.net Dim myIPs3 As System.Net.IPHostEntry = Dns.GetHostEntry(hello)
Dim newhost3 As String = myIPs3.HostName
View 2 Replies
ADVERTISEMENT
Jan 20, 2010
Rather than use an Entry name of an existing VPN connection, is it possible to connect to a remote network by creating a temporary connection on the fly by using the remote IP/Host name, username and password?
View 6 Replies
Oct 1, 2009
I've been trying for a long time to do what seems to be the most simplest of things..I have a remote host and I need to know if certain posts on that host are open or closed.Many examples on the net that I have found arent complete, and because I havent worked with VB.net for long I dont knowhow to complete them.Here is my code:: The issue is with this it tell me the target port is always closed, when I know that it is open.Code:Dim host As String = "www.google.com" Dim port As Integer = 80 Dim addr As IPAddress =CType(Dns.GetHostAddresses(host)(0), IPAddress) Try Dim tcpList As New TcpListener(addr, port)tcpList.Start() Catch sx As SocketException MessageBox.Show("port is closed") End TryA friend of mine suggested using WinSock.. I've not dealt with it before so I don't know what he's on about.
View 2 Replies
Sep 9, 2009
When I to connect to remote host to retrieve sql record...
it execute to few minute will get his error message... but there is already work perfectly and get connected... it loop it a few record only will occur this error...
"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
View 6 Replies
May 19, 2010
I have a fat VB.NET Winform client that is using the an old asmx style web service. Very often, when I perform query that takes a while or pass a large amt of data to a web service in a dataset, I get the subject error.The error seems to occur in < 1 min, which is far less than the web service timeout value that I have set or the timeout value on the ADO Command object that is performing the query within the web server.It seems to occur whenever I am performing a large query that expects to return a lot of rows or when I am sending up a large amount of data to the web service. For example, it just occurred when I was passing a large dataset to the web server:System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the rem
View 3 Replies
Sep 19, 2011
I have an application that copies a file from a network/internet location. I am trying to catch the exception for when the network connection becomes unavailable (or internet goes down). Currently i catch the exception "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." which occurs on the bold, underline line below.The issue i have is i try and attempt the operation to continue doing what it was doing by resetting variables and then reassigning them to continue reading the stream but cant get past this error. The only way to go past it is to stop and start the application which is not what im after. [code]
View 1 Replies
May 24, 2012
I want to restore an simple .SQL file,
The MySQL Server is Protected with password and is an remote Host
View 1 Replies
Aug 15, 2010
What would be the most quickest way to edit a text file on a remote host?
View 3 Replies
Nov 19, 2009
I have created a Windows service that runs on one of our servers. The service lisens to incoming connections on a set socket port, runs a series of WMI queries on the requested computer in a new thread (the socket accepts a string value as input which is the hostname to scan), creates an xml file based on the collected data, and posts it back to a webserver. This works perfectly on all WMI queries, but i have one function that gets all installed software from the requested host using the RegistryKey.OpenRemoteBaseKey method to get all keys from the "SOFTWAREMicrosoftWindowsCurrentVersionUninstall" key on the target host. If the the target machine OS is Window Vista or 7, it returns no values. If i run this code on the target machine it works, but not from the service on a server. The service is installed and runs with full domain administrator rights. I guess this is a permission issue, but i have not found a good solution on how to solve it on the internet. As a workaround i use WMI to get a list of installed software from computers running Vista or 7. The problem with the WMI method is that it's very slow. It takes 10 - 15 seconds just to loop thru all ManagementObjects in the Querycollection. Maybe i could filter the WMI query better before starting the loop ?
[code]...
View 2 Replies
May 19, 2012
Below error is thrown in a already opened program which connects to different database
A transport-level error has occurred when sending the request to the server.
(provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
Program details: code done using vb.net with MSSQL 2008 as back-end
Two instance of same exe where running simultaneously in same PC but error was thrown only by one instance Program uses both sqlconnection(ADO.NET) and ADODB connection(upgraded from VB6) and the error is thrown by both types of connection. If the error is due to network problem with the server then why few programs work fine? I am not able to trace the reason for this behavior of the program. Can I know why this error occurs and why only in few programs of same instance.
View 5 Replies
Oct 23, 2009
way to retrieve list/rename hiddne files from the remote host. I need to upload the file to a server and then move it to another directory, but the file after being transfered becomes hidden. If I try to rename it any way I get the dreaded 550 in response. I would hate to move to commad line scripting which at the moment seams to be my only option.
View 4 Replies
Dec 6, 2010
What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.
Public Shared Function Get...(byval xx as xx)
and
Public Function Get...
The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).
View 1 Replies
Aug 5, 2011
I have a tcp server that uses TCPListener and the async method BeginAcceptTCPClient:
Imports System.Net.Sockets
Imports System.Threading
Imports System.Net
Public Class TCPServer
[Code]...
My problem is that infrequently, I get an exception in the HandleAsyncConnection method:"An existing connection was forcibly closed by the remote host" right at the EndAcceptTCPClient method. At this point, the TCPListener seems to stop listening. The problem is that I can't test this easily, as it only happens on a remote test VM and only once every 24 hours or so. If I knew how to recreate the error with a test client, I would be able to figure this out. Wireshark shows a reset [RST] packet being sent at around the time of the exception. So I either need to know how to handle the exception, or how to recreate the problem with a test client.
View 1 Replies
May 21, 2009
I want to get the absolute host name from a URL that's in the format of a string. So far I have done it like this:[code]I need the host without the www for comparision purposes.If I have two strings "url...m" and "url...m" I'm interested in only seeing that they are both on the domain "url...m". Is there some fairly simple way to do this?
View 5 Replies
Dec 14, 2009
Right now, my app connects to a free file hoster to get some data. What are some better ways to host this "data"?
View 5 Replies
Aug 13, 2009
i want to add WPF Control to my windows forms application so i need to use element host but i couldn't find WPF Interoperability tab so i tried to add the reference and then add the control but i got this error why? and btw i tried also in C# and i got the same problem
View 8 Replies
Sep 3, 2010
I have been trying to trace a list of urls by using the url to get the ip and then use that to assign it a country. When using DNS.gethostentry or even DNS.gethostbyname I get the following error:
SocketExceptionwascaught: No such host is known
Now I even tried fetching the url first using httpwebrequest to ensure the url is valid but the error keeps showing up regardless. I know there are a few urls that don't work but I thought my code would catch and continue.
Try
For Each prod In querylist
If myfetcher.getHtml(prod, userAgent, page) Then
prod = Regex.Replace(prod, "http://", "")
[code]....
View 1 Replies
Aug 26, 2010
For my program to work i need to download a text file from the server. For example Text.txt In that text file for example i have 3 file names
Vb.txt
Vb.exe
Vb.dll
I tried to download the file with a simple method.
My.Computer.Network.DownloadFile("http://website.com/appinfo/newfiles.txt", My.Application.Info.DirectoryPath & "
ewfiles.txt")
[Code].....
View 6 Replies
May 10, 2010
I am working on an addin/plugin for CAD software called Solidworks. I use it to batch process files (print, save, etc). One thing I'd like to add is a form that contains a stop button to stop the loop. The problem is that even if I use a background worker like I normally would for a standalone application, it still locks up when Solidworks is processing files. That's just normal operation for the program, the UI freezes when doing a cpu intensive operation such as loading or saving files, regardless of how I write my plugin. So my limited attempts at threading to get a form that won't freeze have been unsuccessful so far.
View 1 Replies
May 9, 2011
I have a (very) simple WCF written in VB which I can build and publish locally to IIS. Works great.
What I need to do is (somehow) deploy it to a different server which does not have IIS. It's supposed to be run as a windows service.
how to do this. All directions on MSDN seem to be for VS 2010 (we're using 2008).
View 1 Replies
Jan 6, 2012
I read some posts in the vb.net forum for how to modify your host file on your computer adding the domain website to block. this worked great. Then i went to a website such as vtunnel.com and was able to view the blocked website through it. So to still block it I need to add [url]... to the host site as well as any others?
View 4 Replies
Apr 24, 2011
I am working on an app that searches my network and retrieves ips and host names, but when using this.[code]
View 2 Replies
Jul 13, 2009
I'm building an Expandable Groupbox control (source will be available in the codebank if I finish it), which is basically a groupbox with a [-] or [+] button to the left which allows the user to expand/contract it.
I've got it working pretty well, but now I want the user to be able to click the button in the designer to expand/contract the groupbox, rather than having to find the Expanded property in the property list every time. The ExpandableGroupbox control is just a UserControl with two panels (header and container), with an actual Button and a label for the text in the header panel. I know how to enable the user to click the button, even in the designer (this is done using WndMsg's and stuff, don't really understand that but it works!).
Now, there is one problem. When the button is clicked during design-time, the control is contracted (it's size changes), but the designer is not notified of this change. The selection rectangle remains as if the control size never changed, which is very confusing to the user. It only changes to the correct size after I select something else, and then select it again: At the moment, when the button is clicked it raises an event called Expand. I thought I could have my Designer class listen for that event, and refresh the selection service when it fires. I can get the control the designer is designing simply with the "Control" member.
Now here's the problem: Obviously I need to attach the Expand event using AddHandler, and I can see only one time to do that: in the constructor of the Designer.
So I tried it:
vb.net
Public Class ExpandableGroupboxDesigner
Inherits System.Windows.Forms.Design.ParentControlDesigner
Public Sub New()
[Code].....
1. Can you see any other way to listen for the event? There is no 'control initialized' event or something I can use where I can attach the event as far as I know.
2. How do I refresh the selection service in the first place??
View 2 Replies
Jan 29, 2007
1) Is it possible to access the Excel mathematical functions without actually opening Excel?
I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?
2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?
Or for all those that Microsoft have chosen to document online at least.
View 1 Replies
Aug 5, 2010
I want to do a small application that made the broadcast of images from a PC. The idea is to make an application of remote management but without the management part, only with the viewing of images. Anyone know any code already done or any API that helps in the project?
View 8 Replies
Nov 29, 2009
I used to develop applications in VBA, but now I'm using SQL Server 2008 Integration Services for a lot of the functionality, and using VB.NET as the scripting language where needed - all of which are new to me. I need to do the same string manipulation in several different SSIS tasks. With VBA, I'd simply write a function and declare it Public, and I could use it from any module. E.g.
Public Function MakeId(ByVal Country As String, ByVal Postcode As String) As String
....
End Function
' later...
Dim MyId as String
MyId = MakeId(County, Postcode)
But when I do that in a Script Task or Script Component, I find I can't call the function from VB in any other Script Task or Component; it says MakeId is undeclared. It works within its own 'box', but not from anywhere else.
View 3 Replies
Oct 26, 2010
I am using Visual Studio 2008 to try and create a calculator program that can convert binary to decimal. I have some code but I'm having problems figuring out what to write as an "argument" when I was to call the function.
Here is the code I have so far.
Public Class Form1
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
[Code]....
View 4 Replies
Mar 1, 2009
I am trying to pass multiple signature calls to an overloaded function. My understanding is that VB can recognize the different signatures and use the appropriate function.[code]...
View 2 Replies
Jan 17, 2010
how to use Right and Left Functions in VB.NET 2008?
View 1 Replies
Mar 3, 2010
I was curious if anyone has heard of writing a program with functions only. It is part of my current assignment but all the examples I have seen all over have at least subs for the click events. SO I am a little confused to say the least.
View 3 Replies