Using Fiddler To Replay an AJAX (xmlhttp) Request

image.png

  The Problem I use to spend a lot of time writing throw away JavaScript code to test AJAX (XMLHttpRequest or Asynchronous JavaScript and XML) type requests to my hosted web services.  that is, on my ASP.NET server, I have services that look like the following (Microsoft ASP.NET MVC projects): [HttpPost] [NoCache] public JsonResult GetEmailByPerson(long addressBookEntryId, string existingEmailDetailIds, int? start, int? limit, bool? emailNotViewed = null, bool? emailNotDeleted = null, bool? forceDataToHtmlBody = false) { Utils.AuthorityLevel userAuthorityLevel = Utils.GetUserAuthorityLevel(); if (userAuthorityLevel == Utils.AuthorityLevel.None) { return Json(new { Message = … Continue Reading

Developing With Visual Studio 2011 and the Windows 8 Consumer Build With Metro and Two (multiple) Monitors

Wow, that’s a long title. Sorry, but I just wanted to be clear what you are getting into if you come here.  In this article, I’m going to talk about what it takes in very simple terms to build and specifically debug a windows 8 metro application using the beta version of Visual Studio 2011. Here are the steps: 1.  Install Windows 8 Metro and Visual Studio 2011 Beta 2.  Using display settings (control panel / display) make the monitor that is not your desktop the primary monitor 3.  Launch your desktop on the computer that is your primary monitor 4.  Run Visual Studio 2011 Beta on your desktop 5.  Create a Metro style project 6.  Run/Debug from inside Visual Studio That’s it!  The trick is that … Continue Reading

Pinning Watch Variables While Debugging Visual Studio 2010, Awesome Feature

I just have to blog about what a helpful feature this is that the VS team added in VS2010.  That is, as you are debugging, you can set a watch variable and pin it to your source code.  In previous versions, you needed to basically go through the hassle of setting conditional break points to do simple debugging or be prepared to do lots of mouse clicking.  In the latest version, all you have to do is click the little thumb tack icon and drag the variable to where you want to see it. Here is what your screen looks like.   … Continue Reading

If You Use BackgroundWorker in .Net, Make Sure You Wrap Your Worker Method In Try (or risk missing the exception thrown)

image.png

So, just a short post in case someone runs into the same problem I had today that cost me about 2 hours using Visual Studio 2010.  Basically, if you are using the BackgroundWorker in a windows app (with visual studio) and find that the method is not finishing and seemingly not throwing exceptions, maybe it actually is and you are missing it. That is, if you have code like this: private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e){ backgroundWorker1.ReportProgress(0,"starting..."); for (int i = 0; i < 10;i++ ) { if (i > 5) { throw new ApplicationException("any error here"); } backgroundWorker1.ReportProgress(i, "working..."); … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: