Ngrok - 502 Bad Gateway - ngrok

I am installing Ngrok, but I am stuck at "Expose a local web server to the internet" I am using "ngrok http 80" this command and opening localhost page too. but sowing "502 Bad Gateway" Error

I resolved this by making sure IIS Express was running on my PC. In visual studio I ran my web app, that started up IIS and then closed it down. Then NGROK started working again. HTH Benjamin

Try executing ngrok.exe as an administrator , and use the port 80 .
ngrok.exe http 80

Related

dotnet not following system proxy settings

I installed fiddler the other week, and now some HTTPs requests only work when Fiddler is open and running. When Fiddler is not open. I have gone into Windows system proxy settings and confirmed that the proxy server is off. Uninstalling fiddler does not fix it.
I also uninstalled Fiddler Everywhere and installed Fiddler Classic. Same thing, only works when Fiddler is running, only difference is the port number changes. It looks like dotnet core is caching the information somewhere that I cannot find.
I am using .net 6.0.3 and Visual Studio 2022. When running the same code on production server there is no issues. There should be no proxy server set.
No connection could be made because the target machine actively
refused it. (127.0.0.1:8888)
UPDATE: Looks like RestSharp is caching the proxy?

WebsitePanel 2 totally NOT working on Windows Server 2012 on Azure

I’m having many troubles installing WebSitePanel on an Azure Virtual Machine, with Windows Server 2012.
I followed the steps in http://www.websitepanel.net/documentation/deployment-guide/server-configuration/preparing-windows-server-2008-r2-for-websitepanel-installation/ and installed everything I needed.
Then, I installed the WebSitePanel Standalone Server package with the installer.
I opened the endpoint for the port 9002 on Windows Azure; so I pointed my browser to myhostname.cloudapp.net (note: in Azure you don’t have a static IP address, instead you have an hostname like [hostname].cloudapp.net).
So, loading myhostname.cloudapp.net:9002 fails, and any browser shows something like “Unable to load page”. I think it’s a 400 or a 500 server error.
How come?
IIS works perfectly on the server, in fact the default website runs without problems on port 80.
This issue occurs when you change the binding to another IP address.
Usually I fix this situation by going to the IIS control panel where I change binding back to 127.0.0.1:9002
In case you haven't found the correct solution yet :
edit your hosts file under system32/drivers/etc and put the url you have set up during the installation there with your local ip
You should be able to access websitepanel portal with the url

Visual Studio 2012 Web Deploy to Windows Server 2008 R2 with IIS 7 and /msdeploy.axd 404 error

In Visual Studio 2012 RC when I try to validate a Web Deploy connection I get this error message:
ERROR_DESTINATION_NOT_REACHABLE
The required Web Management Service is started on the server and Web Deploy 3.0 RC is installed.
Then using Remote Desktop Connection I log on the server and go check IIS logs located at C:\inetpub\logs\LogFiles\W3SVC1. There I can see my attempts to validate the connection because they contain my IP address:
2012-07-13 20:58:49 185.201.117.17 HEAD /msdeploy.axd site=Default%20Web%20Site 8172 - 189.10.32.194 - 404 0 2 78
It's giving me a 404.
After trying to get this working for almost 6 hours now (reading a lot of material including this great Troubleshooting guide by IIS team titled Troubleshooting Web Deploy problems with Visual Studio and this related question Visual Studio 2010 Web deployment task failed) I decided to ask for help here and see if anyone has a clue about what can be the problem... Do you know what's causing this 404 error?
If you need any more info, just ask me and I'll provide it... :)
Edit 1
Yesterday I also tried the following msdeploy command on my local machine to list the the contents of a folder called test on the server [ and it worked as expected ]:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -verb:dump -source:content
path=c:\test,computerName=xxxxxxxxxx.publiccloud.com.br,username=User,password=Password
Info: Using ID 'a246a13c-7777-4226-964c-fe9934c60b77' for connections to the rem
ote server.
MSDeploy.contentPath
c:\test
c:\test
c:\test\test.txt
Edit 2
After a lot of install/reinstall operations I finally got to a point where Windows Server 2008 is returning a 503 HTTP error when I try to publish the web site using VS 2012 RC or even msdeploy in the command line.
Looks like the best thing to do now is to do a clean install of Windows Server 2008 since I got a messed up VM server image to work with. Hope it'll do the trick.
Just for the record, this is the msdeploy command VS 2012 tries to execute. I did a copy/paste and tried it with msdeploy in the command line:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe -source:manifest='E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.SourceManifest.xml' -dest:auto,ComputerName="https://xxxxxxxxxx.publiccloud.com.br:8172/msdeploy.axd?site=Default%20Web%20Site",UserName='UserName',Password='Password',IncludeAcls='False',AuthType='Basic' -verb:sync -enableRule:DoNotDeleteRule -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"E:\SISPEC\SISPEC\obj\Release\Package\SISPEC.Publish.Parameters.xml" -retryAttempts=2
just to get the same 503 Server Unavailable message.
Edit 3
This question was cross-posted at the IIS Web Deployment Tool (MS Deploy) forum here.
Fyi - I too was getting the 404 errors. It turned out that I had to download the full package and install everything.
http://www.iis.net/downloads/microsoft/web-deploy#additionalDownloads
I had this same error (ERROR_DESTINATION_NOT_REACHABLE). I was able to fix the issue by opening port 8172.
I then ran into the error: ERR_COULD_NOT_CONNECT_TO_REMOVESVC which I was able to resolve by installing every component of Web Deploy 3.0. It was trying to hit /MSDEPLOYAGENTSERVICE which by default isn't installed by the Web Deploy 3.0 installer.
I had to manually add the Deployment Handler. In IIS Manager, with the server selected, choose "IIS|Handler Mappings|Add Managed Handler...".
Request path: msdeploy.axd
Type: Microsoft.Web.Deployment.DeploymentAgentHandler,..., Version=9...
Name: Web Deploy Whatever
In my case, the default certificate issued for WMSVC was not issued for the machine-name. My Solution was to:
Issue a certificate for the machine name from my domain CA. This could be self-signed if you're willing to trust the certificate.
Install that certificate under the Personal certificate store
stop the web management service
change the certificate to my properly issued certificate
restart the service.
Did you check your handlers? You can test this by creating an HTML page on the same folder and trying to access that HTML. If you can, then go check that your site has the necessary handlers. Also, make sure your DNS record are pointing to the correct IP address.
First I tried just Repair install of Web Deploy 3.0 and not worked. Removing and installing solved my issue.
In my case I had both Web Deploy 2.0 and 3.0 on server machine.
Removing both and installing just 3.0 solved my issue.
Ensure Web Management Service is started.
I deleted SSL certificate and the service stopped working.
If all previous indications fail, and if you are using an Azure virtual machine, where the endpoint for 8172 is open, I have solved it deleting the endpoint and opening it again. I believe the first time I have selected using Floating IP Enabled, and that did not work. Just create the endpoint again, select disable floating ip and done!

The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR

I am able to start Glassfish through command line. However, when I try to start the server through Eclipse I encounter the following error:
The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR
I have checked my login credentials (admin/adminadmin) and they are correct (I'm able to login into the admin console on port 4848 with the same user/pass). Here is my system info:
OS: OS X 10.6.7
Eclipse: Indigo Service Release 1
Glassfish V3.0.1
Glassfish Plugin: GlassFish Server Open Source Edition 3 (Java EE 6)
GlassFish user/pass: admin/adminadmin
Please let me know if there is a solution to the problem.
Here is what worked for me - after some googling I saw a post saying the error message is misleading and it might be a port conflict. In my Eclipse I have a proxy server entry which uses port 8080 (same as GF). So I changed port to 9090 in domain.xml and GF started no problem. My system is Win7x64, Eclipse 3.7.1, GF 3.1.1
In the "Servers" view, right-click on the glassfish server and choose "Open"
Within the section "Application Server", ensure that "Use Anonymous Connection for Administrator Commands" is NOT checked off.
Application Server
You can edit some runtime properties fro the Application Server(GlassFish or Sun)
Domain Directory
Admin Name
Admin Password
Admin Server Port Number
_ Use Anonumous Connection for admin Commands.
^
If checked, eclipse plugin does not use your login credentials (admin/adminadmin) .
kill java process from task manager if it not show java process then restart your pc >> it work for me
As has been stated a few times here, the port conflict will cause this. I found that I could not edit the port information in Eclipse, I had to edit the domain.xml file. I searched for 8080, which took me straight to the tag. In here, i changed http-listener-1 form 8080 to 8000.
I then had to remove the GlassFish Server from the Servers tab in eclipse, and re-add it back. (this was many times faster than restarting Eclipse). now the new port is identified, and I was able to start GlassFish server.
Note: I am using the Oracle Enterprise Pack for Eclipse, not the generic eclipse plug-in.
In my case, i did "ps -ef | grep java" and realized there was a glassfish process already running. I think it started as part of the installation. I killed it and started the server from Eclipse again and it worked like a charm
There is another service at 8080 (or your port definition in GF settings).
For me, stop this service and try start GF by Eclipse.
Check for Tomcat running, or others apps.
Take a look at your Anti-Virus Web Scanning settings. Mine had an entry for port 8080 to be scanned for http traffic. I removed it and the server could then be launched without a problem from within Eclipse.
Regards
Chris
This is caused to me from AVG Network Scanner Service.
This service is occupying port 8080 !
I had the problem. Fixed by changing permissions of the domain folder to be writable.

Is There a Way to Make Remote Calls to ASP.NET Development Web Server?

I know that generally speaking, this cant be done, that is get another PC to call a site hosted under the ASP.NET DEvelopment Web Server remotely (generally you can only use localhost:port to get to it).
But I was wondering if anyone has seen, or knows of a way to get around it? I am a RESTful API developer in my office, and I would like the PHP guys to test the APIs on my machine so that I can have the Visual Studio 2005 debugger attached, and I can more easily find problems.
THe main issue is, that my machine is a Vista machine, and unfortunately, the APIs I have developed do not work under IIS7, even Classic Application Pool mode (which eliminates hosting them on a local IIS impossible).
Alternatively, is there a way to use IIS6 on another machine to suite my needs?
Update
Based on the advise that I have gotten and after much trial and error with the suggestions made, I was able to get Squid to act as a reverse-proxy and do exactly what I wanted to do. I have blogged about it http://www.ashleyangell.com/index.php/2009/03/configuring-a-basic-reverse-proxy-in-squid-on-windows-website-accelerator/ in case anyone else wants to do the same thing.
This is substantially easier than the Squid option:
"Accessing the Visual Studio ASP.NET Development Server from iPhone"
Also there is an update that works well under Windows 7, too:
"iPhone Accessing the Visual Studio ASP.NET Development Server - Windows 7 Update"
I have just tried http://code.activestate.com/recipes/483732-asynchronous-port-forwarding/ successfully. It's a Python script that just forwards the traffic.
Assuming the machine your dev server runs on is 192.168.42.42 and the dev server is on port 12345, run the script (on the same machine) with the command line arguments
-l 192.168.42.42 -p 8000 -r 127.0.0.1 -P 12345
From a different machine, you can then access the server via http://192.168.42.42:8000.
Be sure to change sender.handle_close as noted by Dwight Walker in the comments:
def handle_close(self):
self.close()
if len(self.receiver.to_remote_buffer) == 0:
self.receiver.close()
Can't you just run IIS7 in Classic Application Pool mode?
The Development Web Server is strictly limited to Localhost, you would either need to decompile and recompile it, or set up some kind of Proxy on your machine.
And on an unrelated Topic: Even though Win2003 Server SP2 R2 should be supported up to March 2012, maybe IIS7 Support should be added to your application to make sure you can run on 2008 Server as well.
Basically i spent 5 hours making this work, and ultimately if you want a 5 min fix here goes:
1. Port forward incoming traffic to your local ip on your network
TCP Any -> 3127-3128
TCP Any -> 80-81
TCP Any -> 8080
TCP Any -> 8000
TCP Any -> 8888
to
192.1681.1.3 (the local ip of the machine running .NET Dev server.)
2. Download SPI Port Forward
3. Heres the tricky part - Setup 2 forwarding rules as follows:
Local port: 8080 Remote: localhost Remote port 8080
Local port: 8080 Remote: localhost Remote port: .NET Dev server port
Without that second rule the .NET dev server wont serve the page
4. now visit your public IP address at port 8080 -- and you got it
Z
You might want to take a look at UltiDev's version of the Cassini web server. They took the Microsoft Open Source Cassini web server and enhanced it to allow among other things, remote connections.
You can attach VS to the process, and watch your RESTful APIs being called from the PHP application, exactly as you describe above.
Just use a simple Java TCP tunnel. Download this Java app & just tunnel the traffic back. No messing with IIS necessary!
http://jcbserver.uwaterloo.ca/cs436/software/tgui/tcpTunnelGUI.shtml
In command prompt, you'd then run the java app like this... Let's assume you want external access on port 80 and your standard debug environment runs on port 1088...
java -jar tunnel.jar 80 localhost 1088
(Also answered here: Accessing asp. net development server external to VM)
Switching IIS 7 to Classic pipeline does not resolve your compatibility issues?
VS 2005 has a remote debugger, as did many versions before that.
YES THERE IS! :D
I was also looking around to overcome this limitation for some time and accidentally I stumbled upon following article:
http://eeichinger.blogspot.com/2009/12/sniff-http-traffic-with-aspnet.html
I haven't tried it myself yet, but looks quick & simple (although some may say this is hardcore).
BTW. I recommend you look at some other posts at Erich Eichinger's blog, since there's more really valuable stuff.
This post helped me:
http://staticvoidmain.cognitioab.se/index.php/2013/01/remote-debugging-asp-net-development-server-with-spi-port-forward/
It suggests using a third-party application on your developer machine to act as a proxy (sort of). So you connect to this app, and it forwards all your requests to the development server. Works like magic :)

Resources