How to stop MonoDevelop from opening a Safari window on debug? - asp.net

Is there a way to get MonoDevelop to not open a Safari (or other browser) window when I debug a web site? I still want it to fire up the XSP web server, and kick into debugging mode.
Reason being because I'm hitting the server code being debugged from another location, and I don't want to have to keep closing useless browser windows over and over.

A bit of a hack, but I'm now just calling window.close immediately after the page loads from JavaScript.

I'm on Linux, and I'm not sure if it will work for Mac, but this is the only relevant thing I found by searching for the same problem on Linux, so this answer is relevant to someone.
I go to the choice of browser (in the build options near the build button) and choose to open it in Vim. For some reason it doesn't want to open in Vim, even though it opens in LibreOffice and in Atom editor just fine. Ergo, it doesn't open anything. So A) this allows page refreshes on the home page. B) There's no opening and closing. C) You don't change any code to modify functionality of an editor.

Related

CSS changes are not reflected even after changing version, hard refresh and clearing cache

I have an Angular application with CSS in it.I have recently changed the CSS and deployed it on server but it is not getting reflected in the client machines.
I have done the following things:
Clear cache and did a hard refresh (Ctrl+f5).
Changed the version number of the CSS file and redeployed it.
Opened developer tools and disabled Cache and reloaded.
Pressed F12, go to source and checked the CSS file if new changes are getting loaded. New changes are there.
When I opened the web application in a new machine, the new changes are getting reflected.
When can be the possible reason for CSS not getting reflected even after checking all the above. Is there anything which I'm missing?
is it a PWA (progressive web app)... ? in which case the data is served by service worker and not freshly fetched.
Go to
Chrome developer tools (press F12)...
Click on Application tab on
the left navigation, click on "Service workers" and 'unregister"
service workers...
going on the next option in the left navigation, click on "Clear storage"...
click on the "Clear site data" button on the right zone restart Chrome and check with Ctrl+shift+R
if you're using a CDN, you may have to purge the cache for this particular CSS file from there as well.
Make hard refresh (Ctrl+Shift+R)
or go to view page source and the open css file from it and make it refresh and then again make hard refresh...Your problem will be solved
Please clear the browser history of the application complete from begin and perform hard refresh and then try to login to your application
You can disable cache in development tool in chrome.
Go to Developer tool in Chrome by pressing F12, Network-> click on Disable Cache
I faced similar issue. This helped me. Hope it might help some one

.net localhost website consistently making get arterySignalR/poll?transport=longPolling&connectionToken= calls

I created a new VS 2013 project and viewed the default.aspx page with the Firefox browser. When I check the net calls it has made, I see it making constant calls to:
http://localhost:50682/6a663a78019845d5ade4a328cad09cc2/arterySignalR/poll?transport=longPolling&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAOBmDwPWa2ky2MAZXFHBMVAAAAAACAAAAAAAQZgAAAAEAACAAAADSADQXBVKiKczflJ0OzUjOLduFTJE4zd%2FLHWGpDfXnuAAAAAAOgAAAAAIAACAAAACyEX81VwilygfphPoEKCYQ6ZwrkzExoKfZzEMkqBKqqzAAAADG%2BDJbrEFOfsNm9OKhqacnGseQvrwy5kmyZnI5YJiZbjYFgzMELXHfwA7Sxjj4osJAAAAAvQvoG4N0nn8eB9FRaJaZyqaUDF%2F9ypvGN%2B%2BVefnx8U1Fq6P9HXO9vEC%2BfA2s8R4jik58rD4IcFMjM4P8l5kv6g%3D%3D&messageId=d-F1180A0E-W%2C0%7Cl%2C4%7Cm%2C0&requestUrl=http%3A%2F%2Flocalhost%3A50656%2Fdefaulttest&browserName=Firefox&tid=4&_=1384207744328
Why is it doing that?
How do I stop those calls?
I see an infinite number of calls made to the above URL every 6 seconds.
Please help me understand this and fix this.
This is working as intended. Artery aka BrowserLink is a real-time connection from Visual Studio to all browsers running your code. It essentially allows Visual Studio to interact with every browser.
For instance if you have IE, Opera, Chrome and Firefox all running your code and you're trying to ensure cross browser correctness; instead of going to each browser and hitting f5 to refresh you can just click the browser link refresh button which will auto-refresh all of the pages for you.
Not everyone wants or needs to have this functionality so if you do want to disable it, as Gustavo Armenta said you can disable it by following the steps here: How can I disable __vwd/js/artery in VS.NET 2013?
I would recommend you to read this post first Browser Link feature in Visual Studio Preview 2013 to understand about this new feature that comes in with VS 2013.
And then to disable this, simply uncheck the "Enable browser link" option.
You can hide the polling requests from the Chrome developer tools Network tab so that the requests you are actually interested in become visible. You can hide the polling requests by adding a negative filter:
On the Network tab, click the filter button to open the filter options
Enter "-poll" without the quotes to hide the polling requests.
Example:
Had issues with that on site running with KnockoutJS framework. Pages were freezing for 10 seconds until "BrowserLink" external scripts were loading (using Chrome browser).
Issue solved by disabling "Browser link" feature in VS 2013
Steps How to disable "Browser link" (thanks to Gustavo Armenta for leaving comment with link in question)

How can I properly refresh a Durandal SPA web app when new views are added?

I'm just starting to play with Durandal, using the starter kit. I've added a very simple new view/viewmodel combination (essentially a copy/paste of an existing one from the sample) and mapNav()'d the route.
The problem is happening when I try to refresh my browser...the new view simply does not appear. It's not in the nav bar, nor can I navigate directly to the view by typing in the address bar. I know the code is (or should be?!) correct because if I go to the page in a different browser, everything appears as it should.
Is there some browser caching that Durandal is doing somehow? Sometimes F5 or Ctrl+F5 works to refresh, sometimes it doesn't. I also can't deep-link to a specific 'page'. Ie:
http://localhost:52625/#/newpage just gives me a blank
What am I missing?
The option that I use in Chrome is to open developer tools and right-click on the refresh button. There is an option for 'Empty Cache and Hard Reload' which always fixes this issue for me. I don't know the equivalent in IE but try this and see if it fixes your issue.
Most browsers will cache modules returned via RequireJS, which is how Durandal obtains its modules and view models.
CTRL+F5 doesn't help because that just refreshes the initial page - all the modules are still requested using javascript (RequireJS), so they are usually pulled from cache first.
I've found it's best to disable caching in your browser's developer tools. Doing so will ensure that all network requests are loaded directly from the source and not from cache.
See this question for additional information: Debugging when using require.js cache
Another solution is configure RequireJS to set its urlArgs property: https://stackoverflow.com/a/8479953/91189
This solution works ok, but makes it harder to debug, at least in Chrome, because breakpoints are lost every time the module is loaded, since it's technically a different file being requested each time.

is it normal to get an exception?

I'm using asp.net and when I press the play button to start debugging, all works fine. The page I'm debugging makes ajax calls to a web service. Then, I press stop. When I trigger another call from the page in the browser, I get an error back.
Am I getting this error because something broke in the back-end (but since I stopped debugging I can't see what it it) or is it that when you press the stop button, the entire application stops? The reason I'm asking is that when I press the preview button on the same page, the ajax calls work fine even thought the app in not being debugged.
Thanks,
Try to look at the process explorer to see which process is starting/ending when you press "start/stop debug".
If the back end is yours and you've got source codes, than start another Visual Studio instance and run the backend in the debug mode to see what's happening there...

Visual Studio | ASP.NET Configuration error

I have a problem as I have struggled with for a week.
Now I give up! I really can not figure out how to solve it. Every time I open the ASP.NET Configuration in VS10, then comes the first with this error:
**An error was encountered. Please return to the previous page and try again. **
If I then press:
How do I Use this Tool
so this comes up:
**Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool. **
Some who can answer me on what's happening here?
"Special characters in the path may be the problem, according to the posts." as Posted above by Dave Swersky
THIS worked perfectly for me! I had a special character ("#") in my folder path I removed this and removed spaces for good measure!
I was getting the error "Tool has timed out" among other errors when accessing the WSAT(Web site administration tool) from the ASP.NET configuration menu item.
I saw a post somewhere else that said the problems was solved when the default browser was changed to Internet Explorer. I have been using Firefox and have the exact same problem. When I changed the default browser to IE, the configuration page came up with no problem. But it won't work twice in a row without going in and setting the default browser back to IE each time. When I go back in to Program Access and Defaults, "Use by current browser" is selected. I have to reselect IE, and then it will work one time.
Judging by the Connect site, this error has been reported and is not well understood:
http://connect.microsoft.com/VisualStudio/feedback/details/118567/an-error-was-encountered-please-return-to-the-previous-page-and-try-again
Special characters in the path may be the problem, according to the posts.
This is what worked for me.
I'm using Visual Studio 2010 trying to create the membership role. I was trying to use the ASP.NET Configuration in Visual Studio.
Set the 'Default Browser' to Internet Explore.
To do this:
Right click on one of the .aspx pages you have under "Solution Explorer".
Select "Browse With..."
Select Internet Explore and Click on Set as Default.
Close the box.
Go back and click on "ASP.NET Configuration"
This will automatically open Internet Explorer.
Problem Solved :D
I guess what I was doing wrong was using Firefox as the default browser with Visual Studio. I'm guessing Visual Studio works good together with Internet Explorer since Momma and Daddy made them together (awww how cute)
The issue might be related to an application path that has spaces. After googling I managed to bypass the issue by appending the application path to the url manually ie.
http://localhost:{your_port_here}/asp.netwebadminfiles/default.aspx?**applicationPhysicalPath={path_to_your_application}&applicationUrl=/**
As a firefox user, I closed firefox then executed the "ASP.NET Configuration" option in VS2010. It automatically opens firefox (default browser) and now I am seeing WAT page contents.

Resources