locked
How to get VS2012 to use IIS on server rather than built-in development server? RRS feed

  • Question

  • User-1334042570 posted

    I have a situation where my app is running fine within the VS2012 IDE but crashes when I deploy it to a server running IIS7.  So I need to run it within the VS2012 IDE but use IIS rather than the built-in development server.

    In my situation both my development machine ("WORKSTATION") and my server ("MULTIMEDIA") are running Windows 7 (64-bit).  IIS is only activated on the server.

    I can access the deployed app from my development machine by typing this into the browser: http://MULTIMEDIA\Incentives ("Incentives" is the name of my app).  Though the app does crash, at least I know that the compiled, deployed code is being run.  So I figure that I can also run it from VS2012 on my development machine.

    Here's what I did on the server:

    1. Installed the x64 Visual Studio Remote Debugging Monitor (Version 11.0.51106.1).
    2. Ensured the Visual Studio Remote Debugging Monitor is allowed through Windows Firewall.
    3. The Remote Debugging Monitor app is running, waiting for a new connection.

    Here's what I did in VS2012:

    1. Went to PROJECT - Website Properties
    2. Clicked on the "Web" item on the left menu
    3. Underneath of the "Servers" section I chose "Use Custom Web Server" and then entered "http://MULTIMEDIA/Incentives" for the Server Url.  VS2012 displayed this error message: "Unable to start debugging on the web server.  Access is denied."
    4. Whenever I tried starting my app in Debug mode from my development machine, on the server the Remote Debugging Monitor app would report "Multimedia\Administrator connected".

    Note: "Start Without Debugging" actually does work - in the same way that running the app directly from the browser works - but is of little use to me because I need to resolve why it's crashing.

    I've read through everything I can find but have not been able to find a solution yet.  What am I failing to do?

    Robert

    Sunday, December 30, 2012 12:27 AM

Answers

  • User-1028151323 posted

    Have you given the directory where your application code is the right security for IIS to run? I believe you need to allow NETWORK SERVICE, IUSR to have privelages to read, write and modify

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 31, 2012 6:44 AM

All replies

  • User-1028151323 posted

    Have you given the directory where your application code is the right security for IIS to run? I believe you need to allow NETWORK SERVICE, IUSR to have privelages to read, write and modify

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 31, 2012 6:44 AM
  • User-742633084 posted

    Hi rmdw, If you don't need to serve request from remote test clients (when running/debugging the web app in vs 2012), you can consider using IIS express which is light weight version of IIS and has less requirements of installation (can be setup side by side with full version of IIS)

    #Introducing IIS Express
    http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx

    #IIS Express Overview
    http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-express-overview

    #Web Servers in Visual Studio for ASP.NET Web Projects
    http://msdn.microsoft.com/en-us/library/58wxa9w5.aspx

     

    Monday, January 7, 2013 4:59 AM
  • User-1334042570 posted

    Steven,

    My client will be using IIS so therefore I want to test everything in IIS.

    It makes no sense to me to "approximate things" by running IIS Express.

    In any case, I am able to:

    1. Publish the app onto a Test Server and run it standalone (no VStudio) with IIS.
    2. Run the app through VStudio from my laptop, which is running IIS locally.

    The one thing I'm unable to do is run the app in VStudio from my workstation, which does not have IIS running locally.  I've spent several hours back & forth with Microsoft tech personnel to try to resolve the Remote Debugger issues but to no avail.  So I will just stick with #2 above as my only way to troubleshoot problems when running the app in IIS.

    Robert

    Monday, January 7, 2013 3:43 PM