473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 ShellWithRedirect(ByVal app As String, ByVal args As
String, ByVal workingDirectory As String)
Dim ShellProcess As New System.Diagnostics.Process
Try
ShellProcess.StartInfo.FileName = app
ShellProcess.StartInfo.Arguments = args
ShellProcess.StartInfo.UseShellExecute = False
ShellProcess.StartInfo.CreateNoWindow = True
ShellProcess.StartInfo.RedirectStandardError = True
ShellProcess.StartInfo.RedirectStandardOutput = True
ShellProcess.StartInfo.WorkingDirectory = workingDirectory
ShellProcess.Start() -'If I comment this line, Session
variables are maintained. If not commented, then I loose them all.-
ShellProcess.WaitForExit(5000)
Catch ex As Exception
Console.Write
ShellProcess.StandardOutput.ReadToEnd.ToString)
Console.Write
ShellProcess.StandardError.ReadToEnd.ToString)
Finally
ShellProcess.Dispose()
End Try
End Sub

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

May 30 '06 #1
0 1208

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

Similar topics

3
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...
5
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...
4
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...
4
by: Igor | last post by:
Is it possible to point current context's session to another active session based on a SessionID?
1
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...
2
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"...
2
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...
10
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...
7
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.