Using Single Database for state w/ multiple web apps

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff

    Using Single Database for state w/ multiple web apps

    We have multiple ASP.Net web apps in development. As a standard we
    are looking to go with SQL Server to hold state information.

    Can we have the multiple apps all point to a single State DB? Or do we
    need to install multiple instances of the State database on to the SQL
    Server (one for each Web app)?

    It would seem that you could run into troubles pointing several web
    apps at the same DB, because you would introduce the possibility (a
    remote possibility granted) of duplicating the state's key..

    Thanks
    jeffpriz
  • Lucas Tam

    #2
    Re: Using Single Database for state w/ multiple web apps

    jeffpriz@yahoo. com (Jeff) wrote in news:cd5d6d81.0 410141235.1b013 4e5
    @posting.google .com:
    [color=blue]
    > It would seem that you could run into troubles pointing several web
    > apps at the same DB, because you would introduce the possibility (a
    > remote possibility granted) of duplicating the state's key..[/color]

    How are you generating the key?

    There are several ways to generate unique keys.

    --
    Lucas Tam (REMOVEnntp@rog ers.com)
    Please delete "REMOVE" from the e-mail address when replying.

    Comment

    • Ken Dopierala Jr.

      #3
      Re: Using Single Database for state w/ multiple web apps

      Hi Jeff,

      I do this. I always have users log in though and then they can move from
      app to app, server to server. The best thing to do is have all apps use a
      web service to provide state support. If people do not need to be logged in
      then you can still use this but I would still utilize the shared web
      service, that way keys should never be duplicated. And if you are using an
      Idntity field in your SQL table then you should never have a duplicated key.
      Good luck! Ken.

      --
      Ken Dopierala Jr.
      For great ASP.Net web hosting try:
      Small business web hosting offering additional business services such as: domain name registrations, email accounts, web services, online community resources and various small business solutions.

      If you sign up under me and need help, email me.

      "Jeff" <jeffpriz@yahoo .com> wrote in message
      news:cd5d6d81.0 410141235.1b013 4e5@posting.goo gle.com...[color=blue]
      > We have multiple ASP.Net web apps in development. As a standard we
      > are looking to go with SQL Server to hold state information.
      >
      > Can we have the multiple apps all point to a single State DB? Or do we
      > need to install multiple instances of the State database on to the SQL
      > Server (one for each Web app)?
      >
      > It would seem that you could run into troubles pointing several web
      > apps at the same DB, because you would introduce the possibility (a
      > remote possibility granted) of duplicating the state's key..
      >
      > Thanks
      > jeffpriz[/color]


      Comment

      • Jeff

        #4
        Re: Using Single Database for state w/ multiple web apps

        Thanks for the reply...

        So should i take away from your response, that I would not be able to
        simply point both App's session state at the one database?

        Can I point 2 app's session state there without troubles? or do i have
        to go through a service to handle state.

        Also, i'm confused by your suggestion of using an Identity field..
        I'm not sure off-hand how the InstallPersistS QLState.sql sets up the
        tables, but I doubt I'd get too far by trying to re-work that
        Database.

        I just want to keep session state for 2 apps on a single Session db.

        jeffpriz


        "Ken Dopierala Jr." <kdopierala2@wi .rr.com> wrote in message news:<#Uo04ZjsE HA.220@TK2MSFTN GP15.phx.gbl>.. .[color=blue]
        > Hi Jeff,
        >
        > I do this. I always have users log in though and then they can move from
        > app to app, server to server. The best thing to do is have all apps use a
        > web service to provide state support. If people do not need to be logged in
        > then you can still use this but I would still utilize the shared web
        > service, that way keys should never be duplicated. And if you are using an
        > Idntity field in your SQL table then you should never have a duplicated key.
        > Good luck! Ken.
        >
        > --
        > Ken Dopierala Jr.
        > For great ASP.Net web hosting try:
        > http://www.webhost4life.com/default.asp?refid=Spinlight
        > If you sign up under me and need help, email me.
        >
        > "Jeff" <jeffpriz@yahoo .com> wrote in message
        > news:cd5d6d81.0 410141235.1b013 4e5@posting.goo gle.com...[color=green]
        > > We have multiple ASP.Net web apps in development. As a standard we
        > > are looking to go with SQL Server to hold state information.
        > >
        > > Can we have the multiple apps all point to a single State DB? Or do we
        > > need to install multiple instances of the State database on to the SQL
        > > Server (one for each Web app)?
        > >
        > > It would seem that you could run into troubles pointing several web
        > > apps at the same DB, because you would introduce the possibility (a
        > > remote possibility granted) of duplicating the state's key..
        > >
        > > Thanks
        > > jeffpriz[/color][/color]

        Comment

        • Ken Dopierala Jr.

          #5
          Re: Using Single Database for state w/ multiple web apps

          Hi Jeff,

          Sorry, I don't know the answers. I thought you were trying to do some
          custom state thing where you have multiple apps that work together and
          people move in and out of. I would give it a try and see what happens.
          Here is the field that the .SQL creates to identify the session:

          SessionId CHAR(32) NOT NULL PRIMARY KEY,

          My guess is that it is holding a GUID. GUIDs are rarely duplicated and it
          sounds like this is using a Windows Service. So if both apps are using that
          same service (i.e. they are on the same web server) I would imagine that the
          service would make sure that it didn't duplicate GUIDs and pointing to the
          same DB would be fine. If they were on seperate servers, then the instances
          of the Windows Service handling this wouldn't know about each other and
          therefore couldn't coordinate the usage of unique GUIDs. Then again, if the
          Windows Service first queries the DB to make sure the GUID it generates
          isn't in use then running the apps on muliple servers pointing to the same
          DB should work fine also.

          Anyway, as you can see I have no idea what I'm dealing with here so I can't
          give you an answer. Hopefully this is enough information to let you maybe
          make another post asking specific questions to resolve this. Good luck!
          Ken.

          --
          Ken Dopierala Jr.
          For great ASP.Net web hosting try:
          Small business web hosting offering additional business services such as: domain name registrations, email accounts, web services, online community resources and various small business solutions.

          If you sign up under me and need help, email me.

          "Jeff" <jeffpriz@yahoo .com> wrote in message
          news:cd5d6d81.0 410151039.2fb4f 587@posting.goo gle.com...[color=blue]
          > Thanks for the reply...
          >
          > So should i take away from your response, that I would not be able to
          > simply point both App's session state at the one database?
          >
          > Can I point 2 app's session state there without troubles? or do i have
          > to go through a service to handle state.
          >
          > Also, i'm confused by your suggestion of using an Identity field..
          > I'm not sure off-hand how the InstallPersistS QLState.sql sets up the
          > tables, but I doubt I'd get too far by trying to re-work that
          > Database.
          >
          > I just want to keep session state for 2 apps on a single Session db.
          >
          > jeffpriz
          >
          >
          > "Ken Dopierala Jr." <kdopierala2@wi .rr.com> wrote in message[/color]
          news:<#Uo04ZjsE HA.220@TK2MSFTN GP15.phx.gbl>.. .[color=blue][color=green]
          > > Hi Jeff,
          > >
          > > I do this. I always have users log in though and then they can move[/color][/color]
          from[color=blue][color=green]
          > > app to app, server to server. The best thing to do is have all apps use[/color][/color]
          a[color=blue][color=green]
          > > web service to provide state support. If people do not need to be[/color][/color]
          logged in[color=blue][color=green]
          > > then you can still use this but I would still utilize the shared web
          > > service, that way keys should never be duplicated. And if you are using[/color][/color]
          an[color=blue][color=green]
          > > Idntity field in your SQL table then you should never have a duplicated[/color][/color]
          key.[color=blue][color=green]
          > > Good luck! Ken.
          > >
          > > --
          > > Ken Dopierala Jr.
          > > For great ASP.Net web hosting try:
          > > http://www.webhost4life.com/default.asp?refid=Spinlight
          > > If you sign up under me and need help, email me.
          > >
          > > "Jeff" <jeffpriz@yahoo .com> wrote in message
          > > news:cd5d6d81.0 410141235.1b013 4e5@posting.goo gle.com...[color=darkred]
          > > > We have multiple ASP.Net web apps in development. As a standard we
          > > > are looking to go with SQL Server to hold state information.
          > > >
          > > > Can we have the multiple apps all point to a single State DB? Or do we
          > > > need to install multiple instances of the State database on to the SQL
          > > > Server (one for each Web app)?
          > > >
          > > > It would seem that you could run into troubles pointing several web
          > > > apps at the same DB, because you would introduce the possibility (a
          > > > remote possibility granted) of duplicating the state's key..
          > > >
          > > > Thanks
          > > > jeffpriz[/color][/color][/color]


          Comment

          Working...