# Sunday, 27 May 2007

Since recently the ASP.NET forums got an upgrade to the new Community Server 2007 there's also the possibility to show your Fans and Friends. Not really much at the moment since the feature's a little unknown by most members at this moment and you have to enable some parts in your Profile.

If you're a member reading this you can enable it by clicking on the Edit Profile button in the right upper corner, navigate to the Favorites tab and check the Share Friends checkbox and hit save at the bottom of that page. After that it's easy to add friends by going to their public profile of a member you see on the forums or, if you know their nickname, navigate directly to http://forums.asp.net/members/nickname.aspx. So for me that becomes http://forums.asp.net/members/XIII.aspx.

Then click the Add as friend link and go back to your public profile and voila, the person appears in your friends list.

Grz, Kris.

Sunday, 27 May 2007 11:22:24 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [4]  | 

When you start creating a new ASP.NET 2.0 site with Visual Studio 2005 or Visual Web Developer Express (VWD) and want to start using it you'll notice that a new file in the App_Data folder gets created besides your own database, namely the aspnetdb.mdf file. This extra database holds all the tables and stored procedures to let Membership, Roles, Profile etc run smoothly.

However a problem arises when you don't want to use that dedicated new database when you want to deploy to your live webserver, certainly not when you use a host that only offers one database and charges you extra for another database. Luckely you can control things more when using the dedicated aspnet_regsql tool that ships with the .NET 2.0 framework.

What I'm about to describe in this article is how to use that tool to generate a SQL script that you can use to run on your other database with a tool like SQL Server Management Studio (SSMS). In this example I'll be using the installed Northwind database on my localhost developer machine.

Just start up a new DOS box by going to Start | Run and type in cmd followed by enter. In Windows Vista you push the blue windows logo button and in the field with the text Start Search you type in cmd followed by ctrl + shift + enter. The reason for that combination is that you must run it under Admin privileges or else the to be generated file doesn't get writed to disk.
A new DOS box will appear and you just navigate to the following directory/folder:

Windows\Microsoft.NET\Framework\v2.0.50727\

If you're not used to using DOS you can navigate to it by typing this in the DOS box: cd \windows\Microsoft.net\framework\v2.0.50727 followed by enter.

Then you type in this line: aspnet_regsql.exe -E -S localhost -d Northwind -A all -sqlexportonly c:\membership.sql again followed by enter. At the location c:\ a new file gets generated: membership.sql.

The Northwind name in the parameter list is later on used to set the db name in the generated sql file: SET @dbname = N'Northwind'

Once generated you can use/tweak this file to be used in SSMS to get executed and to install everything needed in the database.

Ok, up untill now we focussed on getting everything ready on the database side but we also have to let our ASP.NET 2.0 application know that we're pointing out to another database than the default one. The solution for this is to override the default settings for the LocalSqlServer connectionstring which can be found in the machine.config file.

<add name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;
AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

providerName="System.Data.SqlClient" />

To override that you open the web.config file in your application which can be normally found in the root of the application. Go to the <connectionStrings> element.

<connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="The connection string to your
                         (new) database"
providerName="System.Data.SqlClient" />
</connectionStrings>

Notice the second line where you call the remove statement. This is needed in order to be able to override the LocalSqlServer connection string!

If you're in need of a little help to get your connection string right there's a dedicated site: http://www.connectionstrings.com/.

If you're interested in creating one dedicated database for multiple applications you can also check out Scott Guthrie's post: Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005.

Grz, Kris.

Sunday, 27 May 2007 09:46:38 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 26 May 2007

I just received my PopFly invitation. I hope to find some free time the next weeks to play around with it. In case you don't know what PopFly is, check out my previous posts about the subject:

Grz, Kris.

Technorati tags:

Saturday, 26 May 2007 10:19:59 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

Yesterday evening I attended a presentation by the Flemish conflict reporter Rudi Vranckx who's the guy that has massive knowledge about the Middle East. He just got back from Israel was is probably right getting ready to fly to Lebanon. He talked about his insights he gained through 18 years of reporting about the conflicts and it was very interesting. One of the reasons why I attended this presentation was because I know an MVP and collegue ASP.NET forums moderator who lives there.

The presentation was honest and the video material was mostly about the normal average day people out there that suffer from this ongoing conflicts. Rudi himself developed a high sympathy for a certain doctor in Irak who's trying to do research on the increasing rate of cancer patients and uranium enriched weaponry that was used during the Gulf War.

Grz, Kris.

Saturday, 26 May 2007 10:03:58 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, 25 May 2007

In case you didn't notice it, the MSDN site got revamped. Actually I like the new look & feel. If you're tired of seeing the treeview on the left you can just press the "T" key to make it hiding itself.

When you hover over the parts in the breadcrumb that also shows a nice dropdown to which you can easily link to other parts. I like it!

Grz, Kris.

Friday, 25 May 2007 18:40:02 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, 20 May 2007

And this time I don't mean the song by House of pain (upon which I also danced when I was way younger :-)).

I like the second video because it was filmed in Antwerp (that's the province where I live) and because it's totally funny to see the reactions of some of the people in the crowd. The first video contains LEGO. So it must be good :-).

Enjoy!

Grz, Kris.

Sunday, 20 May 2007 13:44:25 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 19 May 2007

I only blogged about Popfly yesterday and today I noticed a link to a demo. This stuff rocks!! Honestly I hope to get an invitation from Microsoft soon that I can also start experimenting with this.

Grz, Kris.

Technorati tags: , ,
Saturday, 19 May 2007 14:03:48 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I didn't had much time to play around with PowerShell myself but I noticed yesterday evening that Gill posted about a free eBook on the topic.

It's a small download but is a nice to have if the technology interests you.

Grz, Kris.

Saturday, 19 May 2007 13:40:27 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, 18 May 2007

Just read this on the blog of Somasegar:

Popfly is a tool and social network that provides a fun and easy way to build and share mash-ups, gadgets, Silverlight experiences, and Web pages using pre-built “Blocks” that connect to online services.

I asked for an invitation as they're not giving much away at the moment. Funny thing when I visited the site was to see someone I knew: Steven Wilssens, a Belgian developer and MVP that went working for Microsoft since last year.

Update: I just found out about this video on Channel9: PopFly

Grz, Kris.

Technorati tags:

Friday, 18 May 2007 21:09:23 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I'm already subscribed for that event and if you would like to come to you can go to this page: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032340308&Culture=en-US.

Hope to see you there!

Grz, Kris.

Friday, 18 May 2007 09:07:54 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |