Candide
Candide

Reputation: 27

ASP.NET Changing Session-State Modes

I'm attempting to share Session information between PHP and .NET on the same server. The sessions will always be created by the .NET site. From my research I've come to believe that the Session-State Mode "SQLServer" will be perfect for this, as the PHP can check session information directly in the database.

My problem is that the .NET application was developed years ago and uses the InProc Session-State. I have no experience working with ASP.NET. I have no way, that I know of, to test switching from InProc to SQLServer and the site must not go down!

1) Could using web.config to change the Session-State from InProc to SQLServer cause any problems for an old application?

2) Is there a way to test this, such as copying all the files to a test sub-domain?

3) If I bring the site down, is there any reason why I couldn't revert the old web.config and get everything back up.

4) Could using SQLServer instead of InProc cause any issues at all on the .NET side?

5) I also noticed in the IIS for the site there is a UI for changing the Session-States, is it better to use that or web.config (or both)?

Thank you for your time.

Upvotes: 2

Views: 842

Answers (1)

john
john

Reputation: 581

Answers to your above question

  1. Yes there might be problems when changing to SQLServer due to .NET session doesn't just contain who is logged in etc, it also can keep user session information e.g. items selected and other objects. (I don't know enough about your particular site, but when you move from InProc to SQL, you need to check any session object that will be stored in SQL is also serializable, otherwise it will fail) So a lot of testing.

  2. you can test, by copy the website currently in the IIS to may be another machine with IIS and ASP.NET and make the appropriate change in the web.config, if you have production and test database, point it to test, I would NOT recommend to use any production database.

  3. yes, make sure you back everything up including the database if you have any

  4. yes see item (1)

  5. you only need one, I would just modify the web.config only, back it up first.

Since you want to achieve single sign on, there are other options to explore,

Upvotes: 1

Related Questions