HttpWebRequest - The underlying connection was closed: Unable to connect to the remote server.

I am developing an asp.net/vb.net web application locally on my development pc.  My development pc is a member of a Small Business Server 2000 (SBS) domain and as such it connects to the internet thru the proxy server (ISA) on the SBS.

I am trying to process a credit card transaction using HttpWebRequest as follows:
webRequest = CType(webRequest.Create("https://www.viaklix.com/process.asp"), System.Net.HttpWebRequest)
With webRequest
.KeepAlive = False
.Method = "POST"
.ContentType = "application/x-www-form-urlencoded"
.ContentLength = postData.Length
End With
webRequestStream = webRequest.GetRequestStream()
etc...
When the webRequestStream = webRequest.GetRequestStream() gets called I get an exception indicating that 'The underlying connection was closed: Unable to connect to the remote server.'
I believe that the proxy server is blocking the call because it sees the request as comming from the local ASPNET user on my local development pc and the proxy server doesn't see that as an authorized user.
Does anyone know how I can configure my local development pc or my proxy server to allow this to work while developing/testing from my local pc.
Thanks in advance
Tony Reece
0
Tony
1/2/2005 9:36:41 PM
asp.net.security 27051 articles. 1 followers. Follow

0 Replies
1081 Views

Similar Articles

[PageSpeed] 10

Reply:

Similar Artilces:

The underlying connection was closed: Unable to connect to the remote server.
Hi guys, I have problem with the above HTTP response while trying to post a request from one aspx (from A site) to another aspx page (at B site) which is hosted at the same web server. Which particular area should I pay attention to ?? Thanks ictie...

The underlying connection was closed: Unable to connect to the remote server
I am writing a valid link checker but get an error of "The underlying connection was closed: Unable to connect to the remote server" It seems to only happen if there is a www in the link. What is the best way to approach this Dim httpReq As HttpWebRequest = CType(WebRequest.Create(strLinkURL), HttpWebRequest) httpReq.AllowAutoRedirect = False httpReq.Proxy = System.Net.GlobalProxySelection.GetEmptyWebProxy() httpReq.Credentials = CredentialCache.DefaultCredentials ...

