This is still work in progress, but I want to incorporate the user role management tables within my own database, as the concept of users and their distinct roles ties right in with the core business model of the new site.
The following link explains the standalone tool to create the tables:
ASP.NET SQL Server Registration Tool
Invoking the exe runs a wizard requesting the database service – it needs to match the connection string as mentioned in the gotcha above. Since no parameters are specified, it then creates a database “aspnetdb” with all the role tables. This is not quite what I want, as I need these added to my application database.
The answer is to use the command line:
aspnet_regsql -S -E -A all -d
If you run SQL Management Server Studio Express before and after – not forgetting to hit ‘refresh’ – then a bunch of new tables are added: aspnet_Applications, aspnet_Roles, aspnet_SchemaVersions, aspnet_Users, aspnet_UsersInRoles etc. Now it is just a matter of hooking those up with the application tables.
Since I wanted membership and roles as well as basic authentication I used the “-A all” option to add everything in. Of course I get profile and web-part support too with this, but I may choose to exploit such features in the future.
Before I run a resource intensive game, I execute a little batch file that kills a bunch of background processes that are simply not needed when playing the game. I’ll explain the details below.
I have also noticed that before I used to do this, I experienced awful crashing problems with my PC just locking when playing. Since killing these extraneous processes, however, I have not had a single in-game crash that I used to get regularly with both BF2 and BFV. I think this shows that something in my system is having a bad interaction with the game – probably the graphics driver. I used to think it was an interaction with Panda antivirus, but recently I modified the script to not kill Panda and things still run OK. This makes me a little happier that I can keep my AV program running at all times.
This one gets me every time. When you set up a new data connection to a database running on a local copy of Sql Server Express, in the “Add Connection” dialog you need to prefix your machine name to the defaulted value of “SQLEXPRESS”. E.g. if the network name of your PC is called “devpc”, then the connection string is:
While this is the obvious choice and works for many circumstances, a subtle variation is to use the following instead:
This now points the connection to an instance of SQL Server Express running on your local machine. If working in a team where each developer needs their own local copy of a database, then setting this in the web.config file can be a real help.