Click here to Skip to main content
15,893,722 members
Home / Discussions / C#
   

C#

 
GeneralRe: Go to finally in try block Pin
Jibesh30-Jan-13 7:44
professionalJibesh30-Jan-13 7:44 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 15:44
devvvy31-Jan-13 15:44 
AnswerRe: Go to finally in try block Pin
Eddy Vluggen30-Jan-13 7:45
professionalEddy Vluggen30-Jan-13 7:45 
AnswerRe: Go to finally in try block Pin
PIEBALDconsult30-Jan-13 7:53
mvePIEBALDconsult30-Jan-13 7:53 
AnswerRe: Go to finally in try block Pin
jschell30-Jan-13 8:04
jschell30-Jan-13 8:04 
AnswerRe: Go to finally in try block Pin
Abhinav S30-Jan-13 21:32
Abhinav S30-Jan-13 21:32 
AnswerRe: Go to finally in try block Pin
V.30-Jan-13 22:10
professionalV.30-Jan-13 22:10 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 22:15
professionalRahul Rajat Singh30-Jan-13 22:15 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 22:18
professionalRahul Rajat Singh30-Jan-13 22:18 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 15:46
devvvy31-Jan-13 15:46 
QuestionUnit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:07
MacRuturaj30-Jan-13 7:07 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Ennis Ray Lynch, Jr.30-Jan-13 7:16
Ennis Ray Lynch, Jr.30-Jan-13 7:16 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:19
MacRuturaj30-Jan-13 7:19 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Ennis Ray Lynch, Jr.30-Jan-13 7:28
Ennis Ray Lynch, Jr.30-Jan-13 7:28 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
PIEBALDconsult30-Jan-13 7:22
mvePIEBALDconsult30-Jan-13 7:22 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:24
MacRuturaj30-Jan-13 7:24 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:22
professionalEddy Vluggen30-Jan-13 7:22 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:29
MacRuturaj30-Jan-13 7:29 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:32
professionalEddy Vluggen30-Jan-13 7:32 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:31
MacRuturaj30-Jan-13 7:31 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:42
professionalEddy Vluggen30-Jan-13 7:42 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:49
MacRuturaj30-Jan-13 7:49 
QuestionNLog question Pin
vanikanc30-Jan-13 5:46
vanikanc30-Jan-13 5:46 
AnswerRe: NLog question Pin
Abhinav S30-Jan-13 6:09
Abhinav S30-Jan-13 6:09 
QuestionHttpWebRequest Resolving to the wrong IP Address Pin
Ennis Ray Lynch, Jr.30-Jan-13 4:08
Ennis Ray Lynch, Jr.30-Jan-13 4: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

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.