Problems connecting Visual Studio to Azure. target machine refused connection? - azure

I have been uploading to Azure for at least six months. From this afternoon onwards I now get messages like this:
There was no endpoint listening at https://management.core.windows.net/xxxxxx/services/hostedservices that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8888
Can anyone give me advice on what's wrong. I tried to upload a new management certificate. That worked fine but then said "authentication error".

I have the same problem. It doesn't matter if the Fiddler is ON/OFF or the computer has been restarted - the problem is in Fiddler Option.
The msg was: "Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:8888"
Go=> Fiddler/Tools/Fiddler Option/
Connection Tab:
make sure that "Allow remote computers to connect" is NOT checked
make sure that "Monitor all connections" is NOT checked
Here is a sample video:
http://screencast.com/t/S8y9NbpveSjd
Hope this helps.

Can you please check if Fiddler is running or not? Normally when you run Fiddler it acts as a proxy and listens at port 8888.
Hope this helps.

I have the similar issue. When I use Visual Studio 2013 to download an extension. It can not connect the remote site.
Assi.NET's method doesn't work. Which means unchecked "Allow remote computers to connect" and "Monitor all connections" still can't get rid of the problem.
To fix it, I find in the machine config file, I added something to enable default proxy. Make sure you DISABLE it.
The correct code is:
<system.net>
<defaultProxy
enabled = "false"
useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>
</system.net>

Related

"Connection Reset" Error on accessing IIS 8.5 Server Site

I have create a very simple site in IIS Server version 8.5 using port 85. The site only have one index.html that shows the word "test" the page. When I access the site inside the server I can access it successfully: "http://localhost:85" is working.
Trial 1:
I try accessing it from my computer that is connected to the same network with the server using url "http://servername.test.com:85", the browser goes loading for long time and finally ends in with error "Connection Reset".
Trial 2: I try updating the Site Binding's Host name with our "Vanity Name" and "IP Address", but after this I still get a "Connection Reset" error.
Trial 3: Now I also check for opened ports using netstat, and I can see that port 85 is open. So I don't know why I'm getting Connection Reset error
Trial 4: I added Connection timeout value on the settings. But still I'm getting Connection Reset error.
Please kindly help with advise how to fix this Connection Reset issue. I can't find what is the reason behind this issue. Thank you in advance.
According to your description, I guess you may not bind the right IP address for the servername.test.com domain or use the wrong ip address bind with servername.test.com domain.
I suggest you could firstly try to use the server's ip address to access your web application to make sure you firewall setting and IP setting is right.
If your client server and the IIS server are in the same domain and you have installed an DNS server, then you could access the web site by domain. Details about how to set the DNS server, you could refer to this article.
If you just want to test, you could try to modify the hosts file in the C:\Windows\System32\drivers\etc path in your client server.
For example:
127.0.0.1 www.example.com
I've found the solution. I issue was caused by Firewall enabled on the server and the ports are not opened by the Network Administrators. So I just opened the Ports that I will be using and it works now. Installing IIS Failure Tracing help me catch the error also. Thank you for all those who answered.

Using ngrok with IISExpress on windows

I'm used to using a Mac, and ngrok is a breeze; all you need to do is specify a port, but I'm new to IISExpress, and I can't figure out how to use ngrok and/or IIS correctly. To be clear, I've inherited a Windows machine from a coworker (who has left the company) and the set up works great locally.
The local url is similar to:
thing.somedomain.com
In the bindings section of IIS, I've got:
Type Host Name Port IP Address
http thing.somedomain.com 80 *
I've used this page for reference: https://www.twilio.com/blog/2014/03/configure-windows-for-local-webhook-testing-using-ngrok.html
The instructions seem reasonable, but they don't work for me. These instructions indicate that the file applicationhost.config needs to be altered for IIS. I have found this file, and found the correct section for the site I need to ngrok. The binding info does not match what's in the IIS gui though:
<binding protocol="http" bindingInformation="*:4085:localhost" />
As per the instructions, I have added:
<binding protocol="http" bindingInformation="*:4085:whatever.ngrok.io" />
(Here every time I run ngrok on windows I get ngrok.io instead of ngrok.com, which seems odd. I've tried accessing both ways with no luck.)
I have restarted the site on IIS (in the actions menu). When I try to access the ngrok url from a remote machine, ngrok returns 502 bad gateway, and the remote machine shows:
Failed to complete tunnel connection
The connection to http://whatever.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:4085.
Make sure that a web service is running on localhost:4085 and that it is a valid address.
The error encountered was: dial tcp 127.0.0.1:4085: ConnectEx tcp: No connection could be made because the target machine actively refused it.
When I try to go to localhost:4085 locally, I get "This webpage is not available". When I try to go to localhost:80, I get a redirect to a different site the IIS is serving. When I try 127.0.0.1:80, I get a 404 error.
I have tried using netstat -a -b, and have tried all of the ports associated with 127.0.0.1, and nothing turns up the correct site (yet still thing.somedomain.com still works correctly).
I'm completely mystified, and don't know what to try next, or where the problem lies (in how I'm starting ngrok, in how I'm accessing ngrok, in how the bindings are mapped, in how IIS restarts, a firewall issue, or some other voodoo). This should be bloody simple!
So it turns out that there was nothing to change in the ApplicationHost.config file, AND I was looking at the wrong ApplicationHost.config file (the real file is normally hidden from view in C:/Windows/System32/inetsrv/Config, but you can open it in Notepad from a Command Prompt that has elevated privileges (Run as Administrator)). The actual binding info was:
<binding protocol="http" bindingInformation="*:80:thing.somedomain.com" />
Which is what matched what IIS was showing. That said, what I needed to change was how I invoked ngrok:
ngrok http -host-header=thing.somedomain.com:80
And that was it. I also allowed external traffic to the hostname with this:
netsh http add urlacl url=http://thing.somedomain.com/ user=everyone
There is a way to make it easier. Let's say your IISExpress website is http://localhost:63254
Just start ngrok like this:
ngrok http --host-header=rewrite localhost:63254

Windows Server 2012 actively refused connection via tcp/ip

Need help on this!
I'm trying to connect and send a message from my client pc to our host server (Windows Server 2012) via TCP/IP. I configured the DTC connections and also opened the firewall but I still get this error.
Any suggestions on what to configure in order to fix this?
UPDATE: Here is the "View Detail" section:

Windows Azure: FTP issue When Connecting to Website

I am trying to connect to website in win azure using filezilla. It connected fine for few minutes and I was able to upload the files. But then it stopped working. I am getting this message:
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (137,117,88,16,40,32).
Command: LIST
Response: 150 Opening BINARY mode data connection.
Response: 550 The network connection was aborted by the local system.
Error: Failed to retrieve directory listing
I have tried setting transfer mode to ACTIVE and few other suggestions, but nothing seems to work. What could be the problem?
There might be a time-out issue on the server. You will need to tell your FTP client to keep the connection alive so that it doesn't start a second connection while the first connection is still alive.
To set this in FileZilla client, go to Edit, Settings, Connection, FTP, and check "Send FTP keep-alive commands" checkbox.
For more detailed explanation of the problem, visit: http://blogs.msdn.com/b/wats/archive/2013/12/13/setting-up-a-passive-ftp-server-in-windows-azure-vm.aspx Scroll towards the bottom and read the "Points to consider from Azure SLB perspective" section.
I had the same problem with my FTP on Azure (getting 550 errors) and checking the "Send FTP keep-alive commands" checkbox above solved my problem.
Hope this helps!
The error message:
Response: 550 The network connection was aborted by the local system
Suggests that there is an error in your local network.
This error is not within Windows Azure, but within your local network (and appears to only be triggered by FileZilla). Contact your system administrator or Internet Service Provider. Also, please try first solving the problem yourself using something like this.

Do SMTP services need to be installed for a web app to send emails via a mail server on another box?

I am having problems with sending emails from an ASP.NET MVC 4 app. I am getting the dreaded:
No connection could be made because the target machine actively refused it 127.0.0.1:25
The client's mail server is on another box. I have the correct host name and I can ping it. I can also use telnet to show that the mailserver is ready and listening on port 25.
In my web.config file, I have the following:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="support#myclient.co.uk">
<network host="mailserver1" clientDomain="OfficeNetwork.local" />
</smtp>
</mailSettings>
</system.net>
However, I still get the error above, as if it was trying to find a mailserver on the local machine.
Why?
Not being an expert on IIS or mail servers, do I need to add anything to the default configurtion so that my web app, running on the web server, can use the mailserver that is on another box? Ie, is there an SMTP service I need to install for this to happen?
You need to add SMTP as a new role in IIS. Its fairly easy.
This should get you started
Don't forget to check the service has started and running.
The network guy came back and solved it. However, I have no idea why it works.
All he did was create a user and password on the mail server that I added to the tag and voila all problems disappear. I suspect it is down to how they have security configured for the mail server and they aren't telling me... Alternatively, they don't have a clue either and either got lucky and someone told them to try that.
So another day older and not even a little bit wiser. Just deeper in debt. But not to the network guy.

Resources