Home / ASP.NET Weblogs

June 2009 - Posts

Posted to:

Unload Web Site and WAP in Visual Studio

Inside Visual Studio many times people want to be able to unload a projects without having to completely close them… Web Application Projects (WAPs)/ Class Libraries Unload WAPs or Class Libraries unloading the project allows you to open the .csproj or .vbproj within an XML editor and modify the properties… This is by far the biggest reason why unloading WAPs, Class Libraries etc is used…  You can Unload most of the VS projects by Right Clicking on the project node and clicking “Unload Project” as shown below: After Unloading the project looks as below and you can again Right Click on it to edit the project file. Web Site Project Unload Web site project on the other hand are different, firstly cause they do not have a project file and hence...
Posted to:
06-26-2009, 2:39 PM

Unit Testing with .NET RIA Services

Vijay , one of the folks working on RIA Services recently posted a very good overview of how to do Unit Testing with .NET RIA Services.  I think this is an important benefit of adopting the RIA Services pattern.  Check it out and let us know what you think!   Unit Testing Business Logic in .NET RIA Services Read More...
Filed under: ,
Posted to:

The MVC T4 template is now up on CodePlex, and it does change your code a bit

Short version : the MVC T4 template (now named T4MVC) is now available on CodePlex, as one of the downloads in the ASP.NET MVC v1.0 Source page .   Poll verdict: it’s ok for T4MVC to make small changes Yesterday, I posted asking how people felt about having the template modify their code in small ways.  Thanks to all those who commented!  The fact that Scott Hanselman blogged it certainly helped get traffic there :) The majority of people thought that it was fine as long as It’s just those small changes: make classes partial and action methods virtual. Don’t mess with ‘real’ code! It asks for permission, or at least tells you what it’s doing I started looking for a way to pop up a Yes/No dialog, but ended up going with a slightly...
Posted to:

A case of lost session variables when using out of process session state

Recently I had a case where the customer had an issue with session variables.  The claim was that if they use in-proc session state their session variables would work just fine, but if they changed the session mode to stateserver in web.config their sessions were lost. <sessionState mode="StateServer" cookieless="UseCookies" stateConnectionString="tcpip="/> When looking at bit closer at the repro, it wasn’t really all session variables that were lost, it was only ones set in Page_Error, and when they were read in an error page they redirected to (with the customErrors setting in web.config) would be null. Why is there a difference in this case between in-proc and out of process session...
Posted to:

Is It Too Late To Change JSON?

In my last post, I wrote about the hijacking of JSON arrays . Near the end of the post, I mentioned a comment whereby someone suggests that what really should happen is that browsers should be more strict about honoring content types and not execute code with the content type of application/json . I totally agree! But then again, browsers haven’t had a good track record with being strict with such standards and it’s probably too much to expect browsers to suddenly start tightening ship, not to mention potentially breaking the web in the process. Another potential solution that came to mind was this: Can we simply change JSON? Is it too late to do that or has that boat left the harbor? Let me run an idea by you. What if everyone got together...
Posted to:

The Weekly Source Code 43 - ASP.NET MVC and T4 and NerdDinner

I really advocate folks reading as much source as they can because you become a better writer by reading as much as writing. That's the whole point of the Weekly Source Code - reading code to be a better developer. Reading code in Open Source projects is a good way to learn, especially if the project has been around a while and been successful, or if you already respect the team of people working on it. Less reliably, you can find snippets of code by searching and sharing code. David Ebbo is scary clever . You know someone is smart when they come up with something you don't think you yourself could come up with on your own, but you still kick yourself for not thinking of it in the first place. David's been experimenting with ways...
Posted to:

JSON Hijacking

A while back I wrote about a subtle JSON vulnerability which could result in the disclosure of sensitive information. That particular exploit involved overriding the JavaScript Array constructor to disclose the payload of a JSON array, something which most browsers do not support now. However, there’s another related exploit that seems to affect many more browsers. It was brought to my attention recently by someone at Microsoft and Scott Hanselman and I demonstrated it at the Norwegian Developers Conference last week, though it has been demonstrated against Twitter in the past . Before I go further, let me give you the punch line first in terms of what this vulnerability affects. This vulnerability requires that you are exposing a JSON service...
Posted to:

Disabling Script Debugging with VS 2010, Silverlight & IE 8

This is a quick post to cover few items related to Script Debugging and the way it is impacted by Silverlight, Internet Explorer 8 and Visual Studio 2010… With IE 8 there is no longer option to disable script debugging… When VS 2010 will launch IE 8 then script debugging will be enabled by default… This will help people debug scripts flawlessly without having to go and change script debugging features within IE 8… While this is a good feature for most users it might at times create problem when you do not really want script debugging to be enabled for performance reasons (i.e. if you do not want to debug scripts and have lot of scripts in your pages)… On separate note Silverlight is a special debugging option for Web Projects…  You can...
Posted to:

Mind if my MVC T4 template changes your code a bit?

When working on my MVC T4 template , I was not able to use reflection to discover the Controllers and Actions, because the code that the template generates is itself in the same assembly as the controllers.  So that causes a bit of a chicken and egg problem. Instead, I had to get out of my element and learn something I was not familiar with: the Visual Studio File Code Model API.  It’s very different from using reflection, because instead of working at the assembly level, you work at the source file level. You have to first locate the source file you want to look into.  You can then ask for the namespaces that it contains, and the classes that they contain, and finally the various members in those classes.  To be honest,...
Filed under: , ,
Posted to:
06-24-2009, 5:33 PM

PM Tip #10: Interview Tips for Landing a Great Program Management Job

Recently a friend of mine at Microsoft asked about tips for how to land a great Program Management job at Microsoft.    It has been a while since I did a “PM Tips” post, so I thought I’d use the opportunity to share my thoughts and get your feedback. I have done lots of PM interviews over the years and through the process I have developed a few things I look for to spot great program managers.  In fact I have often mentioned to co-workers in Dev or test and even people I meet at social events that they would be great PMs… most of the time they look at me like I am crazy… but sometimes, they turn out to be, in fact, really great PMs. Getting the Interview Know what you are looking for – Given this economy, I know many folks...
Filed under:

< Previous 1 2 3 4 5 Next > ... Last »