Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2008, 05:12 AM
Authorized User
 
Join Date: Apr 2008
Posts: 85
Thanks: 10
Thanked 0 Times in 0 Posts
Default Problem with process..

Hi All,

I am using process class to do some processing with the files and close the process.

it works fine but the problem is it is emptying all the session value which i am assiging before running the process.

Below is the Code:

Dim myProcess As Process = New Process()
Dim sArguments As String = sProductID & " " & Chr(34) & sLicenseFile & Chr(34) & " " & Chr(34) & sApplicationPath & "metaconfig.txt" & Chr(34)
Dim sFileName As String = Chr(34) & sApplicationPath & "license.exe" & Chr(34)


myProcess.StartInfo.FileName = sFileName
myProcess.StartInfo.Arguments = sArguments
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
myProcess.StartInfo.CreateNoWindow = True
myProcess.Start()
myProcess.WaitForExit(1000)

If Not myProcess.HasExited Then
myProcess.Kill()
End If

myProcess.Close()
myProcess = Nothing

System.Threading.Thread.Sleep(1000)

how to solve this problem. can u tell me any solution.

Thanks
-Nelly
 
Old October 14th, 2008, 05:19 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

What session values are you talking about?

/- Sam Judson : Wrox Technical Editor -/
 
Old October 14th, 2008, 05:34 AM
Authorized User
 
Join Date: Apr 2008
Posts: 85
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Thanks for your reply.

in the page load i am calling above function and assiging
value to session variable.
like Session("Valid") = "True"

after loading this page i am redirecting the page to another page and there i am checking the session value but it is showing empty value.

Thanks again
 
Old October 14th, 2008, 05:54 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Google is your No 1 programming tool - use it:

http://weblogs.asp.net/bleroy/archiv...ght_2900_.aspx

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
process.startinfo opens new instance of process Anypond General .NET 0 August 28th, 2008 05:35 AM
Problem with CPU time in killing process Samatha General .NET 0 December 14th, 2006 06:37 AM
Process.Kill() online problem kool_creative General .NET 3 October 30th, 2006 12:07 AM
Process problem wslyhbb C# 2 February 14th, 2006 01:48 AM
have problem with diagnostics.process methods octopus Pro VB.NET 2002/2003 0 December 19th, 2003 04:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.