Microsoft Releases Free CMS System Now I know it's Christmas! I just read on Mary-Jo Foley's blog about the new, free CMS/Blog system released by Microsoft called "Oxite". It is built using the new ASP.NET MVC framework and is highly extensible, touting such features as Microformats and source control integration. In fact, it is so customizable that users can swap out Microsoft technologies and use search and database providers of their choice. In addition, it can be used with different source control products such as TFS or SVN.

The Oxite team who were responsible for Channel 9, have put considerable effort into establishing a strong base that developers can both use off the bat, as well as extend themselves. I'm itching to give this a test drive but am somewhat nervous of the beta-state of MVC right now. So, I'm treading carefully before attempting the full install. It might be worth the time spent to read the MVC release notes and Phil Haacks account of some installation issues before jumping in head first.

You can run Oxite on any version of XP, W2K3 or W2K8. You only need three pieces of software: some version of Visual Studio or Express, ASP.NET MVC and either SQL Express 2005 or 2008 - I'm guessing that SQL Server 2005 will work as well? Note that the online installation instructions for full version VS and database have not at the time of writing, been added. Like that's going to stop us, right?

You can create single blog or multi-blog sites. You can create your own pages and sub-pages, etc. It's got pingbacks, trackbacks, multi-level RSS feeds, gravatars... the list goes on. Plus, we get to use Live Writer to post to our blog :-)

The only thing about all this is that I no longer have an excuse not to learn the MVC framework. So, I guess I better head over to the ASP.NET site and educate myself...

Tags: ,

ASP.NET | Blog

How to Find sn.exe

by agrace 2. December 2008 20:55

If you are in the business of deploying SharePoint Web Parts to the bin directory, then this little titbit may save you some time. In order to add a <SafeControl> entry to the Web.config file, you need to create something like this in the <SafeControls> section:

<SafeControl Assembly="SecureLinks, Version=, Culture=neutral,    PublicKeyToken=9f4da00116c38ec5"


You need to obtain the PublicKeyToken and the way to do this is to run the sn.exe command-line utility. Right-click on the Visual Studio command prompt and select "run as administrator". Change your path to: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>. This is where the elusive sn.exe resides!

Now you can call it using: sn.exe -T C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin\SecureLinks.dll. Substitute your own port number and Web Part name; my port was 80 and the Web Part was called SecureLinks. Also, make sure this is actually a capital "T". Running this command should return something like this: Public key token is 9f4da00116c38ec5.

ASP.NET Contact Forms

by agrace 30. November 2008 07:52

ASP.NET Contact Forms I've seen some blog postings out there recently on what to do if your contact form fails for some reason. Some have suggested including your email address using JavaScript, which I do not recommend. Some people even suggest substituting "@" with "at"; if I was writing a screenscraper, this is the first thing I'd check for, after "dotcom"! If you're going to try and include your email address, then why bother with a contact form in the first place?

I've been using my own standard contact form for some time now. It displays either a success or error message upon submission. If there is an error, then it generates an email back to me. In fact, I like to have an email generated whenever there is an application error in a client's website, and I include this as part of routine error handling in my projects. This works for small projects where it is unlikely to over-burden the mail server. The strategy pattern helps me to factor out this kind of repetitive functionality; see an earlier post about this. At the end of this post, you can find a link to download a simple contact form.

ASP.NET Contact Forms


A lot of people have problems testing email with ASP.NET. The simple answer is to use a drop folder on your local machine when developing. Just create a folder called "maildrop" on your c:/ drive and use the following in your Web.config file:

    <smtp deliveryMethod='SpecifiedPickupDirectory'>
        <specifiedPickupDirectory pickupDirectoryLocation="c:\maildrop" />


ASP.NET Contact Forms


When you are ready to deploy your application, simply comment out the above entry in the config file and use the usual syntax below. Keep the drop directory section commented out in your config file as you might need it later for testing or further development:

    <smtp from="">
        <network host=""/>


For the CSS purists out there, this is created using tables because we are more interested in the functionality here. If you want a CSS contact form layout, just holler in the comments :-)

Depending on the importance of the project you are working on, you may want to log the errors to a database. This is simple to do so I'm not going to delve into it here. Note, that there is nothing to prevent you from grabbing some fine-grain error details and storing them in your errors table also. Anything that helps you identify problems at a later date is a good candidate for a table field.

That just leaves network errors. I haven't had a chance to play with this yet, but it would be nice to know in advance if the mail server was down and I'm wondering if we could somehow tap into the SMTP return status codes before sending the mail? If anyone has any suggestions along these lines, please share them here? (22.61 kb)