Unable to start debugging on the web server. Permission problem.

Last post 10-09-2009 2:13 AM by onlineatoz.net. 11 replies.

Sort Posts:

  • Unable to start debugging on the web server. Permission problem.

    01-19-2006, 5:04 PM
    • Member
      40 point Member
    • TimMurtaugh
    • Member since 01-19-2006, 10:00 PM
    • Posts 8

    Today I upgraded my web application from Visual Studio 2002 to Visual Studio 2005 by running the Conversion Wizard. Now when I attempt to debug through Visual Studio, I get this error:

    Unable to start debugging on the web server. You do not have permissions to debug the web server process. You need to either be running as the same user account as the web server, or have administrator privilege.

    I can run my project without debugging, I get this error only when I try to debug.

    Thanks for you help,

    Tim

     

     

     

    Tim Murtaugh
    Sr. Software Engineer
    Center for Integrated Manufacturing Studies
    Rochester Institute of Technology
  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 9:42 AM
    • Member
      40 point Member
    • TimMurtaugh
    • Member since 01-19-2006, 10:00 PM
    • Posts 8

    As an update to my previous post, I created a new web application in Visual Studio 2005 just to see if I could run it in the debugger, and I can. It is only the converted project that I cannot debug.

    I should say that I have not changed my permissions at all. I can debug a new VC 2005 project, but not a converted project. I have the same permissions I had when I was using VS 2002 and debugging without problems.

     

    Tim Murtaugh
    Sr. Software Engineer
    Center for Integrated Manufacturing Studies
    Rochester Institute of Technology
  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 12:21 PM
    • Member
      40 point Member
    • TimMurtaugh
    • Member since 01-19-2006, 10:00 PM
    • Posts 8

    Another update. I logged in to my computer as an administrator to see if I could run my project in the debugger. The debugger does seem to start, IE opens with the URL http://localhost/LeedsD_Dev/ (LeedsD_Dev is my web application), but I get the error "HTTP Error 403 - You are not authorized to view this page."

    The output window in Visual Studio indicates that I am attaching to the aspnet process:

    Auto-attach to process '[1728] aspnet_wp.exe' on machine 'ARDENT78' succeeded.

    So logging in with adminstrator privilges simply creates a new set of problems.

    Unless this is resolved soon, I'm uninstalling VS 2005 and reverting to VS 2002. I can't afford to waste time when I have development to complete!

     

    Tim Murtaugh
    Sr. Software Engineer
    Center for Integrated Manufacturing Studies
    Rochester Institute of Technology
  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 12:52 PM
    • Member
      40 point Member
    • TimMurtaugh
    • Member since 01-19-2006, 10:00 PM
    • Posts 8

    Still another update. As I said in a previous post, I created a simple web application in VS 2005. It runs with and without debugging. I notice that when I run it (both with and without debugging), something called ASP.NET Development Server also runs with says it runs ASP.NET applications locally. It is evidently running my test as like this: http://localhost:3713/WebSiteTest.

    ASP.NET Development Server does not run when I try to debug my converted project.

     

    Tim Murtaugh
    Sr. Software Engineer
    Center for Integrated Manufacturing Studies
    Rochester Institute of Technology
  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 5:26 PM
    • Contributor
      2,142 point Contributor
    • dbottjer
    • Member since 04-22-2003, 11:43 PM
    • Tulsa Oklahoma
    • Posts 428
    • TrustedFriends-MVPs

    Tim,

         Visual Studio 2005 unlike previous versions has the option to run ASP.NET web applications using basically a version of the cassini web server instead of IIS.  This is an option for several reason.  First, it allows developers to create and test web application without needing to install IIS on there machines.  Not having IIS installed on every developers machine is more secure.  You'll notice the :3713 after http:.//localhost.  This is a random port that was selected to run your web application which is also more secure.  Furthmore, Cassini is only started and running when you run you web application.

          As for your debugging problems I would make several suggestions.  On a Windows XP machine the .NET framework runs under the ASP.NET account I would double check your web application's directory and make sure this account is assigned.  Furthermore, I would click the "Advanced" button on the Security tab and choose to replace the permissions.  Meaning you want to make sure that all the files in your web application's directory have this account assigned as well.  Perhaps during the conversion process this account wasn't properly assigned.

    Thanks,

  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 5:27 PM
    • Contributor
      2,142 point Contributor
    • dbottjer
    • Member since 04-22-2003, 11:43 PM
    • Tulsa Oklahoma
    • Posts 428
    • TrustedFriends-MVPs
    Also you don't have to uninstall 2005.  You can run both versions side by side.
  • Re: Unable to start debugging on the web server. Permission problem.

    01-20-2006, 6:10 PM
    • Participant
      763 point Participant
    • alexgav
    • Member since 04-08-2005, 12:23 AM
    • Posts 120
    • AspNetTeam

    Tim,

    I am sorry if this is a silly question, but does your account have administrative privileges?  Just because you can run an app, it doesn't mean you can automatically debug it. For example, you can run www.microsoft.com, but I don't think you would be able to debug it Smile [:)]

    When you create a new web site, you are probably creating a "file system" web site, which, as you noticed and as Dennis explained, does not use IIS to run your web site (it uses a separate web server "Cassini" to run your application). Those webs can be debugged without administrative privileges. Your converted app is probably an IIS app. You need to be an admin to debug that.

    You can try opening your app as a file system web, e.g., do File->Open Web Web Site, make sure "File System" is selected, browse to the root of your web site and open it. Most of the web apps should work like that. After that you should be able to debug it.

    See if that works for you.

    Thanks,

    Alex

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Unable to start debugging on the web server. Permission problem.

    02-02-2006, 2:09 PM
    • Member
      40 point Member
    • TimMurtaugh
    • Member since 01-19-2006, 10:00 PM
    • Posts 8

    Thanks for your help. I changed my application to a "file system" web site. Now it runs under the ASP.NET Development Server (cassini web server) and  I can debug it. I eventually did get my application to run under IIS, but it was difficult and I could only debug when I was running as an administrator. As a general rule, we are trying to get away from running with administrative privileges

    I wish Microsoft had somehow warned my about this when I converted my project from VS 2002 to VS 2005 (maybe in the upgrade log or the conversion report). It would have saved me a couple of days of work.

    Tim

     

    Tim Murtaugh
    Sr. Software Engineer
    Center for Integrated Manufacturing Studies
    Rochester Institute of Technology
  • Re: Unable to start debugging on the web server. Permission problem.

    02-02-2006, 6:15 PM
    • Member
      33 point Member
    • grundt
    • Member since 02-02-2006, 11:00 PM
    • Posts 25

    Though it's not easy, it most definately is doable (for a non-administrator account to run an IIS ASP.Net application in the debugger).

    See:

    Developing Software in Visual Studio .NET with Non-Administrative Privileges (specifically, the Developing Software section)

    How to use the ASP.NET utility to encrypt credentials and session state connection strings

    One note of caution ... make a backup of the machine.config file before you edit it ... the first time I attempted encrypting the credentials (as per the 2nd link), I did it incorrectly and windows would not start up (luckily I had made a backup, and was able to restore the file in safe-mode)

  • Re: Unable to start debugging on the web server. Permission problem.

    02-02-2006, 7:42 PM
    • Member
      57 point Member
    • floorcookie
    • Member since 09-24-2002, 10:36 AM
    • Salt Lake City, UT
    • Posts 12

    Open up a Visual Studio Command prompt and paste in the following:

    Echo Stop IIS
    iisreset /stop
    echo "----------------------" 
    echo "Deleting the ASPNET account."
    net user ASPNET /delete
    echo "----------------------"
    echo "Reregistering ASP.NET and the ASPNET account."
    aspnet_regiis -i
    echo "Restarting IIS."
    iisreset /start
    echo "----------------------"

    Then try.  It may then tell you it can't access the temp files.  If it tells you that, go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files (or wherever your temp files are) and delete the entire folder containing your project's temp files.  (You may have to close VS 2005 before it "lets go" of the temp folder and allows you to delete it).

    -- Mike

     


  • Re: Unable to start debugging on the web server. Permission problem.

    03-24-2009, 12:23 PM
    • Member
      26 point Member
    • sid_aspforum
    • Member since 09-18-2008, 1:10 PM
    • Posts 8

    Found this while I had the same problem. You can keep it as a reference even if you have resolved your issue.

    http://www.geocities.com/vinnisharma/EnablingASPNETDebugging.htm

    -Sid

  • Re: Unable to start debugging on the web server. Permission problem.

    10-09-2009, 2:13 AM
Page 1 of 1 (12 items)