The underlying connection was closed: Unable to connect to the remote server.
Not my code. I purchased Enterprise Forms. It is suppose to email the data from the form submitted using the following code to receive the forms data and store in a string. The last line is where the code is throwing the error.The dev server runs it properly the live server has the problem. The are both 2k3 server. Using same firewall and DNS settings. System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);       req.CookieContainer = new System.Net.CookieContainer();      for(int i = 0; i <...

The underlying connection was closed: Unable to connect to the remote server.
Hello, all... I'm in the process of trying to deploy a web app to a W2K box. The application itself installs flawlessly, but when I try to generate a report, I get the following error: -------------------------------------------------------------------------- The underlying connection was closed: Unable to connect to the remote server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: ...

The underlying connection was closed: Unable to connect to the remote server.
I have the following problem with all the web services clients I created. What could be wrong? The underlying connection was closed: Unable to connect to the remote server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server. Source Error: Line 35: [System.Web.Services.Protocols.SoapDocumentMethodAtt...

The underlying connection was closed: Unable to connect to the remote server
Hi, I am getting this error message.I am using myWebClient.OpenRead(uriString) method. Stack Trace is     Accessing http://www.amfiindia.com/portal/upload/downloadnav.txtException  The underlying connection was closed:  Unable to connect to the remote server.stackrace at System.Net.HttpWebRequest. Here is my code private void Button2_Click(object sender, System.EventArgs e) { try { // Create a new WebClient instance. // Just file reader WebClient myWebClient = new WebClient(); // Download home page data. string uriString="http://www.amfiindia.co...

The underlying connection was closed: Unable to connect to the remote server
 I`m getting the error: The underlying connection was closed: Unable to connect to the remote server[WebException: The underlying connection was closed: Unable to connect to the remote server.] System.Net.HttpWebRequest.CheckFinalStatus() +677 System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +74 System.Net.HttpWebRequest.GetRequestStream() +233 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +105 myapp.myapp.Login(String User, String Password) myapp.WS.WS_Test.RUN_Login.Page_Load(Object sender,...

underlying connection was closed:unable to connect to remote server
I have been receiving this exception for over a week with a .NET remoting app and can't find a solution anywhere that works.  Below I'll paste my config files and the client code calling the remote method.  I'd really appreciate some assistance. The Server code and files are on a remote server within our facility and have been told more than once there is no firewall between my workstation and it.  So firewalls are out of the question as the source of the problem.  I assume its somewhere in my config files but I've tried everything I've seen on the net. I receive the Net...

Underlying connection was closed. Unable to connect to remote server.
The subject is the error i get when i try to consume my webservice from my web application running on a machine outside of our firewall. Inside everything works like a charm. The machine that runs the web app is a windows 2000 server which uses a proxy. I can connect to and get information from my webservice through a browser without any problems. When i try to do it programatically from inside my webapp it fails. I found a few suggestions of things to try such as: modifying machine.config file to include the address of the proxy like so: <proxy usesystemdefault="f...

Error: The underlying connection was closed: Unable to connect to the remote server
Dear all,I have a webservice project running on Computer A.I am calling a webmethod from this web service from an asp.net project on computer B, it is working correctly.But the problem is when i am trying to call the same webmethod from another asp.net project on the computer B, i am receiving this error:The underlying connection was closed: Unable to connect to the remote server.it is not a security problem or configuration since the same webmethod is working on the first asp.net project Can anyone help, thanks.   Any help please....

The underlying connection was closed: Unable to connect to the remote server. #2
I created a webservice, which get some information about certain typpe of items from about 4 suppliers. My webservice was working fine and getting proper result from all the suppliers servers, until one the suppliers changes  its production server link. After making changes with the new link, I m receving error:The underlying connection was closed: Unable to connect to the remote . the code i m using is:NetworkCredential nc = null;Uri uri = null;nc = new NetworkCredential("NewUserName","NewPassword");string requset = "xml=" + strRequestXml;uri = new Uri(NewURL + strRequestUrl);HttpWebRe...

The underlying connection was closed: Unable to connect to the remote server. #2
I am working with asp.net web applications along with RSS feed back when I tryed to access RSS feed content then I get following error message The underlying connection was closed: Unable to connect to the remote server. what is the solutions for above problem help me if someone can! thank you maxamx sounds like you are closing the connection to the remote server before you read the xml data.  can you post some code or anything to reference the problem further? If my post is helpful please mark as answerRegards -- jp(http://www.rzrsolutions.com/rzrWeb20/BlogViewScreen.aspx...

"The underlying connection was closed: Unable to connect to the remote server.".
Hi,We have created Paypal Sandbox profile.Then, we tried to use. we are getting the following error."The underlying connection was closed: Unable to connect to the remote server.".We are using ASP.NET USING VB.We are getting the error in the following line.response = CType(caller.Call("TransactionSearch", request), TransactionSearchResponseType)Urgent help is needed. If anyone know, let me know.Urgent help!!!!!!!!!!!!!!!!!!!!!!! sekaran--Regarding this... sekaran wrote:..."The underlying connection was closed: Unable to connect to the remote server."....We are getting the error in the...

Web Service: The underlying connection was closed: Unable to connect to the remote server.
When I access the web service when I'm on the LAN at work everything functions fine. When I try and access the service from outside the firewall, I get the error. I'm not using a proxy server, I can access the VS.NET generated interface page just fine from outside the firewall as well. On the web server the hosts the web service I have port 80 and 443 open. What else do I need to do w/ the firewall, client app or the service to get it to work? If you could tell me of additional ports, or anything I need to do it would be appreciated. Thanks...

Deploying HTTPPost test
Hi,I have a test page which sends an HTTPPost to another page on my server and writes out the response. It works perfectly on my Localhost but when trying it on our test server I have come accross the above problem.I have tried with our URL and the server IP as the address. I know that the Connection string is correct as I am testing the connection on the page.Here is my Post code: try { string result = ""; StreamWriter myWriter = null; HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(server + "/messagehandler.aspx"); objRequest.Method = "POST"; objRe...

Error Using DNS Provider Procedures--"The underlying connection was closed: Unable to connect to the remote server."
Hi, We are using the DNS Provider and DNS Client Component that comes with MPS Companion(Version 1.1). We have installed the DNS Provider in a Windows 2000 Server machine where core MPS is installed. We have installed the DNS Client Component in a Windows 2003 Server machine where DNS server is installed. When we try running the procedures CreateResourceRecord,RefreshDNSZone etc from the Windows 2000 Server using provtest utility it is throwing the floowing error "The underlying connection was closed: Unable to connect to the remote server." I am attaching a sa...

Web Referenced WSDL always getting "The underlying connection was closed: Unable to connect to the remote server." error
I'm getting "Exception Details: System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server." on reference.cs file.I looked up this error and there were fixes for it, if it was occuring intermittently (I applied it anyway without success).  However my error seems to be permanent.  FYI, web service is Java based and client is of course .NET based.  Does it sound like service provider issue?Thanks in advance Java Web Server shouldn't be a problem;There are many reason why this can happen:1.Check if your personal Fir...

Error trying to consume web services: Underlaying connection was closed. Unable to connect to the remote server
 HiI'm having an issue that is making me crazy. I have a small web application that have a dll library reference that is calling an external web service through port 11000. In my IIS localhost the web application works fine, and connect to the web service correctly.However, when I upload the web application to the server and I try to run it, the webservice returns 'Underlaying connection was closed. Unable to connect to the remote server'. I did a Google search for this and I found this issue may be caused by some firewall or proxy block, so I opened the in-out 11000 TCP por...

The underlying connection was closed: Unable to connect to the
Hi,I am using following to to check DNS is available or not.Try' similarly we can select any server address for bufData miningDim strURL As String = "http://www.directnic.com/whois/index.php?query=" + strDomainNameDim web As New WebClient' byte array to store the extracted bufData by webclientDim bufData As Byte()bufData = web.DownloadData(strURL)' got the bufData now convert it into string formfirstLevelbufData = Encoding.Default.GetString(bufData)' this exception will be fired when the host name is not resolved or any other connection problemCatch ex As System.Net.WebExceptionlblMes.Text =...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
  Hi I am using WebService in asp.net during webservices call an error occur some time. Which through the message like   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept aliv...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
Hello everyone, Please I truly need your help. I just changed my code from asp.net 1.1 to 2.0, and my page calls both the database and webservice for data. In asp.net 1.1, my code works perfectly, but in 2.0, I keep getting this error "Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." I spent weeks online and I got this code, Public Class MyTestServiceInherits VHMS.SOAPService Protected Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequestDim we...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Hi,  If anyone knows..... why would the above mentioned error occur?   It happens at this line of my code : iBranchHierarchyLevel = objdbAccess.org_GetBranchHierarchyLevel(iUserBranchID)   I am using a web reference - which is connected to objdbaccess and org_GetBranchHierarchyLevel is a method   tnx :) Follow this thread please http://forums.asp.net/t/1127234.aspx  Hosam Kamel Remember to click on Mark as answer on the post that helped you...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server
Hi I am using WebService in asp.net during WebServices call an error occur some time. Which through the message like   The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was ...

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. (SOMETIMES)
This is an Asp.net page that gets info from a IBM Shadow web system. This works 100% for getting HTML but when a image is added an error sometimes occurs. (Could it be the amount of data transfered???). The error is : "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." This ONLY happens in .net 2.0 and NEVER in .net 1.1. I have searched but not found an applicable solution for this. Is there a property that needs to be set different?   [CODE]HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sRemoteURL); /...

Web resources about - HttpWebRequest - The underlying connection was closed: Unable to connect to the remote server. - asp.net.security

System.Net.HttpWebRequest & pipelining
If the number of sent pipelined requests reaches 10, no more requests will be written to the server (pipeline “paused”). When the number of written ...

Newest 'internet-explorer-11' Questions - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

Command Line Client for Google Reader in IronPython
A few days ago I blogged about my plans to make RSS Bandit a desktop client for Google Reader. As part of that process I needed to verify that ...

Making JSON Web Requests easier with async and await
Source code for this sample: http://www.billreiss.com/wp-content/uploads/2013/01/TestJsonWebAsync.zip The application landscape of today often ...

Application Analytics
Mighty Moose is nearing release. One of the new items that we have built into it is some user tracking. The user tracking is extremely benign ...

digg API.NET - C# Implementation of digg Web Services - CodeProject
A C# Library Interface For the Digg.com API; Author: thund3rstruck; Updated: 5 Oct 2007; Section: C#; Chapter: Languages; Updated: 5 Oct 2007 ...

WebClient vs HttpClient vs HttpWebRequest
What's the best way to call a REST API on C#? I'll review the 4 main classes (RestSharp included) to make requests and process their responses. ...

DotNetKicks.com : Kick Spy!
DotNetKicks.com is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

NuGet Project Uncovered: TranslatorService.Speech
If you are coming to this series of posts for the first time you might check out my introductory post for a little context. TranslatorService.Speech ...

realtime data « 5/6 « Gnip Blog Gnip Blog
Now that the new Gnip convenience libraries have been published for a few weeks on GitHub , I’m going to tell you a bit about the libraries that ...

Resources last updated: 2/16/2016 6:17:19 PM