PC Review


Reply
Thread Tools Rate Thread

Cannot Pass Session Variables from C# to VB-ASP?

 
 
Jay Chan
Guest
Posts: n/a
 
      13th Oct 2008
Why session variables in a C#-app cannot be available to a web-based-
VB-app when I run the applications in a debugger?

We have a VB-application that was originally written as a ASP intranet
application. Later on, someone re-wrote it to run it as a desktop
application in order to speed up its performance -- but it is still
running as a ASP. And then it was integrated with a larger application
that is in C#. The C# application calls up the VB-application through
a WebBrowser.Navigate() function call. They both work fine in
production environment. Unfortunately, when I run them in Visual
Studio debugger, I find that session variables that C# application has
prepared are not available in the VB application.

Please note that I was not the one who developed these applications.
They have long gone. And I am not familiar with the ASP-thing.

Please help.

Thanks in advance for any help.

Jay Chan
 
Reply With Quote
 
 
 
 
Jay Chan
Guest
Posts: n/a
 
      14th Oct 2008
On Oct 13, 4:01*pm, Jay Chan <jaykc...@hotmail.com> wrote:
> Why session variables in a C#-app cannot be available to a web-based-
> VB-app when I run the applications in a debugger?
>
> We have a VB-application that was originally written as a ASP intranet
> application. Later on, someone re-wrote it to run it as a desktop
> application in order to speed up its performance -- but it is still
> running as a ASP. And then it was integrated with a larger application
> that is in C#. The C# application calls up the VB-application through
> a WebBrowser.Navigate() function call. *They both work fine in
> production environment. *Unfortunately, when I run them in Visual
> Studio debugger, I find that session variables that C# application has
> prepared are not available in the VB application.
>
> Please note that I was not the one who developed these applications.
> They have long gone. *And I am not familiar with the ASP-thing.
>
> Please help.
>
> Thanks in advance for any help.
>
> Jay Chan


I have got around with this problem by following suggestions that I
have found in this newsgroup. The suggestions are:
1. Disable anonymous access.
2. Set authentication mode to Windows Authentication (in Web.Config).
3. Set identity-impersonate to true (in Web.Config).

This "workaround" allows me to get access to the User.Identity.Name.
Using the user login name, I can re-create the session variables that
I cannot pass from a C# module to a VB-ASP module.

Still, this is just a workaround. I still haven't fixed the original
problems:
o I still don't know why I cannot pass the session variables from the
C# module to the VB-ASP module.
o I still don't know why this problem only occurs when I run it in
debugging mode in Visual Studio. The production version of the
same program doesn't have this problem even though it has
enabled anonymous access, and has set the identity-impersonate
to false.

Any idea? Thanks.

Jay Chan
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session variables and static variables loss own contained value. neeraj Microsoft VB .NET 0 6th Sep 2006 01:33 PM
Accessing Session variables when using SQL Server for Session state Michael Microsoft ASP .NET 3 30th Dec 2005 07:56 PM
RE: Session Variables assigned to the wrong session? Robert Faulkner Microsoft ASP .NET 0 28th Jan 2005 04:16 PM
Re: Pass Session variables John Timney \(Microsoft MVP\) Microsoft Dot NET 0 25th Jun 2004 11:09 PM
Re: Pass Session variables Klaus H. Probst Microsoft Dot NET 0 25th Jun 2004 05:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:40 AM.