Click here to Skip to main content
13,260,330 members (37,031 online)
   

C#

 
AnswerRe: Go to finally in try block Pin
PIEBALDconsult30-Jan-13 8:53
memberPIEBALDconsult30-Jan-13 8:53 
AnswerRe: Go to finally in try block Pin
jschell30-Jan-13 9:04
memberjschell30-Jan-13 9:04 
AnswerRe: Go to finally in try block Pin
Abhinav S30-Jan-13 22:32
mvpAbhinav S30-Jan-13 22:32 
AnswerRe: Go to finally in try block Pin
V.30-Jan-13 23:10
memberV.30-Jan-13 23:10 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 23:15
mvpRahul Rajat Singh30-Jan-13 23:15 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 23:18
mvpRahul Rajat Singh30-Jan-13 23:18 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 16:46
memberdevvvy31-Jan-13 16:46 
QuestionHttpWebRequest Resolving to the wrong IP Address Pin
Ennis Ray Lynch, Jr.30-Jan-13 5:08
memberEnnis Ray Lynch, Jr.30-Jan-13 5:08 
File this under, it worked fine yesterday.

<br />
Uri uri = new Uri("http://ftp.nhc.noaa.gov/atcf/aid_public/");<br />
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);<br />
request.Timeout = 1;<br />
HttpWebResponse response = (HttpWebResponse)request.GetResponse();<br />


Yesterday, this code works fine. Today it doesn't. From what I can tell I think the IP address on the server has changed. When I remove the timout and wait, I can see that an incorrect IP address is being used. However, I can browse to the URL so the DNS is correct on my system (even command line tools resolve to the correct IP) I have tried flush DNS although, to be honest, there is no reason that should work, and it didn't resolve the issue.

So, I am left assuming that somehow, the .NET framework is caching an IP address somewhere. Now, I could reset the machine or clear all of the .NET temporary files but that would leave me with a temporary solution. What I need/want is someway to force .NET, via code, to always resolve the DNS and to not use any cached DNS (Assuming this is the error)

Also, if you have any troubleshooting suggesting that are "in-code" let me know. Rebooting, etc, is not an option because this will eventually be production code so it needs to be robust, I can't hold the hands of the application.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

"All users always want Excel" --Ennis Lynch

AnswerSolved my own problem Pin
Ennis Ray Lynch, Jr.30-Jan-13 6:49
memberEnnis Ray Lynch, Jr.30-Jan-13 6:49 
QuestionC# linq to sql error Pin
classy_dog29-Jan-13 20:10
memberclassy_dog29-Jan-13 20:10 
AnswerRe: C# linq to sql error Pin
Richard MacCutchan29-Jan-13 22:13
mvpRichard MacCutchan29-Jan-13 22:13 
QuestionReference confusion Pin
yudhistira dewanata29-Jan-13 19:57
memberyudhistira dewanata29-Jan-13 19:57 
AnswerRe: Reference confusion Pin
Abhinav S29-Jan-13 20:01
mvpAbhinav S29-Jan-13 20:01 
GeneralRe: Reference confusion Pin
Shameel30-Jan-13 4:26
memberShameel30-Jan-13 4:26 
QuestionSerial Port Errors, User Messages Pin
C-P-User-329-Jan-13 7:23
memberC-P-User-329-Jan-13 7:23 
AnswerRe: Serial Port Errors, User Messages Pin
jibesh29-Jan-13 12:57
memberjibesh29-Jan-13 12:57 
Question.NET Brush serialization/WYSIWIG [Solved] Pin
Amlanjyoti Saikia29-Jan-13 1:32
memberAmlanjyoti Saikia29-Jan-13 1:32 
AnswerRe: .NET Brush serialization/WYSIWIG Pin
Brisingr Aerowing29-Jan-13 4:12
memberBrisingr Aerowing29-Jan-13 4:12 
GeneralRe: .NET Brush serialization/WYSIWIG Pin
Amlanjyoti Saikia30-Jan-13 2:54
memberAmlanjyoti Saikia30-Jan-13 2:54 
Questionhow to check the avaialbility of username from database Pin
Santhosh V.T28-Jan-13 21:51
memberSanthosh V.T28-Jan-13 21:51 
AnswerRe: how to check the avaialbility of username from database Pin
OriginalGriff28-Jan-13 22:17
mvpOriginalGriff28-Jan-13 22:17 
AnswerRe: how to check the avaialbility of username from database Pin
PIEBALDconsult29-Jan-13 4:59
memberPIEBALDconsult29-Jan-13 4:59 
AnswerRe: how to check the avaialbility of username from database Pin
Marcus Kramer29-Jan-13 6:11
mvpMarcus Kramer29-Jan-13 6:11 
QuestionLearning C# .Net - From where to start.? Pin
mbatra3128-Jan-13 20:21
membermbatra3128-Jan-13 20:21 
AnswerRe: Learning C# .Net - From where to start.? Pin
OriginalGriff28-Jan-13 22:23
mvpOriginalGriff28-Jan-13 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 24 Nov 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid