is it normal to get an exception? - asp.net

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

Related

asp.net pages randomly lose all form data and do not postback

we've had a production application in use for about 7 years, and recently it started some strange behavior. There are a few pages where, when a user clicks a button that causes a postback and some proecessing, the browser looks like it's doing something (that is, the processing icon starts churning), but then it stops and all form data that the user enters disappears. The request never makes it to the server - I see no trace of it in the IIS logs.. no error gets written to the event log, and there are no javascript errors. It just starts and then stops. It only happens to certain users and it's not repeatable... the same user can use the same page again and it works and fails randomly. I can't reproduce the error. The browser being used is the latest Internet Explorer. I am a seasoned asp.net developer and have never seen this before.. I never ask a question in here, but this time i'm completely stumped because there is no trace of anything happening so I can't debug. Has anybody seen anything like this before?

iisexpress 10 terminates with exit code -1

I've just migrated to a new dev machine, and when I launch my ASP.NET application, it starts fine, including Session_Start being called, and displays the WebForms login form (legacy, I know). But as soon as I click anywhere on that webpage, iisexpress terminates with exit code -1 (0xffffffff). It seems to skip both Session_End and Application_End, as no output is generated in the Output panel, from my System.Diagnostics.Debug.WriteLine(...) calls.
Any idea what might be happening or how I can research it? I'm unable to find anything useful on the web.
Update 2018-05-17:
The problem has vanished.
Yesterday, after posting, I tried some options: Disable debug and continue, change to use Chrome rather than FF, start option changed from "current page" to "specific page" (index page) or "start URL" (also index page). The problem vanished.
This morning, I tried resetting those options to what I think they were originally, but am unable to reproduce the problem.
So, I can only assume there was some temporary problem on my system.

Page Inspector doesn't handle New Windows from Javascript

I have an ASP.NET application I've inherited and am trying to debug. I'm using Page Inspector in VS 2012 Express to work on a particular page that has lots of JS in it. Unfortunately, that page is opened as a popup whose URL is dynamically generated by JS. Page Inspector does not seem to handle this well.
If it just popped out into the new window, that would be OK because I could then get the URL and paste it back into the main PI window. However, it seems to lose the session reference when it pops up, because it logs me out of the application, and when I log back in I lose the location I was at.
I've tried changing the function that does the URL generation / window opening to a window.location.href, but that doesn't seem to work either; it just stays on the same page.
The references to the URL generation functions are done in such a way that it would be a lot of work to switch it from calling a JS function to just a straight link on the page, especially since I would have to switch it back for production.
Any ideas on how I can configure Page Inspector to handle popup windows better?
Thanks.

How to stop MonoDevelop from opening a Safari window on debug?

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.

help debugging a silverlight application

I am currently developing a silverlight application, however yesterday I started getting the following error message every time I run the project:
I am a little confused as to why I am getting this message, and am looking for some help to track down the cause. If I click "yes" to debug - nothing happens. Also, I have no Line 1805 in any of my source files!
This error message started appearing yesterday, and appears as soon as I run the project, shortly before the first page loads. If i click yes or no, the project then loads and runs perfectly, I cannot see any unwanted behaviour.
I have been using source control, so I rolled back the project to a point before the error started appearing, however I am still getting the error!
Could it be a setting in VS Web Developer Express 2010 that I have accidentally changed?
You have script debugging enabled in your IE advanced settings. If you don't intend to be debugging script then disable it. The line number represents the line in HTML or Javascript content file where the error is being reported.
Thanks for the answer Anthony, however I just solved the issue.
I cleared the browser cache, and now the error has gone away. How bizarre!

Resources