Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP DLL instantiation wiping out .NET Session() variabl
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00707096
Message ID:
00708760
Vues:
14
>>I would not answer your questions, just will propose you some workarounds.
>>1. Instead of using Session and Response.Redirect, why not use the Viewstate and Server.Transfer? Yes I know that viewstate is not encoded hardly and travels back and forth to the >client browser, but you can encode the userid, before adding it to the viewstate. Note that when you use Server.Transfer you may have access to properties of previous webform from >the current one, this way preserving the USERID. (You should add a property that will get and set the USERID from/to the viewstate for each of your webforms.)
>
>I thought ViewState was tied to the web page and would not cross pages? Is this not the case?
>

It is tied to webforms, but you can retrieve values you store in the viewstate from one form to another. See Passing Values between ASP.NET Web Forms (http://www.dotnetbips.com/displayarticle.aspx?id=79)

>>2. What about (re)adding USERID to session object, just after the assign of VFPCOM_RCW instance to null e.g.
>
>Do you mean save it prior to hitting the VFP dll and then resetting it after I have closed it? If I do that then the Session isn't really doing anything for me? What about all of the other session variables?
Yes I mean so... I have no time at the moment to test it, but if the session is really lost, you will need to save and recover all the variables you need to be stored in the Session

>
>This has been a bit frustrating - thanks for everyone's help.
>
>Doug

Kind Regards
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform