"View in Browser" and "Browse with..." context menu entry on classic .asp files in VS? - visual-studio

some bad legancy web application projects still have classic asp files. these project consist of 95% of classic .asp files and the rest only of asp.net (.aspx).
if you right click on an .aspx file in the solution explorer of VS you can choose "view in browser" and "browse with...".
however if i right click on an classic .asp file there, there is no such option!
do you have any tip/hint/addin for me so that it will show these two context menu entries also for .asp files?
i run all my projects in IIS not the build in casini web development server VS comes with!
thanks, toebens

The problem is that VS includes the Cassini web server out which it can deliver execution of ASPX files. However it does not include a processor for ASP pages, for that you need to run the ASP pages in IIS, hence there is no simple "Display in browser" since VS has no idea what URL to ask the browser to display.

Related

How do I set something in Visual Studio 2013 Express for Web so that running it in debug mode opens home page?

Running Razor, MVC5, .Net 4.5.1. I have no idea what constitutes a "start page" in MVC within the visual studio development environment. How do I set it so that every time I run F5 my home page opens?
Setting a startup page for MVC5 when debugging
This can be done in the Project Properties.
Open Solution Explorer and find the relevant project.
Right-click on the project and choose Properties (or press Alt+Enter).
Navigate to Web -> Start Action.
Explanation
By default an MVC application has the Specific Page radio button selected and the input box is blank. This means that the application will open a browser to the server with no page specified and MVC will use the default route of /Home/Index.
http://localhost:12345/
You can specifiy a different route. For example you could use Home/About (see image).
This would open
http://localhost:123456/Home/About

MS VS 2010 - Web one click publish toolbar is disabled when code file is viewed

I use VS 2010 and the deploy function and to get quick access to the functionality I showed Web One Click Publish toolbar. But the toolbar is only activated when I open Web.config files or when I open Properties of a web project. When I open C# code file that toolbar is disabled. I think the functionality should be enabled independently like for example functionality Build project.
Is it something wrong in my VS installation or configuration?
I've just found that it is disabled when code file being viewed (active) does not belong to Web project (but to other one instead that cannot be published).

How to make IIS Express the default web server in Visual Studio?

Is there a way to set IIS Express as the default launch option in Visual Studio 2010 SP1? Currently, it uses Visual Studio Development Server by default and one has to execute "Use IIS Express..." command manually.
Right click on the Default Startup project file in your Solution explorer.
Select "Properties".
Click on the Web Tab on the left hand side
scroll down and select the "Use Local IIS Web server radio button
Tick the checkbox "Use IIS Express"
Another useful tid bit in the section is that you can tell IIS not to launch browsers when you debug and just wait for a browser process to hit it. This is really nice for cross-browser testing.
Just above the previous said section, look for a radio button titled "Don't open a page. Wait for a request from an external app" under Start Action section of the same page
EDIT:
To set all projects made to behave this way do the following:
Tools -> Options
Projects and Solutions
Web Projects
Tick "Use IIS Express for new file-based web sites and projects

Start Debugging command launches silverlight html page via file system rather than in local web server

I have a Silverlight 4 project in VS2010 along with a web project to host the silverlight app. When I hit F5 to launch the debugger the auto-generated html page (SilverlightApplication2TestPage.html) launches in IE, but the page is loaded via the file system (C:\Users\Chloraphil\Documents\Visual Studio 2010\Projects\SilverlightApplication2\SilverlightApplication2\Bin\Debug\SilverlightApplication2TestPage.html).
I want the aspx page to launch via the embedded web server. I have right clicked the aspx file and selected "Set as Start Page" and confirmed it is set in the "Web" tab in the properties dialog.
You have to set the SilverlightApplication2.Web project (the one that contains the .aspx page) as StartUp project (Set as StartUp project in context menu in Solution Explorer).

Choose browser to launch when debugging ASP.net (Visual Studio)

Is there anyway to have Visual studio start up a certain browser when running asp.net project?
Open any Web Form
File->Browse With...
Select from the list and hit "Set as Default"
yes
navigate to any aspx file in solution explorer
Right click browse
with and set your default browser
See here

Resources