2007-10-26

Using a custom database for ASP.NET Membership

I needed to use a custom database for my membership and roles in an ASP.NET service it took me a little while to sort out in the web.config so I thought that I would post my web.config here just in case anyone wants to copy it. just replace the words in square brackets with the correct values.
<?xml version="1.0"?>
<configuration >

 <appSettings/ >
 <connectionStrings >
  <add  name="ApplicationConnectionString"
   connectionString="[ConnectionString]"
           providerName="System.Data.SqlClient" / >
  <add name="MembershipConnectionString"
  connectionString="[ConnectionString]"
  providerName="System.Data.SqlClient" / >
 </connectionStrings >

 <system.web >

  <compilation debug="true" / >

  <authentication mode="Forms" / >

  <membership defaultProvider="SqlMembershipProvider"  >
   <providers >
    <clear / >
    <add name="SqlMembershipProvider"
     connectionStringName="MembershipConnectionString"
    applicationName="AssetManagement"
    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" / >
   </providers >
  </membership >
  <roleManager enabled="true" >
   <providers >
    <clear / >
    <add connectionStringName="MembershipConnectionString"
    applicationName="AssetManagement"
    name="AspNetSqlRoleProvider"
    type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" / >
   </providers >
  </roleManager >
 </system.web >
</configuration >
Oh and to add the tables you need to your database use the following command from the command line replacing the words in square brackets with the correct values;
C:\WINDOWS\Microsoft.NET\Framework\[Framework]\aspnet_regsql.exe –E -S [Server] -d [DatabaseName] -A mr
Here is some more info on aspnet_regsql.exe.

CTRL + ALT + DEL on Remote Desktop

I was having trouble today drying to can a servers password when I remembered the reason it was not working was because I was using the wrong command(this may have taken half an hour). So kids remember when you want to use "CTRL + ALT + DEL" on a Remote desktop it is actually "CTRL + ALT + END".

2007-10-25

Watch out for Zombies

Keep an eye out for zombies this summer.