As you know, given the nature of HTTP, “blocking” takes place in attempting to interact with a website. You click and wait, and cannot do more than just wait for the existing “transaction” to complete.
Ala “Web Gardens” in IIS, which is a means of providing more than one worker thread to allow for multiple concurrent HTTP Transactions.Now for this to work, what is needed is a “STATE” server, where the website is user by more than one customer or end-user. So let’s begin:
Assumptions: (a) Windows 2008 (b) IIS 7
- Download SQL Server 2008 from Microsoft (Make sure you get it with the “Tools”) You get both in an EXE
- Download Service Pack 1 as well.
- During Install at Instance Configuration set you Named Instance Name – ASPState (and instance ID the same)
- Set Account Name in Server Configuration (of installation) to SYSTEM and change Startup Type to Automatic on both
- Setup Mixed Mode in Database Engine Configuration – add in Password and Current User
- Start up Microsoft SQL Server Management Studio and see if you can login (should ensure your DB installed correctly)
- Run SQL Server Configuration Manager – go to SQL Server Network Configuration – Enable TCP/IP
- Go to it’s Properties – Ip Addresses – Enable on Interface you desire – Set TCP Port on IP all to 1433
- Ensure SQL Server is running and SQL Server Browser under SQL Server Services
- Restart SQL Server – run netstat -an to ensure the port 1433 is running
- Create the STATE Database – Next run from the Microsoft.NET v4 folder (your latest) – aspnet_regsql.exe -S <servername> -E -ssadd -sstype p
- Check Server Management Studio to make sure the Database has been created
- Create a DB User with Permissions – Under (Overall not for your database specifically) Security -> New User -> “ASP” (custom name)
- Choose SQL Server Authentication – Choose Default Database “ASPState” (whatever you named yours)
- Next go into IIS to setup your Configuration
- In IIS for your website, change Connection String to Connect to your Database you setup (not sure how necessary this part is, but I did it anyways)
- Choose SQL Server and Specify Credentials -> Server = <your hostname> | Database: ASPSTATE
- Specify User Name: ASP etc.
- Next In the Main Configuration for your Site – Choose Session State (Required)
- Click SQL Server – and type in the details mentioned afore – Don’t forget to Apply
- Restart Site and Try Hit – should have a working website with State. You can log onto SQL Studio to confirm
- If you are still experiencing problems which you will see through accessing the WebSite it is most likely “DB Permissions”.
- I right-clicked on Properties of the Database I created (AsPState) and set the Permissions for the User I created
I’m sure there are easier ways to do this and more secure. But this was my first SQLExpress install and State Server – so it’s good for now.