Blog

  • Accessing the ASP.NET Authentication, Profile and Role Services

    Creating service to control Authentication, Profiles and Roles makes a lot of sense. It allows the abstraction of these commonly reused elements into a Service Oriented Architecture. It would also allow easy repositioning of these features into a centralised source (for common applications) or to be embedded into a standalone application, with zero code rewritting.

    There is an excellent article discussing this here:

    Brad Abrams : Accessing the ASP.NET Authentication, Profile and Role Service in Silverlight

  • Code Standards Enforcement

    To help with the enforcement of code standards within C# the following tool may be of use:

    Blog by Joel Fjordén a.k.a. Will o Wisp – Code Style Enforcer

  • Using ADO.NET Data Services

    Good work from Beth Massi on ADO.NET Data Services – this is simplicity incarnate! I reckon that you could have prototype code up and running within half-an-hour…

    Beth Massi – Sharing the goodness that is VB : Using ADO.NET Data Services

  • SilverLight Hosting

    MS are offering free SL hosting at http://silverlight.live.com. All you need is a windows live ID. You can then access you uploaded applications using one of the following methods:

    See my first upload at http://silverlight.services.live.com/invoke/88256/Test/iframe.html

    NOTE: the …/88256/Test/… reference, refers to your ID and application name.

    Method 1: Embed the application as a frame.

    1) Add the following HTML to your page:

    Method 2: Use a Live Control.
    This method provides an enhanced Silverlight installation experience.

    1) Modify the tag at the top of the page to include the xmlns:devlive attribute:

    2) Add the following script references to the page header section:

    3) Insert the following HTML where you want the application to appear in the body of the page:

  • Capturing SOAP Requests in Fiddler

    I was having problems capturing SOAP requests to a local WCF service using Fiddler. To see these I tried a numebr of things, these final settings made the difference:

    Remove any filters

    Add SOAP custom filters using fiddler script, at the start of the class:

    and also into OnBeginResponse method:

    Enable SOAP filters

  • SOAP Explanation

    A clear and concise description of the SOAP messaging standard and each of the component parts: http://www.soapuser.com/basics3.html

    A full specification of the SOAP messaging standard can be found here: http://www.w3.org/TR/soap/

  • XMethods

    A cool web site listing free-to-access web serivces available on the Internet: xMethods.com

  • App_Offline.htm

    Cracking informational post from Scott Guthrie – and I can’t believe I’d never heard of this before!!

    Original post from Scott: http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx:

    Basically, if you place a file with this name in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).

    This provides a convenient way to take down your application while you are making big changes or copying in lots of new page functionality (and you want to avoid the annoying problem of people hitting and activating your site in the middle of a content update). It can also be a useful way to immediately unlock and unload a SQL Express or Access database whose .mdf or .mdb data files are residing in the /app_data directory.

    Once you remove the app_offline.htm file, the next request into the application will cause ASP.NET to load the application and app-domain again, and life will continue along as normal.

    And also worthy of note is that the returned content must be greater than 512kb, to get over an annoying anomoly within IE6. Simply flesh out the content of the file to greater than 512kb (use comments for example).

  • VSS Versioning, Merging and Branching

    When creating a new version of software in VSS there is a nifty feature called Branching that exposes some cool merging capabilities for retro-fixing issues.

    Firstly, share the files:
    Drag and drop the files from VSS UI into the new project folder:

    The files will appear with a little shortcut icon to show they are shared:

    Then Branch them
    Branching will only work on individual files, not folders and recursive items. To see all files and folders in a project in on go use the Wildcard search,, and choose all Subfolders optio

    After selecting the files, click the Branch buttonFinally, merge changes
    Change a file in the original source, and the differences can be easily merged into any of the branches that sprout from the original code. Select the altered file in VSS, right click and choose Merge Branches:

    The pop up window shows you all shared versions of the original file that will allow the changes to be merged into:

    Click Merge and a window will show the old version, the new version and assist with copying the changes across.

  • ASP.NET Write Permissions

    When writing a file from ASP.NET application, the target directory needs to have write permissions set for both the logged in account (maybe IUSER_[name]) and also the IIS_WPG account.

    For example, writing a file to http://localhost/app/results, where the application root (http://localhost/app/) maps to C:\Inetpub\wwwroot\app\

    The permissions on the root folder (C:\Inetpub\wwwroot\app\) can be readonly, but the permission on C:\Inetpub\wwwroot\app\results\ need to allow writing for IUSR and IIS_WPG accounts.