Andornot Consulting Inc.
Home Page
Home Page
 |  | 

Monday, January 08, 2007

ASP.NET 2.0 Profile with Web Application Project Gotcha

When using Web Application Project with Visual Studio 2005 instead of Website Project, the profile personalization feature new to ASP.NET 2.0 doesn't "just work" the way all the articles describing Membership and Profile say it does. The strongly-typed ProfileCommon class is not auto-generated and Intellisense tells you it has no idea what you're talking about when you attempt to access HttpContext.Profile from code.

ScottGu reveals (full article):

VS 2005 Web Application Projects don't automatically support generating a strongly-typed Profile class proxy. However, you can use this free download to automatically keep your own proxy class in sync with the profile configuration.

I got quite frustrated, enough to bang the desk, but fortunately not enough to emit a Primal Yodel. As usual, Super Ted came to the rescue and pointed me to the above download.

UPDATE June 25, 2007 - The gotdotnet site in the "free download" link above has shut its doors, possibly forever, so here is a copy of the Web Profile Generator for your downloading pleasure: Web Profile Generator download.

UPDATE II from Ted, July 4, 2007 - As of yesterday, the Web Profile Generator lives again on CodePlex: http://www.codeplex.com/WebProfile

Labels: , ,

3 Comments:

Steven Harman said...

I can not believe that this isn't supported natively for WAP. It's even more surprising that the issue wasn't addressed for VS 2005 SP1 which has WAP baked in.

The whole add-in route feels like a total hack. If that is the way that MS want it done, the very least they could have done was document it.

I guess that's what we (the blog-0-shere) are here for. :)

Thanks for the tip... I can stop banging my head into my keyboard now.

2:13 PM  
nettellect said...

microsoft is phasing out its gotdotnet any new link for Asp Web Profile Generator

11:27 PM  
Anonymous said...

Yes, I need that download too, where can I find it now?

5:57 AM  

Post a Comment

<< Home