Chrome/Windows: Connection refused when I use my IP address - windows

I have an ASP.NET server running under VS2010 on my PC (Win7) on port 12345.
When I load localhost:12345 in Chrome, my default page loads perfectly.
But when I load 192.168.128.104:12345 (by my internal IP, not by localhost) I get "connection refused".
Exact same behavior when I try to access the server from another device on my intranet (in my case, a Raspberry Pi)
I realize that when I hit localhost that I'm just looping back in my adapter, thus the request never leaves my machine. So it would seem that the cause is due to the request leaving & re-entering my machine.
I've create custom Inbound & Outbound rules in my Windows Firewall to allow port 12345, but to no avail.
Any ideas would be appreciated.

I found the answer here:
Can I access ASP.NET Development server in an intranet?
which led me to this:
http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy
As is so often the case, finding the answer is hugely dependent upon using the correct search terms. Here the critical keywords were "asp.net debug intranet"

The 'right way' here is to use IIS Express and you don't need fiddler to act as a reverse proxy. Its a hack that was used to work around using Cassini - a low budge web server that is outdated (and doesn't compare to IIS Express) and used with VS2010 prior to SP1.
In VS2010 SP1, IIS Express support was added. You can read about that here:
http://blogs.msdn.com/b/webdev/archive/2011/03/14/enabling-iis-express-support-in-vs-2010-sp1.aspx
IIS Express can handle this just fine - and Visual Studio 2010 integrates with it. Its not one or the other - you develop with Visual Studio and when you launch your app it launches it with 2010.
If you want something really easy, install Visual Studio 2015 Community Edition, use ASP.NET 5 (now called ASP.NET Core 1) and simply run it to self host via the play button looking drop down you are used to seeing in VS 2010- no web server required.
Again - being that its 2016 - what you cited is a very old way. If its a quick hack, I can understand that - but if you are looking for the best practice way going forward, use IIS Express (and ideally a newer version of Visual Studio - we have them for free in the 2013/2015 Community Editions)
Hope that helps!

Related

Does Windows Identity Foundation (WIF) Require IIS? (Rather than Development Server)

I need to know if developing a Windows Identity Foundation (WIF) solution requires IIS installed. I would like to be able do develop a WIF solution using the built-in Visual Studio Development Server (I heard it is called Cassini) if possible.
All of the samples I've downloaded assume that IIS is up and running on the local system.
This blog, Securing WCF Services with Custom WIF STS: A Step-By-Step guide, lists requirements for a WIF example and has IIS as one of the requirements.
I've added the images to allow you to follow easily with the steps.
Pre-requisites:
Visual studio 2010
The development machine has IIS installed (I use Windows 2008 R2)
Windows Identity Foundation (WIF): download it from http://www.microsoft.com/download/en/details.aspx?id=17331
Windows Identity Foundation SDK: download it from : http://www.microsoft.com/download/en/details.aspx?id=4451
I also have noted another StackOverflow posting indicating that IIS Express can be used. I have not yet fully investigated IIS Express, however this doesn't answer my basic question.
I can't seem to find any other references anywhere else about this topic. I'd appreciate knowing if anyone has been able to develop a WIF solution implementing a Security Token Service using the standard Visual Studio Development Server alone. Otherwise, I will look into using IIS Express. I am unable to install and use IIS (non-Express) on my system as I don't have local admin access.
Thank you.
Before .NET 4.5 WIF was a separate package and an additional installation step.
.NET 4.5 makes several important changes and moves WIF into the .NET base class libraries. The move enables WIF to be used by any application regardless of host. There's enough changes that if you are starting new, I recommend upgrading to .NET 4.5 to avoid porting in the future and because the integration does make things easier.
I'm currently running Visual Studio 2012 and testing WIF code in IIS Express and ServiceHost without issues.
I don't have local admin access
This is a big problem. Not having local admin for WIF development may not work. You will need elevated privileges to install tools and test applications.
Regardless of version, you shouldn't have any issues running apps with WIF outside IIS. The limitations are more around running SSL. Have you tried? Did you get any errors?
As #Eugenio states, one of the issues is around SSL. The other problem is that Cassini uses localhost which means that you need to have a valid localhost certificate if you are thinking of adding this application to something like ADFS. (as opposed to having a certificate for the actual machine name).
Also, to do WIF development, you have to run VS in Admin mode.

Expose MS Team Foundation Server 11 from home computer to Internet

Please help me with my noobish problem
I have laptop at home. I installed MS Windows Server 8 Beta on it, Visual Studio 11 Beta and MS Team Foundation Server 11 only for version control of my application, which I want to change at home (where my laptop-server is) and at work (where my another Visual Studio 11 Beta is).
So my major problem is that I can't easily expose my [home] TFS Server on Internet that I can see it from my work computer :(
I installed TFS Proxy, which generated a proxy URL for me like this: http://win-jnkseeeq4rl:8081/ (which works on LAN)
But of course, I can't get it to work on another (work) computer through Internet, because it doesn't resolve this kind of host.
At home I've got WiFi-router through which my laptop connected.
I think I must expose some ports on it, but I don't know how and is this a main problem really.
Thank you everyone for answers!!!
I run a TFS at home to support my consulting and have setup Remote Access Services using the PPTP protocol to run my inbound VPN. You generally just have to enable PPTP passthrough (GRE protocol) and forward TCP/1723 to your RAS server.
I also use Dynamic DNS to help find my public IP if it ever changes.
But I have to be honest, have you considered just using the TFSPreview.com service instead? I haven't switched over completely yet because I've already built my infrastructure and it's still a beta service but I could see myself doing it in the future.
Have you looked at the walkthrough here => http://msdn.microsoft.com/en-us/library/bb668967.aspx
There is a similar question here, How to access VS 2010 TFS over the internet from remote office

Visual Studio 2010 nasty caching Cassini? Must manually stop service

I've spent waaaay too much time trying to figure this out. I'm running Windows 7 and Visual Studio 2010 in a VMware Fusion virtual.
When I debug my website project, Cassini (aka ASP.NET Web Development Server) starts and the site shows in my default browser (IE). I stop the debugger, make some tweaks to my C# code, and start the debugger again. The website starts up in IE and the site displays, but its using the code base from when I initially debugged NOT including any tweaks in code between the initial debug/build and subsequent debugs/builds.
The only way I can get code changes to build and run in the browser properly is if I manually stop the ASP.Net Web Development Server from the tray and then run debug.
Has anyone encountered this? Not sure if its caused by VS2010 or the environment being a virtual on a Mac.
Manually stopping Cassini after every debug is really starting to suck.
Thanks.
Check if Visual Studio is set to recompile the projects when there are changes.
Check that Tools > Options > Projects and solutions > Build and run > On run, when projects are out of date is set to Always build.
Perhaps you will have a more pleasant experience with IIS 7.5 Express as a replacement for Cassini.
From that page:
IIS Express is a lightweight,
self-contained version of IIS
optimized for developers. IIS Express
makes it easy to use the most current
version of IIS to develop and test
websites. It has all the core
capabilities of IIS 7 as well as
additional features designed to ease
-- website development including:
-- It doesn't run as a service or
require administrator user rights to
perform most tasks.
-- IIS Express works well with ASP.NET and PHP applications.
-- Multiple users of IIS Express can work independently on the same
computer.
Here's an article to help you get started.
Figured this out. I had mapped my Visual Studio 2010 folders to a VMware Fusion share in order to make my .NET projects accessible from Mac world (for copying graphics files into the projects, etc.). Evidently there was some type of permission issue or something that did not result in any sort of alert that was causing the problem.
I remapped all VS folders (Project, Website, etc.) into the standard Documents folder of my user instance and everything began working as expected.
Thanks for the help.

Cannot start debugger on Visual Studio 2010 (F5) However, ' attach to process' does work (slow). How to fix?

The environment:
Clean (new) install of Windows 7 64bit.
Clean (new) install of Visual Studio 2010 Professional (10.0.30319.1).
Windows Update is up to date.
The problem:
I cannot start the debugger on Visual Studio 2010 (hit F5): 'Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incomming HTTP requests are not blocked by a firewall.'
However, 'attach to process' (what I usually do) does work, but it is painfully slow to start (Visual Studio 'thinks' a lot of time before the debugging is actually enabled).
On the same hardware, running VS 2008 on good old Windows XP (32bits), this problem never happened.
Trying to debug a site running under the ASP.NET Development Server also fails: 'Unable to connect to ASP.NET Development Server.'.
There are plenty of web pages about these errors (many very outdated and does not apply to my environment), none of them worked for me.
Notes:
No matter if I run Visual Studio as Administrator or not. The problem is
the same.
The problem happens even when running a brand new blank IIS web site, either created as 'localhost/something' or 'sample.local'.
If I create a 'File System' web site (to try ASP.NET Development Server), when I hit F5, the server starts, but after a long wait Visual Studio says 'Unable to connect to ASP.NET Development Server.'
The 'hosts' file has an explicit 127.0.0.1 entry for 'localhost' and for 'sample.local'
It's the same problem either running .NET 2.0 or 4.0.
It's the same either configuring the application pool with or without 'Enable 32-Bit Applications' true or false.
It's the same either configuring the application pool is classic or integrated mode.
In a desperate attempt, I've added all the IIS 6.0 legacy 'features' stuff (not needed!) and doesn't helped at all.
I don't now what else I can try.
Thanks.
OMG!, I'm so stupid. The most oblivious thing was truly wrong. There was a wrong rule in the firewall. Therefore, even being in 'interactive mode' (as it is was always set), the connection was denied.

Visual studio web server iis6 or iis7?

When I run my asp.net mvc site in visual studio 2008 is it running iis7 or iis6 Internally?
Also does mvc require iis7 (is intended for?)
Via Visual Studio, you're not really running IIS6 or IIS7. You're running Cassini. You can find out how Cassini differs from IIS here. As for ASP.NET MVC, it may be deployed to run under IIS6 or IIS7. As mentioned previously, you have to jump through some hoops if you want to run under IIS6 so IIS7 is ideal if possible. If you are stuck with IIS6 (maybe you're on Windows Server 2003) there are a couple of best practices (Url file extensions or wild card application maps) which Phil Haack has well documented which will help to get your application running correctly.
If you mean the one built in to windows, that is tied to your OS version rather than to your version of Visual Studio.
If you mean the version that Visual Studio uses as a development webserver, then that version is not IIS. Its an internal webserver (very similar to Cassini) suited for testing and debugging only.
MVC can work in IIS6 but you need to make sure to set your routing to "{controller}.aspx/{action}/{id}".
As for IIS6 or 7 for the "IISLite" that VS uses, I am unsure of that. I think VS2008 uses IIS7 because I do not need to add ".aspx" to my controller in the route when debugging.

Resources