Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 January 16th, 2005, 08:18 AM
SIV SIV is offline
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem whit session

I add class.vb to my project, I named it “ClassPublic.vb”I defined in this class variable as array , integer ,string. Like that:
Public Recordset2Array1 (10, 600) As String
Public Recordset2Array2(10, 600) As String
Public Recordset2Array3 (10, 15) As String
Public Recordset2Array4(10, 600) As String
Public strDemand5 (100) As String
Public Min1(10, 300) As String
Public Min2(10, 300) As String
Public Rows As Long
Public RowsShow As Long
Public SumTotals As Double
Public SumTotals1 As Double

I define session as ClassPublic in Global.asax.vb:
Session ("ClassPublic") = New ClassPublic()

I use Session ("ClassPublic") for saving global variable for that reson
I define Session ("ClassPublic") in aspx.vb:
Dim Parameters As ClassPublic = CType(Session("ClassPublic"), ClassPublic)

Parameters. Recordset2Array4(I,x)=j

When I run it,it show massage error:
“Session State can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”
I define in mashine.confog and web.config ,it is not definision problem in
mashine.confog and web.config for sure

In this way it is work:
CType(Session("ClassPublic"), ClassPublic) . Recordset2Array4(I,x)=j
But it takes big memory usage in aspnet_wp.exe so the application fails

I don’t understand why in this way I get error:
Parameters. Recordset2Array4(I,x)=j

Please help
Maybe exists deferent way for saving global variable in asp.net









Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript whit SSL? NeoNmaN Javascript 0 February 14th, 2007 07:50 AM
connect database whit mysql. menteriPertahanan ADO.NET 0 November 8th, 2006 12:28 AM
problem whit shoping card mbcreator PHP How-To 0 February 17th, 2006 05:51 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
help me close automatic progz whit out all making ppp Visual C++ 0 May 6th, 2004 07:23 AM





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