I have an application I have been working on and it can be slow to start when my ISP is down because of DNS. My ISP was down for 3 hours yesterday, so I didn't think much about this piece of code I had added, until I found that it is always slow to start. This code is supposed to return your IP address and my reading of the link suggests that should be immediate, but it isn't, at least on my machine. Oh, and yesterday before the internet went down, I upgraded (oymoron) to XP SP3, and have had other problems.
So my questions / request:
1. Am I doing this right?
2. If you run this on your machine does it take 39 seconds to return your IP address?
One last note. If I resolve a name all is well.
Public Class Form1
'http://msdn.microsoft.com/en-us/library/system.net.dns.gethostaddresses.aspx
'
'excerpt
'The GetHostAddresses method queries a DNS server
'for the IP addresses associated with a host name.
Yesterday s**ked, and today ain't (sic) looking better. I have an application I have been working on and it can be slow to start when my ISP is down because of DNS. My ISP was down for 3 hours yesterday, so I didn't think much about this piece of code I had added, until I found that it is always slow to start. This code is supposed to return your IP address and my reading of the link suggests that should be immediate, but it isn't, at least on my machine.Oh, and yesterday before the internet went down, I upgraded (oymoron) to XP SP3, and have had other problems.So my questions / request:
1. Am I doing this right?
2. If you run this on your machine does it take 39 seconds to return your IP address? [code]
Dim host As String = System.Net.Dns.GetHostName() Dim LocalIP As String = System.Net.Dns.GetHostAddresses(host).GetValue(0).ToString ListBox1.Items.Add(CStr(LocalIP))
Dim host As String = System.Net.Dns.GetHostName() Dim LocalIP As String = System.Net.Dns.GetHostAddresses(host).GetValue(0).ToString ListBox1.Items.Add(CStr(LocalIP))
I have a utility that is a simple exe that is not installed compiled with VS2005 and works well. But when I upgraded to VS2008 the utility can no longer locate files in the active system folder. I have UAC turned off and am logged in as the Administrator and it still can not locate a file that I can see in Windows Explorer. The file I am looking for is PakMgr.exe.
I have finished coding an application which I designed for people working in my office. When I started to install the application to computers at the office, I realized that, in some machines, application doesn�t work properly. Although it worked for 15 computers perfectly, for 3 computers following error code is displayed:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
[code]....
WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll It displays in my Immediate Window when i run my program, I'm using a text reader to read a number of XML files using background worker...most the time it stops so something is wrong but sometimes it works fine.
I am trying to perform a simple bound connection between an Access database and a text box on a form. This is actually Chapter 18 of the "Microsoft Visual Basic 2008" book.I get the same error message when trying to create my own project "MY ADO Form" or the "ADO Form" project supplied from the DVD provided with the book. I am running the 90 Day Trial Version of Visual Studio 2008 with SP1 and Net 3.5 SP1.
My operating system is the 64 bit Version of Vista with all updates.The error when I try to run the application in the debug mode is:"A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll"and as a result no data shows up in the text box from the database and the data selection bar is grayed out in the form. The underlying database "Students Data Set" appears to be fine as I have seen the correct data for the fields "Instructor" and "PhoneNumber" prior to running the program and when connecting with the database.
I have a bit of trouble right here, I am trying to get the data from the site and input them in the listview. Well, when my main app start to load through on debug, then it start to display a warning. The warning is: Unable to cast object of type 'System.String' to type 'System.IFormatProvider'.
i have made a client and server chat system in VB 2008 with winsock,it's a one to one chat and works perfect fine, but do anyone know how to turn it into a multi-client chat system? Code in below: Here is the code for the server:
I am getting following error whenever I want to use IIf function inside entity framework query.
LINQ to Entities does not recognize the method 'System.Object IIf(Boolean, System.Object, System.Object)' method, and this method cannot be translated into a store expression.
I was trying to find a reliable code snippet to get the mac address of a given computer, when I came across this resource I used the VS.2008 s beautiful feature of code upgrade!
I am writing a program for a bus station which has nothing less than 20 different locations lets use different countries for instance. e.g UK,Ireland, Australia, USA, Indonesia, Singapore Malaysia, china, Venezuela, India, Thailand, Korea, japan, Yemen etc..In a dropdownlist u have to select your origin and destination (one of the 20 locations), and when you submit, the system should return in a dialog box,
the "bus " e.g.(BT132) and :bus fare:" e.g.($5) for all locations (origin and destination must be different).without using a database unless its impossible not to use a database.
with WIN 7 + Vb.net 2008 express how can i get the IP address and MAC id of my system..i got a thread there here but i couldn't fallow as it caused error.
This code searches your system and displays ever file that it found in to a listbox. The problem is that it always gets stuck at one file called C:windowsvery long name but ends with runtime.exe how can i add a skip function so that if does get stuck it will just skip that file.It always says "The device is not ready."can you fix this bug.I have been fighting with this for 3:28 hours
Why do i get this error ?I know the answer is staring me in the face but i cant figgure it out, i have been over the code so many dam times :/See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Function GetHtml(ByVal url As String, ByRef web As WebBrowser) As String
Dim WebString As String Dim myURI As New Uri(url) web.Url = myURI WebString = web.Document.Body.InnerHtml Return WebString End Function System.NullReferenceException
i am creating an application that needs to read a text file from an external hard drive, the paths etc are all correct however i am getting the error System.UnauthorizedAccessException"i have searched through various forums and googled it and the only solution i can find is to allow the .net user permissions however i dont have this user/group on my system.also i am using Windows 7, dont know if that should make a difference.
Public Class frmMain Public Structure Movie Public Name As String
How would i code this script in vb 2008, cannot find any information anyway
Dim objFSO, objFileStream, sFileName as string, sFileBuffer as string, sSearchValue as string, bValueExists as boolean sFileName = "c:file.txt" 'Path to file sSearchValue = textbox1.value 'Value you are searching for
I have just converting my VB6 project to VB.NET 2008. I have set up start with Model. It start with Main() sub, in Main sub I have declare as below:
Dim frm as new Formpwd frm.show()
In formpwd I have UserId, PWD as test box and Two command buttons. The system executes form_load code and then PWD and UserId_Gotfoucus handler and then closes the system. Why is not waiting to accept UserId and PWD?
I was wondering if i can get a tutorial (hopefully a vid tut) on how to make a Login System in vb 2008 I wanted it so that i can manage the accounts tho. So if i give my program to someone with the login system and then i make an account on my pc via another program he can login to my program with that account.
I have made some real time systems (softwares). Now I want to make an system (software) in vb.net 2008 which reads an bar-code saves the data in the database (SQL Server database). I am very new in making these types of system, thus i would like your help of making an system using bar-code scanner through vb.net 2008. Specific to my question I will require all the steps for creating an bar-code system through vb.net 2008. I am waiting for your reply.
I am trying to develop an application to monitor and keep track of all the prints in the office.I have gone through some of the tutorial and found out system.printing has the functions to do so. But when I tried to import it, it says name space or type specified for system.import doesn't contain any public member or cannot be found.