Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4097044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:07:23+00:00 2026-05-20T20:07:23+00:00

i am having a internet / security issue with some code i have written.

  • 0

i am having a internet / security issue with some code i have written.

Basically i am trying to initiate a HttpWebRequest from c# code to a particular URL. nothing fancy, just a basic request.

When i execute on my local machine it works fine.

When i deploy the code to a Windows server 2003 environment the GetResponse method exceptions as follows…

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xxx.xxx:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at xxxxxx.xxxxxxxxxx.xxxxxxxx.xxxxxxxxxx()

Interestingly, if i put the same URL into an internet explorer browser, the page loads fine so i dont think its a connectivity issue.

I have thought maybe firewall? -> but its turned off.

I also investigation .NET runtime security and temporarily set the All_Code group to have FullTrust.

Lastly, i added the URL to the trusted sites group.

No idea!!

Can anyone help?

HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(postURL);
httpRequest.Method = "POST";
httpRequest.ContentType = "application/x-www-form-urlencoded";
httpRequest.GetResponse();

Here is the trace log…

System.Net Verbose: 0 : [5004]
WebRequest::Create(http://xxxxxxxxxxxxxx)
System.Net Verbose: 0 : [5004]
HttpWebRequest#63835064::HttpWebRequest(http://xxxxxxxxxx#-1903155940)
System.Net Verbose: 0 : [5004] Exiting
HttpWebRequest#63835064::HttpWebRequest()
System.Net Verbose: 0 : [5004] Exiting
WebRequest::Create() ->
HttpWebRequest#63835064 System.Net
Verbose: 0 : [5004]
HttpWebRequest#63835064::GetResponse()
System.Net Information: 0 : [5004]
Associating HttpWebRequest#63835064
with ServicePoint#11454272 System.Net
Information: 0 : [5004] Associating
Connection#60504909 with
HttpWebRequest#63835064
System.Net.Sockets Verbose: 0 : [5004]
Socket#21950498::Socket(InterNetwork#2)
System.Net.Sockets Verbose: 0 : [5004]
Exiting Socket#21950498::Socket()
System.Net.Sockets Verbose: 0 : [5004]
Socket#21950498::Connect(53:80#904160388)
System.Net.Sockets Verbose: 0 : [5004]
Exiting Socket#21950498::Connect()
System.Net Information: 0 : [5004]
Associating HttpWebRequest#63835064
with ConnectStream#37614147 System.Net
Information: 0 : [5004]
HttpWebRequest#63835064 – Request:
POST /xxxxxxxxxxx HTTP/1.1

System.Net.Sockets Verbose: 0 : [5004]
Socket#21950498::Send()
System.Net.Sockets Verbose: 0 : [5004]
Data from Socket#21950498::Send

// SOCKET DATA

System.Net.Sockets Verbose: 0 : [5004]
Exiting Socket#21950498::Send() ->
297#297 System.Net Information: 0 :
[5004] ConnectStream#37614147 –
Sending headers { Content-Type:
application/x-www-form-urlencoded
Host: paint.pure360.com Connection:
Keep-Alive }. System.Net.Sockets
Verbose: 0 : [5004]
Socket#21950498::Receive()
System.Net.Sockets Verbose: 0 : [5004]
Data from Socket#21950498::Receive

// SOCKET DATA

System.Net.Sockets Verbose: 0 : [5004]
Exiting Socket#21950498::Receive() ->
176#176 System.Net Information: 0 :
[5004] Connection#60504909 – Received
status line: Version=1.1,
StatusCode=302,
StatusDescription=Found. System.Net
Information: 0 : [5004]
Connection#60504909 – Received headers
{ Connection: close Content-Length: 0
Content-Type: text/html Date: Wed, 23
Mar 2011 00:59:11 GMT Location:
http://xxxxxxxxx Server: Apache }.
System.Net Information: 0 : [5004]
ConnectStream#35460724::ConnectStream(Buffered
0 bytes.) System.Net.Sockets Verbose:
0 : [5004] Socket#21950498::Dispose()
System.Net Information: 0 : [5004]
Associating HttpWebRequest#63835064
with ConnectStream#35460724 System.Net
Information: 0 : [5004] Associating
HttpWebRequest#63835064 with
HttpWebResponse#65961401 System.Net
Warning: 0 : [5004]
HttpWebRequest#63835064::() – Error
code 302 was received from server
response. System.Net Warning: 0 :
[5004] HttpWebRequest#63835064::() –
Resubmitting request. System.Net
Information: 0 : [5004] Associating
HttpWebRequest#63835064 with
ServicePoint#47602007 System.Net
Information: 0 : [5004] Associating
Connection#3927761 with
HttpWebRequest#63835064
System.Net.Sockets Verbose: 0 : [5004]
Socket#66771947::Socket(InterNetwork#2)
System.Net.Sockets Verbose: 0 : [5004]
Exiting Socket#66771947::Socket()
System.Net.Sockets Verbose: 0 : [5004]
Socket#66771947::Connect(22:80#383746063)
System.Net.Sockets Error: 0 : [5004]
Exception in the
Socket#66771947::Connect – A
connection attempt failed because the
connected party did not properly
respond after a period of time, or
established connection failed because
connected host has failed to respond
95.128.223.22:80 System.Net.Sockets Verbose: 0 : [5004]
Socket#66771947::Dispose() System.Net
Error: 0 : [5004] Exception in the
HttpWebRequest#63835064:: – Unable to
connect to the remote server
System.Net Error: 0 : [5004] at
System.Net.ServicePoint.GetConnection(PooledStream
PooledStream, Object owner, Boolean
async, IPAddress& address, Socket&
abortSocket, Socket& abortSocket6,
Int32 timeout) at
System.Net.PooledStream.Activate(Object
owningObject, Boolean async, Int32
timeout, GeneralAsyncDelegate
asyncCallback) at
System.Net.Connection.CompleteStartConnection(Boolean
async, HttpWebRequest httpWebRequest)
System.Net Error: 0 : [5004] Exception
in the
HttpWebRequest#63835064::EndGetResponse
– Unable to connect to the remote server System.Net Error: 0 : [5004]
at
System.Net.ServicePoint.GetConnection(PooledStream
PooledStream, Object owner, Boolean
async, IPAddress& address, Socket&
abortSocket, Socket& abortSocket6,
Int32 timeout) at
System.Net.PooledStream.Activate(Object
owningObject, Boolean async, Int32
timeout, GeneralAsyncDelegate
asyncCallback) at
System.Net.Connection.CompleteStartConnection(Boolean
async, HttpWebRequest httpWebRequest)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:07:24+00:00Added an answer on May 20, 2026 at 8:07 pm

    Your Win2003 configuration probably has a default proxy that is causing this problem. Go into InternetOptions of your IE installation and see if there is a proxy being used. Also, giveing a snippet of the code will help understand the issue more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Internet Explorer (don't appear to have an issue in FireFox) the following code
I'm having Internet Explorer 6 problems on one of my sites, and I really
Having a problem getting a TreeView control to display node images. The code below
Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
I am having a really bad issue where no matter what I try, the
Internet explorer seems to not handle having two divs both with different semi-transparent backgrounds.
We're having the following weird (well...) behavior in all versions of Internet Explorer browsers
I am having trouble accessing the document in my firefox extension. I am trying
I am having trouble setting up landscape mode in my application. I have a
I am having some issues with deploying my MVC 2 application on a IIS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.