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

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).

Related

ASP .NET Core Web Server console output not visible in VS for .NET Core 2.2

I created a .NET Core 2.2 web application project in VS 2017 and the ASP.NET Core Web Server option from the console output is not visible when the application runs with IIS Express.
By .NET Core 2.1 web application projects this option is there and it is showing the output without any problems.
I think you have to right-click on Project->Properties.
Then on the right side menu to select "Debug".
In Web Server Settings find "Hosting Model" and select "Out of process"
The simplest option is to change your currently selected debugger run option (the dropdown with the green "play" button / F5) from IIS, to the name of your project (e.g. so that "FooWebApp" shows up now in the dropdown). This way the browser will still open like it was before, but the console window will start showing as well.
On the other route with Tuvia's answer above (thanks!), it's actually Properties/launchSettings.json which stores / determines these actions. There you can also set "launchBrowser": false if wanted, or if you want to change if the console window opens, within "IIS Express" profile, manually add: "ancmHostingModel": "OutOfProcess" (or else set to InProcess).

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

Can't debug dynamically loaded silverlight applications (xap file)

I have a solution which contains multiple applications. In the 'root' application I read a config file, download the xap files and load them using some class System.ComponentModel.Composition.Hosting.DeploymentCatalog .
The problem is that I can't debug these dynamically loaded applications (the web project, I can debug the Silverlight client). Visual Studio says the breakpoint will not be hit, displaying the exclamation mark inside the yellow triangle. If I copy the dll+pdb files to root application's output folder than the breakopints become colored in full red but they still aren't being hit.
Any solutions? Thanks!
Answering my own question:
I was able to debug my web project in Visual Studio 2010 by following the steps:
Web project -> Properties -> Web section -> Select Don't open a page. Wait for a ....
Start 'root' application in normal mode.
Right-click on web project -> Debug -> Start new instance.
That was it!
Go to Properties inside the Website project, click on Web tab at the left side, you will find Debuggers section at the bottom. Try checking ASP.NET radio button and uncheck Silverlight radio button and see whether you are able to debug the Web project or not.
If still this doesn't help, try unchecking Disable script debugging option in IE > Tools > Internet Options > Advanced

Default Browser- Visual Web Developer Express 2010

I am trying to debug a Windows Azure WebRole which is an MVC3 project, but I want it to launch in any browser of my choice.
The Windows Azure is set as the Startup Project and launches the MVC3 project WebRole.
I am using Visual Studio Web Developer Express 2010.
I have previously stabbed in the dark by setting the following properties as in the image below but to no avail:
I then decided to set the project to not independently launch a page as above.
Is there a way to setup a default browser with the above scenario AND without changing my Windows default browser?
I've gotten around this in the past by adding in an ASPX or HTML page to the project and then right clicking it and selecting Browse With. You can then change the default browser in there without having to change your default browser within windows.
I haven't tried this with the Express edition however, but I don't see why they wouldn't include it in there.
You can delete the file afterwards and it will still retain the setting.
How about this:
WoVS Default Browser Switcher
http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921
You right on the page shown in solution explorer and then browse with whatever browser you want to set and add it as default browser.

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

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.

Resources