473,756 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Basic .NET with Web Forms: session variables lost when shelling a process


(Webmaster: sorry, I posted this first at the General Software
Engineering category, but I think this goes here)

I'm using Visual Basic with Web Forms on .NET 2003 and I'm experiencing
a very weird problem:

When the user presses a button, the web application starts a shell
process to decompress a *.gz file with gzip.exe. All ok for now, I get
some data and send formatted data to the client browser.

When the client then does any ather action which is sent to the server
(postback), all session variables have disappeared!!

If you know a way to avoid loosing the session variables, or another
way to decompress a *.gz file without shelling a command line
application, please answer!!

I attach the shell code here:

Private Sub ShellWithRedire ct(ByVal app As String, ByVal args As
String, ByVal workingDirector y As String)
Dim ShellProcess As New System.Diagnost ics.Process
Try
ShellProcess.St artInfo.FileNam e = app
ShellProcess.St artInfo.Argumen ts = args
ShellProcess.St artInfo.UseShel lExecute = False
ShellProcess.St artInfo.CreateN oWindow = True
ShellProcess.St artInfo.Redirec tStandardError = True
ShellProcess.St artInfo.Redirec tStandardOutput = True
ShellProcess.St artInfo.Working Directory = workingDirector y
ShellProcess.St art() -'If I comment this line, Session
variables are maintained. If not commented, then I loose them all.-
ShellProcess.Wa itForExit(5000)
Catch ex As Exception
Console.Write
ShellProcess.St andardOutput.Re adToEnd.ToStrin g)
Console.Write
ShellProcess.St andardError.Rea dToEnd.ToString )
Finally
ShellProcess.Di spose()
End Try
End Sub

--
MirkoGeest
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

May 30 '06 #1
0 1229

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2856
by: Microsoft | last post by:
I am using Session variables in my ASP application. I have tested the application on a Win2k professional and it works fine. When the same web app is installed on a win2k advanced server from the client browser when the app is accessed the session variable returns null inspite of a value being already set. I have checked the IIS enable session state settings. When i use the server machine as client and access the app as localhost then...
5
3653
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of these menus are then placed into the page by calling Server.Execute(rs_Modules("ModulePath")). This works fine for up to 15 "menus" After that, the session variables that were set (not including those called by Global.ASA) are no longer set. ...
4
2084
by: Al Jones | last post by:
I have an application - an insurance form - which requests personal data on form one. If the user checks auto or homeowner (or both) on the first form I need to collect data from each of these (popup?) forms (Auto and HomeOwner respectively) and then write this collected data to an email message. Passing selected data to the child forms via the url is possible, but I'm certain I'd run into a length problem. Since I still have the parent...
4
2024
by: Igor | last post by:
Is it possible to point current context's session to another active session based on a SessionID?
1
1798
by: yoshibebe | last post by:
Hi, I have developed a project on my local machine. The session state variables are working fine on my local machine. When I port it into a another server called v-projects, and I try to run the project from that other server, the session state variables are being set randomly. For example, in the following code: SetSelectionSessionState();...
2
6559
by: Lars Netzel | last post by:
There's a setting in the IIS where I have set Enabled Session Timeout to 20 minutes Then there's a setting in the WebConfig file.. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/> Where I have set the timeout property to 20..
2
1945
by: Jim | last post by:
Hi, I am using forms based authentication for my website. Whilst testing I have noticed that occasionaly it appears that the Context.User.Identity.Name is valid however the session variables that I have created as the website is used have been lost. I think it is something to do with the session timeout. I thought when the session times out (session varaibles lost) the user context is cleared as well - or is this an incorrect...
10
3514
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
7
2967
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the statServer timeout to 20 min in the the web.config file. Any ideas why the variables are lost?
0
9455
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10031
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9869
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.