Accessing ASP.NET local server from virtual machine - visual-studio

Don't know if maybe this question belongs on serverfault, but I'll try here first.
I'm running Visual Studio 2010 on my machine, and I want to test my ASP.NET page in IE6. IE6 is running on a virtual machine using Windows XP Mode.
The problem is that I can't access localhost from the virtual machine. I've also tried accessing it via my ip: 123.12.12.123:12121, but that doesn't work either. Is there something I can setup in Visual Studio? Or is the problem most likely with the virtual pc?

The "Cassini" web server provided as part of Visual Studio doesn't support requests from any machine other than the one it's running on. A virtual machine running on that machine is considered to be a different machine for these purposes.
You have twothree options:
Deploy your software to IIS running on your development machine (or a.n.other machine).
Download WebMatrix, to get hold of a copy of IISExpress, as it's somewhat easier to setup debugging against as opposed to "real" IIS.
Have a look at UltiDev Cassini, it's another implementation of the Visual Studio web server. I've never used it so can't comment on quality.

The problem is that the (test) web server that's included won't accept connections from outside. Your virtual machine has its own IP address and is seen as a different machine, just the same as any other physical computer.

Related

Access Debug IIS Server From Virtual Machine (VS Express 2013 for Web)

I'm developing a web site with Visual Studio 2013 Express for Web on Windows 7, and I need to ensure compatibility with IE8, so I installed Windows Virtual Machine/XP Mode, and set up network bridging to that the VM uses the same network adapter as the main machine.
Ideally, I would like to be able to connect IE8 running in the VM to the debug IIS server started by Visual Studio on the W7 machine, since having to deploy the site to the actual server every time I want to test a minor fix to the formatting would be a hassle.
The VM network bridging seems to be successful, since I can access domain-only web sites and ping the W7 machine from the VM, but pointing a browser to the site address and substituting the W7 IP for "localhost" comes back with a connection problem, I suspect because IIS is refusing the connection.
Is there a way to configure the IIS process that Visual Studio uses for debugging so that I can connect to it from a virtual machine?

test web site setup on IIS6

I am working on a setup project that installs a web site on IIS6. I have Windows7 on my machine, and I can install IIS7 on it, but not IIS6 as far as I know. So what are the ways to test my setup project on IIS6? The free and legal ways (without any cracks) are prefered :) .
Setup a Windows XP Pro virtual machine and install IIS6 on that.
http://www.virtualbox.org/
I can install Windows Server 2003 on a Virtual PC, and they both appear to be free!
http://www.microsoft.com/downloads/en/details.aspx?familyid=77f24c9d-b4b8-4f73-99e3-c66f80e415b6&displaylang=en
Haven't tested yet, but I think it will be fine, if the documentation doesn't lie:
This is a preconfigured virtual machine contained within the Virtual Hard Disk (VHD) format. A virtualization product that supports the VHD format is required to use this virtual machine. Microsoft Virtual PC or Microsoft Virtual Server are provided for free and can be used with these VHD based virtual machines. Please refer to the system requirements section for more details.
Another possible way to do this is to have a remote connection to a machine that already has IIS6.

step into web service on another LAN server

I'm debugging a vb.net windows program which I've upgraded to a VS 2010 solution, targeting Framework 2. I need to step into a webservice's code. The web service is framework 3.5, also vb.net, running on a windows 2003 server on our LAN. I've seen a ton of crap on the Net about it, mostly other people who couldn't get it working either.
The error I get in VS2010 is the exact same one I got before upgrading the project from VS 2005:
Unable to automatically step into the server. Connecting to the server
machine [servername] failed. The Microsoft Visual Studio
Remote Debugging Monitor (MSVSMON.EXE) does not appear to be
running on the remote computer. Please see Help for assistance.
So I did what Help said to do and ran the VS 2008 remote debugging wizard on the host server. I have verified that the remote debugger is running as a service on that machine. And it still fails.
Little help? THANKS
Just in case anyone comes here looking for this answer, here it is. No goofy 'Attach to Process', no weird bad instructions
from websites going off on a million stupid tangents. This answer has been FALKENIZED.
When on the same LAN and on the same domain, remote debugging from Visual Studio 2010 works when you do the following steps.
on web service host machine, share the web application folder where the web service lives; give yourself 755 permissions.
oops, give yourself wrxr permissions.
on local development machine, map a network drive to the [web service host machine][web app] folder you just shared.
copy the Visual Studio 2010 remote debugger folder (containing msvsmon.exe + support files) to web service host machine.
Make sure you get the correct platform for your host server, e.g. x86, x64, etc. Remote debugger is found here:
C:\Program Files\Visual Studio 2010\Common7\IDE\Remote Debugger[platform]
on web service host machine, drag a shortcut from the newly-copied debugger to the desktop, then start the remote debugger
on local development machine, step thru code. when reaching a call to the web service, you'll be prompted to navigate
to the location of requested web service code file, which will then be available in your mapped path. Do it.
Finally after 1000000 headaches, you may start debugging your web service. CONGRATULATIONS

Visual Studio Environment Best Practices?

I have a VM on my Win 7 machine running Server 2008. My website can't run properly unless it's running on the server due to COM+, other website integration and environment variables. Currently, I have VS2008 installed on the Windows Server 2008 and I develop there (which is dumb, I know) instead on in my Win 7 workstation. I hate this setup.
My question is, how can I developer on my workstation and then EASILY push and test th websites on the VM Server?
Access files across the network so the actual changes are made on the VM Server?
Make changes locally and publish to VM Server?
Can I set up VS2008 so that if I when I Run the application in VS2008 it pushes everything over and opens a web browser that points to the VMServer's IIS Website?
Of course, the VM is a server on your network. Exactly like any other server on your network, virtual or otherwise.
For debugging you can setup VS2008 to remote debug but I think you'd have to publish the site, start it and then hook up the debugging but I'm happy to learn that there's an easier way... anyone?

How is your Development Environment Set up?

Curious to know how people set up their personal and/or work development environment, in terms of:
Do you just have all of your developer tools (for example Visual Studio, SSMS, etc.) installed on your main operating system;
Do you use Virtual Machines to have a separate "clean" dev environment that consists only of the OS and one compiler you're working with;
Do you have multiple OS's in a multi-boot system;
Do you remote connect to a separate machine with your developer tools installed on there
It all depends on the type of the job i guess. Here is how my setup is:
The main PC. The one on my desk. Has everything on it.
The secondary machine. Runs Vista.
A bunch of "Clean" VMs for testing. Typically 2 machines of each OS we support.
A build machine. VM with no installed product. Just source code and some compilers.
A dedicated "Server" to host the server app and the DB. [Our product is a client-server thingy]
[On top of that, my primary and sec machines have the server and DB running too.]
EDIT: By "clean" i mean that they only have a freshly installed OS on them, nothing else. These are non-persistent and go back to clean state on shutdown.
I am running what I think is a fairly standard Agile C# development environment. Vista SP1, Visual Studio 2008 with Resharper 4.1, SQL Express 2008, Subversion server, command line svn client and Cruise Enterprise (unbelievable product) with 1 server and 1 agent for continuous integration.
I am running on a Dell XPS core 2 duo 2.4Ghz laptop with 4GB of RAM and 1 external 22" widescreen monitor.
I have tried and tried and persisted with VMWare Workstation (mostly but also Virtual PC) but I again and again resort back after tiring with the performance and annoying delays in Visual Studio. And I have tried every performance trick and tweak in the book available to me. It apparently just needs either more hardware than I have or far more patience.
I have also tried running 64bit Ubuntu with VMWare Worstation server running Vista (vlite'ed) and also windows XP (lite), but I found it just as annoying.
If you have similar specs to what I described then I can simply recommend not going down the VM path, unless it is ABSOLUTELY necessary.
I have a VMWare network replication of the main servers in my environment including SQLservers, Web-Servers, a copy of my dev box, and AD Servers. I also use VS on my dev box for simple things that don't need as much testing.
We use Virtual PC's for our development. As well as a VP for our build environment. The reason for this is so that we can switch between different projects without losing time. (for Support)
At our current client, we have an ESX server with virtual machines running on it. We access the virtual machines through Remote Desktop.
For my style in VS 2008, I use VibrantInk by Rob Conery.
We have Reflector and all Sysinternal tools available on all virtual machines.
I'm planning to have ReSharper on every machine also.
Firefox/Firebug combo is installed on every machine.
Web Developer for IE7 is also installed on every machine.
Cheers!
I really enjoyed using a single VM for each IDE I worked with, but that requires a beefy machine. However, my company has taken recently to the idea that the developers can do "just fine" with sub $500 machines. Thus, my current setup is everything on my only machine.
All of my tools are on my local machine. I generally work within the MVC mindset.
VMWare is set up on my machine, but it's only used on rare occasion for things beyond the control of my machine.
My work is primarily done on a windows machine, with Visual Studio.
I have Visual Studio 2005 and 2008 running on my main machine (Vista :p), and everything I can develop here without cluttering the machine, I do. Feels so much more responsive than in a VM. I have a VM for Linux-based development and several VMs for testing purposes. I never tested VMWare's debugging feature (run the debugger on the host and the debuggee on the guest), though I can imagine that that would be a good reason to have Visual Studio on the host, even if you don't care about responsiveness.
I have a number of IDEs and server products running on my main workstation. I also have a remote access laptop that has all the same critical software on it so I can develop locally (and not depend on Citrix and Remote Desktop to work on code fixes outside the office).
My main work system
Linux x64 dual core
Dual monitor
Redhat based OS
Vim, Kdevelop, Eclipse(with Epic, and Subclipse).
My system is similar(arch, and OS) to our servers, which is what I implement code for. Since I work for a small company with many hats, I tend to have a ssh'd mysql connection open in one window, with a vim screen open on the other side. Throughout the day I use SSH, VIM, SVN, firefox, and e-mail daily.
I put all toolchains and other apps needed to build my code into revision control, and write makefiles for all projects such that the version of the tools from the repository is used, not whatever may be in the $PATH. So when I do a label for a release, it includes everything needed to do the build, and depends on build machine setup as little as possible. All I need to do is sync to revision control, and type 'make'. Unfortunately this does require having cygwin installed on Windows, but personally, I consider a Windows machine just about unusable for development without cygwin, regardless of the prerequisites of the build system.
I have simple makefiles to build projects that include platform-specific .mk files. I don't manually create IDE project files. In a couple cases (Rowley Crossworks for embedded ARM development, Visual Studio for self-hosted windows PC development), I auto-generate project files based on my makefiles, as part of the "make debug" target, and then launch the IDE with the generated project. This makes debugging convenient, without requiring parallel maintenance of a IDE-specific project file in addition to my makefile.
I am about to set up a new development environment for a new department.
Build environment (support both Java development and .Net) will be on to separate VMware machines running on the same physical computer. Both images will use 2008 server.
Developer machines will be desktop computers, most likely qith 6 gig ram, big harddrives, 1 or 2 cpu's with dual or quad core, 24" screens * 2, etc., and with 2008 server installed. This to ensure that the developer code is compiled on the OS. Desktops because I want the developers to be able to use VMware to test, etc., without spending to much time complaining about lack of performance with 2 VMwares running at the same time :)
I am trying to figure out the build environment now. Considering Team City, ++. Difficult to find the right one when you want to support multi-platform environment without to much fuss :)
Every developper setup includes a MacBookPro 17" with a 22" lcd screen.
Eclipse is our IDE, and we use VMWare to host our developpement database (oracle) under winXP.
Obviously a lot of your answers are going to depend heavily on what kind of development each person does. Maybe we should be categorizing these? :)
Web Development
I use a VM to run a Linux guest with a development webserver. I use Notepad++ on my host for editing (recent convert from jEdit), and with drive mapping in the VM software (Sun's VirtualBox), my dev webserver guest machine has no problem serving up the ever-changing source files. I also use the Windows XP IE6 VPC image in another VM to test the page in IE6. I use this setup even if I'm not developing a complicated web-app and am simply working on a static HTML page; there are still some quirky differences in behavior between a locally opened file and a served webpage in a number of browsers that make this worthwhile.

Resources