Click here to Skip to main content
11,484,640 members (56,877 online)
   

C#

 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 8:32
mvpEddy Vluggen30-Jan-13 8:32 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 8:31
memberMacRuturaj30-Jan-13 8:31 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 8:42
mvpEddy Vluggen30-Jan-13 8:42 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 8:49
memberMacRuturaj30-Jan-13 8:49 
QuestionNLog question Pin
vanikanc30-Jan-13 6:46
membervanikanc30-Jan-13 6:46 
AnswerRe: NLog question Pin
Abhinav S30-Jan-13 7:09
mvpAbhinav S30-Jan-13 7:09 
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 
AnswerSolved my own problem Pin
Ennis Ray Lynch, Jr.30-Jan-13 6:49
memberEnnis Ray Lynch, Jr.30-Jan-13 6:49 
This is a two part issue. The root cause is a proxy server but this was masked by the following scenario:

The code base is shared between a Windows Forms application and an ASP.NET application. When I went from Windows Forms to ASP.NET I got the error. However, when I went back to Windows Forms, I still got the error leading me to conclude that the issue was not caused by ASP.NET. If I am to speculate, the persistence of the issue has to do with a secret cache by .NET, I cheated and cleared the System.Net.ServicePointManager internal service point tables but that did not resolve the issue, rebooting did however. So now that I knew the code worked in Windows Forms but not ASP.NET and sometimes not back-and-forth I had more to go on.

It seems that ASP.NET, does not use the PROXY servers configured for the local machine. My particular workstation uses a proxy configuration file and not a direct proxy so I had to research the proxy. When I use HttpWebRequest under windows forms the proxy is automatically used but when I use the HttpWebRequest under ASP.NET the proxy is ignored. With this little tidbit:

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://ftp.nhc.noaa.gov/atcf/aid_public/");
request.Proxy = new System.Net.WebProxy(new Uri("my proxy server"));

Solves the issue. Overall this makes sense that it is a proxy issue, however, I would expect HttpWebRequest to behave in the same manner under both environments?

Last note, my above code will not work with an authenticated proxy, of course, but if anyone has a similar issue, good place to check.

Rant, why oh why, can't I get uniform consistent behavior and why must their be a myriad of "secret" configuration files that alter "consistent behavior" because, to be honest, I am certain the issue is not Windows Forms vs ASP.NET but secret (ok, not really secret) but numerous configuration files all conspiring to, by default, offer different behavior in the different environments.
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

QuestionC# app.config permission Pin
classy_dog29-Jan-13 20:11
memberclassy_dog29-Jan-13 20:11 
AnswerRe: C# app.config permission Pin
Richard MacCutchan29-Jan-13 22:15
mvpRichard MacCutchan29-Jan-13 22:15 
AnswerRe: C# app.config permission Pin
LokoLuke30-Jan-13 1:35
memberLokoLuke30-Jan-13 1:35 
AnswerRe: C# app.config permission Pin
Shameel30-Jan-13 4:22
memberShameel30-Jan-13 4:22 
GeneralRe: C# app.config permission Pin
jschell30-Jan-13 9:07
memberjschell30-Jan-13 9:07 
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 
QuestionDynamic Reference to Dll Path Pin
Member 461637929-Jan-13 2:53
memberMember 461637929-Jan-13 2:53 
AnswerRe: Dynamic Reference to Dll Path Pin
Alan N29-Jan-13 4:29
memberAlan N29-Jan-13 4:29 
AnswerRe: Dynamic Reference to Dll Path Pin
jschell29-Jan-13 14:50
memberjschell29-Jan-13 14:50 
Question.NET Brush serialization/WYSIWIG [Solved] [modified] 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 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web02 | 2.8.150520.1 | Last Updated 25 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid