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 6177133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:13:09+00:00 2026-05-24T00:13:09+00:00

My ASP.NET site is on Windows Shared Hosting. I need to keep SessionState in

  • 0

My ASP.NET site is on Windows Shared Hosting. I need to keep SessionState in SQL Server on my site, and standard way is to use ASPState DB. But that DB is inaccessible on windows shared hosting, and support said that unfortunately they can’t provide me with access to that DB.

Is it possible to use SessionState in the DB that site uses, or can I create and use any different DB on hosting server to store SessionSate? How can I run the script to create all necessary server objects etc?

Thanks!

  • 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-24T00:13:09+00:00Added an answer on May 24, 2026 at 12:13 am

    You can specify a custom database using a “partition resolver” helper class. The configuration in web.config looks like:

    <sessionState mode="SQLServer" 
         partitionResolverType="YourNameSpace.PartitionResolver"
         cookieless="false" timeout="480" />
    

    The class itself looks like:

    public class PartitionResolver : IPartitionResolver
    {
        public void Initialize()
        {
        }
    
        // The key is a SID (session identifier)
        public String ResolvePartition(
            Object key)
        {
            return "Data Source=myServerAddress;Initial Catalog=myDataBase;" +
                   "User Id=myUsername;Password=myPassword;";
        }
    }
    

    To create the required SQL Server objects, use the aspnet_regsql utility. It has an sstype option you can set to c to install a custom database.

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

Sidebar

Related Questions

I have an asp.net site, and I need to use both Windows Auth and
I've got a blogging site hosted on Windows Sever, ASP.Net 3.5, ASP.Net AJAX, SQL
I have a ASP.Net site, in which I'm trying to use Windows Authentication and
I have a site developed in ASP.NET and hosted on a windows server using
I have an ASP.NET site that was working fine running on Windows Server 2003
I have an ASP.NET web site set up to use windows authentication (not sure
I'm trying to upload my asp.net site to my HostGator windows server. I'm having
I'm running an ASP.NET web site on IIS 6.0 (Windows 2003), and the site
My current ASP.NET site requires to launch FFMPEG.EXE to convert uploaded videos. With shared
I'm NTLM (authenication=windows in the web.config) with an asp.net mvc 2.0 site. Right now

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.