10 March 2010 0 Comments

Tracking viewstate using a webtest playback add-in

  One of the coolest features I think we’ve added in Visual Studio 2010 is the ability to add your own tabs into the webtest playback view.  Extending the user interface in this way allows you to do data analysis and have it pop up right in front of you in whatever format you want.  No more exporting to excel or whatever your favorite analysis tool is, just compile everything you one in one place and voila! That being said, I have been told that it can be difficult to grok at first glance.  So, I wanted to post a sort of ‘how to’ in order to get one of these working.  A colleague of mine suggested that I could use this forum to demonstrate how to keep track of something that affects the performance of many users’ websites.  Namely, Viewstate.   So, below is a step by step instruction on how to create a webtest playback tab which keeps track of the viewstate size for each request.   Step 1:  Create the add-in project Visual Studio Add-ins have their own special type of project, you can find it under “Other project types / Extensibility”.   I’ve named mine “ViewstateAddin”.   Step 2:  Walk through the create add-in wizard When the wizard launches, you’ll be add a “welcome” screen.  Click next to move to page 1.

16 September 2009 0 Comments

SGEN gives "Error: The top XML element ‘class’ from namespace ” references distinct types UserDefinedFunctions.Class and UserDefinedFunctions.Class1."

  Another SGEN error that caused me some time to troubleshoot.

12 September 2009 0 Comments

.NET RIA Services Exception handling

Av Fredrik Normén, Cornerstone At the moment I’m updating a code example for my Silverlight 3.0 course and have added some exception handling to the code. I also got a question about how to handle exception while calling the Load operation of the DomainService class. So I decided to write a blog post about it, maybe someone more have the same question.

3 September 2009 0 Comments

Published links to office client applications do not show up in file open or save dialogs

Ever run into a problem where your published links for office client applications do not show up in My SharePoint sites Link in Office applications? If so, read through… First, the basics. Ensure it is configured right

2 September 2009 0 Comments

How to debug – Application verifier STOP 00000403 : Unbalanced CoInitialize/CoUninitialize calls on current thread.

Have you ever used application verifier ? I strongly suggest this great tool to everyone who develops programs on C , C++. This post assumes that you have a basic knowledge about how to use application verifier and windbg.

28 August 2009 0 Comments

Using EntityBag with EntityFramework over WCF

I was going through the article published in MSDN by Daniel Simmons about the N-Tier Patterns http://msdn.microsoft.com/en-us/magazine/dd882522.aspx and came across the EntityBag implementation.

24 August 2009 0 Comments

Why doesn’t my XAP load on a cross-domain page?

Why doesn’t my XAP load on a cross-domain page?  Probably because you’re not setting the mime-type of the XAP to “application/x-silverlight-app”. What’s the point of this restriction?  Well, we found during the development of Silverlight 2 that threats involving a Bad Guy loading a good XAP on his own domain were a bit subtle and non-obvious.  It’s common to use the HTML bridge (HtmlPage class) to chat back and forth with JavaScript.  As a developer does this, she’s rarely thinking about what might happen if the page is malicious.  Yes, this is somewhat mitigated by the ExternalCallersFromCrossDomain attribute, but this only protects against the bad JavaScript calling into the XAP directly.  There’s still the problem of the XAP calling out to a JavaScript function with potentially sensitive information.  So, we demand to see a special mime-type on the XAP to ensure that’s what the author intended. We were also worried that sites allowing users to upload arbitrary content would now need to check for files that look like XAP.  We really wanted to make sure that web developers and webmasters don’t need to read all about Silverlight just to make sure it can’t attack their site, even if they never plan to use it.  By demanding to see the mime-type, Silverlight knows that the web server knows what a Silverlight application is

22 August 2009 0 Comments

What would you like to see on the DevDiv SE Team blog ?

Hi, It’s been a while since the DevDiv Sustained Engineering (Servicing) team has posted to this space and we’re mulling over resuming this provided we find appropriate topics and content to bring to you. We thought it would be a good idea to share with you what our team does and have you, our readers help us determine the type of topics/content you would like to see here. So at a macro level here’s what we do – we’re a team of Release PMs handling the release of Hotfixes, security updates, and GDRs…( read more )

18 August 2009 0 Comments

6 New ESENT features in Windows 7

A quick look at some of the new features that are available in the Windows 7 version of ESENT. You’ll need esent.h from the Windows 7 SDK to see these definitions: 1

13 August 2009 0 Comments

PowerShell script to clean and zip a directory

As part of my role I’m often sending sample code to customers. Sometimes this is a small snippet inline in an email, but often it will be a zipped up Visual Studio solution.

30 July 2009 0 Comments

How to Get All User Members From Nested Security Groups in Active Directory Using .NET and C#

Hello, Randy Evans here. I am a principal developer on the Information Security Tools team. In a recent project, we found it necessary to get collections of users from security groups defined in Active Directory (AD).

27 July 2009 0 Comments

To query the local object context

When faced with the dilemma that what if I wanted to insert something and before I actually saved the changes into a persistent storage (database) by calling SaveAllChanges() method on the data context, I wanted to do a select, and also I wanted to make sure that this select is done on the just inserted objects, what should I be doing? Well generally we write a generic method that gets all the records for a generic object. it looks like this: IQueryable<T> result = null; string type = typeof(T).Name; //ObjectQuery query = entities.CreateQuery<T>(type); ObjectQuery query = Context.CreateQuery<T>(type); result = ( IQueryable<T>)query; return result; This will only query into the database