none
Start debug displays localhost -/ directory listing instead of selected page

    Question

  • I'm using visual studio 2015 community edition blend on a windows 10 machine. I have a project for which I have the propertiespage/web/startaction set to current page. When I select the aspx item I want to debug and start debug the debugger displays the the localhost -/ directory listing instead of loading the page I want. If I select on of the items from the directory listing that item is loaded into debug.

    If I specify a page in the project as being the start page and run debug that page is loaded correctly.

    Can someone kindly explain what I need to do to get the debugger to load my current page instead of displaying the directory listing?

    Thanks tonnes for any help, Roscoe

    Friday, January 06, 2017 8:08 PM

Answers

  • Hi Roscos,

    >>  I thought Blend for Visual Studio Community 2015 was the free version of VS? 

    Blend for Visual Studio is a tool that we often used to design for our application, especially for XAML design. More information about Blend, please refer to following blog.

    https://blogs.msdn.microsoft.com/visualstudio/2014/11/13/blend-for-visual-studio-2015-preview/

    Visual Studio 2015 Community is a fully-featured, extensible, free IDE for creating modern applications for Android, iOS, Windows, as well as web applications and cloud services.

    So for your situation, you should be choose Visual Studio Community 2015 as the debugger for your project.

    >> Were there some options I could have taken during the install that would have just set up the VS IDE instead of the Blend version?

    The Blend is installed automatically when installing Visual Studio. And there doesn't has any options when installing Visual Studio to set Blend or Visual Studio as default program for your project. You need to set it in Windows by right-click the .sln/.csproj file -> Open with -> Choose another app -> Choose Visual Studio 2015. And on the pop up window, please check the "Always use this app to open .sln file". Next time, when you open a solution, it will use Visual Studio 2015 as the default program.

    If your problem has be resolved, please mark the helpful rely as answer by click the "Mark as answer" hyperlink to close this thread. It is benefit to other communities who has the same issue.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 11, 2017 7:34 AM
    Moderator

All replies

  • Assuming that you have a correct configuration in the Web Server and debugging settings, you can manage the directory listing feature from the Web.config file by adding the following tags in the <configuration> section:

    <location path=".">
       <system.webServer>
           <directoryBrowse enabled="true" />
       </system.webServer>
    </location>

    In the code snippet above, I have enabled the directoryBrowse feature and you can simply disable it by using the "false" value. This should prevent any directory listing in your web server.


    Real men hack kernels!




    • Edited by 0xack13 Sunday, January 08, 2017 6:06 PM
    Sunday, January 08, 2017 6:05 PM
  • Hi rpfinn,

    I agree with 0xack13's suggestion. Please check your Web.config file to confirm whether you have enabled your web application directory browse.

    If yes, please disable it. And if you don't set start up page when disable directory browse, you will get 403 forbidden error. Please set one of the page as start up page when you start debug your web project.

    And if I set as Current page in project properties page, it never debug the opened page in my Blend when directory browse disabled. But it works fine in Visual Studio 2015.

    So I'm afraid this is a problem for Blend. And in my opinion, Blend often used to design for our application UI. I suggest you use Visual Studio 2015 IDE to debug your Web application, which has more professional debugger for application debugging.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 09, 2017 2:44 AM
    Moderator
  • Hi Oxack13 thanks for the quick reply.  I have disabled directory browsing and consequently get the 403 error when I run the debugger as I do not have a start page defined for the project.

    I'm used to using VS premium and in that version if you have the page highlighted in tabs and run debug the debugger opens the page you have highlighted.  Is that not how it works in blend?

    Thanks tonnes for help, Roscoe

    Monday, January 09, 2017 8:12 PM
  • Hi Weiwei thanks for the quick reply.  Yes, I'm used to using VS premium and in that version the page in the highlighted tab is the page that gets debugged.

    So it's a problem with the community edition?  Think they will fix it?  Kind of inflexible having to change the start page every time you want to debug a different page in the project,

    Thanks tonnes for help, Roscoe

    Monday, January 09, 2017 8:20 PM
  • Hi rpfinn,

    I need to confirm with you, do you use Visual Studio IDE or Blend for Visual Studio?

    In Visual Studio IDE, the highlighted tab is the page that gets debugged. But in Blend, the current page debug doesn't work. You need to set start page every time when you change page to debug.

    If you are using Blend for Visual Studio and get that problem, I will submit this problem to Visual Studio Connect. But if you are using Visual Studio IDE and has this issue, I'm afraid that there has any problem on your Visual Studio IDE. I need to help you troubleshoot this issue for your environment.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 10, 2017 2:57 AM
    Moderator
  • Hi Weiwei,

    I am using Microsoft Blend for Visual Studio Community 2015, Version 14.0.25431.01 Update 3.

    I'm new to the Community version of VS and I'm a unclear of the difference between VS IDE and Blend.  I thought Blend for Visual Studio Community 2015 was the free version of VS?  Were there some options I could have taken during the install that would have just set up the VS IDE instead of the Blend version?

    Thanks tonnes for help, Roscoe 

    Tuesday, January 10, 2017 2:44 PM
  • Ok sorry I get it now Blend is the first item to show up on my app list but I can also open MS Visual Studio Community 2015 and navigate to my solution and project where the debug works as expected.
    Tuesday, January 10, 2017 4:19 PM
  • Hi Roscos,

    >>  I thought Blend for Visual Studio Community 2015 was the free version of VS? 

    Blend for Visual Studio is a tool that we often used to design for our application, especially for XAML design. More information about Blend, please refer to following blog.

    https://blogs.msdn.microsoft.com/visualstudio/2014/11/13/blend-for-visual-studio-2015-preview/

    Visual Studio 2015 Community is a fully-featured, extensible, free IDE for creating modern applications for Android, iOS, Windows, as well as web applications and cloud services.

    So for your situation, you should be choose Visual Studio Community 2015 as the debugger for your project.

    >> Were there some options I could have taken during the install that would have just set up the VS IDE instead of the Blend version?

    The Blend is installed automatically when installing Visual Studio. And there doesn't has any options when installing Visual Studio to set Blend or Visual Studio as default program for your project. You need to set it in Windows by right-click the .sln/.csproj file -> Open with -> Choose another app -> Choose Visual Studio 2015. And on the pop up window, please check the "Always use this app to open .sln file". Next time, when you open a solution, it will use Visual Studio 2015 as the default program.

    If your problem has be resolved, please mark the helpful rely as answer by click the "Mark as answer" hyperlink to close this thread. It is benefit to other communities who has the same issue.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 11, 2017 7:34 AM
    Moderator