Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Migrating from vs2003 to vs2005 -- lost session variable
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01103908
Message ID:
01104021
Vues:
18
>I am struggling while migrating a Web Application Project from vs2003 to a *Web Site Project* in vs2005. I have got to say that is just unfair that this was not made easier by Microsoft. Anyway, I am having a problem with, what I think is, lost session variables. Can someone suggest a way to trace this one:
>
>I am on a web form that has a button that redirects me to another page. From the new page I hit a button that redirects back to sending page and then I am booted to the Mere Mortals security login page as if I was starting my session all over again.

When you have RequiresSecurity = true, the following code located in mmBaseWebPage.OnLoad() is executed to determine whether to redirect to the login:
if (this.RequiresSecurity && this.SecurityUserPk == null) 
{
	this.RedirectToLogin();
	return;
}
So, my guess is that you're losing the SecurityUserPk value.

>And… can someone advise me as to how to turn off security on a web form in vs2005. Everything is just a little bit different. Different enough for me not to find it.

It IS different in ASP.NET 2.0. Check out the MM .NET Dev Guide topic "Securing Forms" for the code you need to use now to turn security off/on.

>Is anyone having problems with the page directive ASPCOMPAT=”true”. I had to remove it because I was being thrown unspecified ASP COMPATABILTY ERRORS.

>Is it to soon to migrate? Should we wait another month or two?

We've had a number of developers migrate pretty complex applications -- there is usually SOME tweaking to do, but not too much.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform