Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:24:46+00:00 2026-05-26T07:24:46+00:00

I Have Database provided by shared hosting. I want to store the session in

  • 0

I Have Database provided by shared hosting. I want to store the session in sql server but it give me error:

Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above

[HttpException (0x80004005): Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.]
System.Web.SessionState.SqlPartitionInfo.GetServerSupportOptions(SqlConnection sqlConnection) +2147087
System.Web.SessionState.SqlPartitionInfo.InitSqlInfo(SqlConnection sqlConnection) +107
System.Web.SessionState.SqlStateConnection..ctor(SqlPartitionInfo sqlPartitionInfo, TimeSpan retryInterval) +531
System.Web.SessionState.SqlSessionStateStore.GetConnection(String id, Boolean& usePooling) +237
System.Web.SessionState.SqlSessionStateStore.CreateUninitializedItem(HttpContext context, String id, Int32 timeout) +136
System.Web.SessionState.SessionStateModule.CreateUninitializedSessionState() +50
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +659
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

My WebConfig include Following Statement.

    <sessionState mode="SQLServer"
      cookieless="true"
      regenerateExpiredSessionId="true"
      timeout="30"
      allowCustomSqlDatabase="true"
      sqlConnectionString="Data Source=hostingServer;Initial         catalog=MyDatabase;User Id=MyUser;password=MyPassword;"
      stateNetworkTimeout="60"/>

I have run aspnet_regsql.exe. It asked me about the server and login detail after that it created aspNret_TableNames.

Please guide me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:24:46+00:00Added an answer on May 26, 2026 at 7:24 am

    I believe you must have used the aspnet_regsql.exe application which then starts a wizard and then adds various aspnet_* tables to your tables.

    If so then again restart the same wizard and then choose the remove option to remove all those tables from the database.

    Now run this command:

    aspnet_regsql.exe -ssadd -d <Your Database> -sstype c -S <Server> -U <Username> -P <Password>
    

    This will then add two tables to your database, namely ASPStateTempApplications & ASPStateTempSessions.

    Modify your web.config file to include the following configuration:

    <sessionState
        mode="SQLServer"
        allowCustomSqlDatabase="true"
        sqlConnectionString="Data Source=Server;Initial Catalog=Database;User ID=UserId;Password=Password"
        cookieless="false" timeout="20" />
    

    NOTE:
    1. I have assumed that you want to store session within your applications database. If you want to maintain the session database separately then run the above command without the “-d” parameter. This will create a new ASPState database with two table that I have specified above. And finally you can specify the name of this database in your configuration.

    Hope this helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a shared MS Sql 2008 database with my hosting provider and MS
I have designed database tables (normalised, on an MS SQL server) and created a
I have database application, I want to allow the user to restore the deleted
Is it possible to configure the Windows Workflow SqlWorkflowPersistanceService to use different SQL Server
I have a website running on a Windows 2008 R2 server, using a SQL
I have a cheap shared hosting plan with Reliablesite.net ($5/month). I've been making a
I have my own custom Content Provider that loads a database which contains the
I have database with many tables. In the first table, I have a field
I have Database with date field. I see the time like: 1900-01-01 13:38:00.000 How
i have database table like this +-------+--------------+----------+ | id | ip | date |

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.