Start development server not on the default browser - c#

I have ASP.NET MVC 4 application and I am debugging it with the built it development server( not IIS) my default browser is firefox so every time I click on "Debug" it open new firefox tab. I want to check my web on chrome also. what is the easiest way to make it? ( I don't want to change my default browser).

Choose a page in your project and right click and choose browse with and select your browser and set default
In MVC:
If you right click on any page other than default.aspx you will not get the "browse with" option.
So, when working on an ASP.NET MVC application, right click on default.aspx and chose "Browse With..." Then you'll get a dialog that will allow you to change your default browser.
NOTE:
for ASP.NET MVC3 projecs,You need to specifically add a .htm or .html page, and then right click that and choose Browse With and set to default
ALternative:
Default Browser Changer extension
Link

When you are in debug mode and it loads in Firefox, copy the url to the other browser.
Then go to Debug > Attach to Process, and select the process for the other browser and click [Attach].
A different approach using powershell scripts is shown in this blog post.
Ultimately, the easiest approach would be to use Visual Studio 2012 or 2013, which have this functionality built in to the debug button in the menu.

Related

How do I set the default browser in Visual Studio 2017?

I don't have the stupid Browse With, and every time i figure out where it's out it only gives me options for Internet Explorer... It doesn't give me an option to change the browser... Strange enough I've already removed Internet Explorer from my PC... How is it still using it...
"Browse With" is still available
You should be able to select the browser you want from the next window, its self- explanatory.
Try this out
First you have to install google chrome
Then go to visual studio and you can see a attach button with combo
on the top of the window
Click the combo to select the browser
You can see a window of attach process
Their you can see a available processes grid and select the chrome
browser
Go To Project
==> open folder
==> select file (ex: sample.aspx)
==>left click
==> select Browse with
==>Select Chrome
==>Click Set As Default
It works

How to View asp.net-mvc Build in Visual Studio 2015

I apologize for the remedial question. I accidentally closed the tab in Visual Studio that allows me to view the actual application (the one that loads by default when you create a new project). How do I bring this back up?
I've tried closing and re-opening the project, going through solution explorer in its entirety, and scanning every information source I can get my hands on. Thank you for your advice (and patience)!
If you want get the interface, that if you run your application it in a browser. On the panel open your browsers and choice Browse With:
in window choice Internal Web Browser and click Browse
If you want view your build anytime in internal browser - Set as Default.
Sorry for my English.

Silverlight functionality not working on Mac

I have an application built in silverlight and it has a functionality that uploads an excel file and an image file on individual button clicks.
When I open the app on windows (Internet Explorer, Safari, Chrome) - it works smoothly.
When I open the same application on Mac, this functionality (image and excel upload) fails.
Button_1 to Upload Image - I do get the file dialog box, I select the file, but when I say Ok, I do not get any errors, but the image upload does not work (I do not see the image uploaded)
Button_2 to Upload Excel - I do get the file dialog box, I select the file but when I say Ok (Error message: Excel is already open but I have checked numerous times... Excel is closed)
This error I am getting is only on Mac Machines... On all windows machines, it works smoothly
Silverlight Version - 5.1.302, Mac - 10.7.5, Browser - Safari - 6.1.1
Any clues?
I have found solution for this. We need to make some security changes in the Safari settings. Following are the steps I tried and things working fine. 1. Open Safari
2. Open desired application where you have issue
3. Click Safari from Top Menu Go to Preferences  Security  Internet Plug-ins ( Click on Manage Website Settings )
4. Left Window locate Silverlight and select it.
5. After selecting Silverlight  On right side window  You will see “website you have opened” and a dropdown  From Dropdown  Select  Allow Always and Run in Unsafe Mode
6. You will be prompted with some warning message – so that is ok… Say Ok and then click Done.
Close Safari completely – Make sure Safari browser is closed completely.
Open New Safari browser instance and launch application. Since I am running application in secure network - running application in unsafe mode do not cause any security level issues.

Launching my debug MVC3 application opens a specific .cshtml file in the browser

In Visual Studio when I press F5 in this particular MVC3 project, it opens:
localhost:36185/Views/Auction/Details.cshtml
When in any other project, when I press F5 it correctly open the Home/Index action method:
http://localhost:36185
Why is this opening a specific View instead of using the correct Home/Index action? What setting is interfering?
Project properties => Web => Start Action
and take your pick
You can try the solution given by Marc Gravell. If that doesn't work, you might want to check the Global.ascx file for routing configuration.

Breakpoint not hitting on button click in Silverlight + WCF RIA Services

I have created a silverlight app using WCF RIA Services and Entity Data Model.
In mainPage.xaml page I have dropped a button and on click of that button certain operation is performing.I have put a breakpoint on button click event, but its not hitting the breakpoint when I am clicking the button.
Kindly help regarding the same!!!
Thanks
Piyush
You need to enable "Silverlight" debugging in the web project.
Open the "Properties" of the web project and goto page "Web". In the section "Debuggers" check the Checkbox "Silverlight".
Another problem could be, that your current build configuration is set to "Release". Change it to "Debug".
This behavior can be caused by XAP file being opened (in some ZIP viewer) while building your solution. Visual Studio is quiet about not being able to replace the old XAP with new one and your breakpoints will be "out of sync".

Categories