• Debugging Classic ASP in IIS7 and VS2010


    Why would you ever want to debug a classic ASP application in Visual Studio 2010 and IIS7?  Well - legacy code and sites.  So how to get it done?

    First, make sure your development machine is setup correctly (I am using Windows 7) - Control Panel >> Programs >> Turn Windows Features on or off

    • Under Internet Information Services, enable IIS Management Console, IIS Management Scripts & Tools, and IIS Management Service.  
    • Under World Wide Web Services:
      • Application Development Features - enable everything
      • Common HTTP Features - enable Default Document and Static Content
      • Security - enable Basic Authentication, Request Filtering and Windows Authentication
    • Click OK

    Windows Features

    In IIS, add a website that points to the physical location of your files.  I'd recommend using a specific port for running the site - see the example below for creating a site named TestApp running on port 1422 - you'll use http://localhost:1422 to browse to the site.  Note that an Application Pool is created with the same name - TestApp.

    Next, in IIS Manager Features View, double-click Default Document and ensure the Default.asp is in the list.  Backup to the Features View and double-click - ASP icon. 

    • Enable Parent Paths - set to True
    • Expand Debugging Properties
      • Enable Client-side Debugging - set to True
      • Enable Server-side Debugging - set to True
      • Send Errors to Browser - set to True

    Now go back to IIS Connections and select the Application Pools node, select the Application Pool you created for your site and then select Advance Settings.  In Advanced Settings, change the Identity to NetworkService (this makes it easy to set you security next).

    Now we need to give the User "Network Service" full permissions on the physical site.  Go to Explorer, right-click on the top folder, select Properties >> Security.  Add the user NETWORK SERVICE and assing full control.

    Finally to Visual Studio 2010 - run Visual Studio as an administrator!  Then, open your website - File >> Open Web Site >> File System and select the root folder then click open.  Now in Solution Explorer, right-click on the site root and select Property Pages.  Under Build, select "No Build", then under Start Options >> Server, select "Use custom server" and enter the base URL with the port number for the site you created earlier: http://localhost:1422 - click OK.

    Now run your site - Debug (F5) - either the default page or the page you specified in Properties >> Start Options should launch in a browser now.  Go back to Visual Studio 2010 and select Debug >> Attach to Process.  At the bottom of the dialog, select bot "Show Processes..." check boxes - then in the "Available Processes" list, scroll to the bottom and select w3wp.exe and then click "Attach".  If you get a warning select YES/Continue.

    You should now be able to set breakpoints in your code and step through the site.

    Ciao and Happy debugging!!!

    More Sharing ServicesShare on facebookShare on twitterShare on emailShare on printShare on reddit

    http://www.falconwebtech.com/post/2010/12/28/Debugging-Classic-ASP-in-IIS7-and-VS2010.aspx

  • 相关阅读:
    SAP Cloud for Customer的Account Team里的role如何配置
    SAP标准培训课程C4C10学习笔记(二)第二单元
    SAP标准培训课程C4C10学习笔记(一)第一单元
    如何找到SAP Cloud for Customer标准培训和认证方面的信息
    我用ABAP做过的那些无聊的事情
    有道云笔记不需要通过开通会员的方式来去除广告显示
    微软OneDrive使用体验
    自己开发的在线视频下载工具,基于Java多线程
    CloudFoundry命令行和Kubernetes命令行的Restful API消费方式
    利用装饰器计算函数运行的时间
  • 原文地址:https://www.cnblogs.com/chen110xi/p/2477031.html
Copyright © 2020-2023  润新知