473,385 Members | 1,958 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,385 software developers and data experts.

session_start not firing

I'm workinbg in Visual Studio 2003. I'm experimenting with creating a
session variable, and from all I can gather. the Session_Start event is not
firing.

In Global.asx.vb, in the Session Start event, I have the following:

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("varTest") = "123"
End Sub

First off, when I set a break point at that line, it is never reached when
the application starts. Secondly, when I try to post a test alert(), to
display Session("varTest"), it comes up blank (no error). Finally, if I set
Session("varTest") = "123" in my asp page, then display it, it shows up, all
of which leads me to believe that the global.asax file is not seen by the
project, even though it was inserted automatically.

Anyone have any idea how to rectify this problem?

Thanks.

Joe
http://www.befumo.com

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Feb 13 '06 #1
4 4425
Joe Befumo wrote:
First off, when I set a break point at that line, it is never reached
when the application starts. Secondly, when I try to post a test
alert(), to display Session("varTest"), it comes up blank (no error).
Finally, if I set Session("varTest") = "123" in my asp page, then
display it, it shows up, all of which leads me to believe that the
global.asax file is not seen by the project, even though it was
inserted automatically.
Anyone have any idea how to rectify this problem?


Yes: Use Global.asa

ASP and ASP.NET do not share sessions.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 13 '06 #2
Joe Befumo wrote:
I'm workinbg in Visual Studio 2003. I'm experimenting with creating a
session variable, and from all I can gather. the Session_Start event
is not firing.

In Global.asx.vb, in the Session Start event, I have the following:
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("varTest") = "123"
End Sub

First off, when I set a break point at that line, it is never reached
when the application starts. Secondly, when I try to post a test
alert(), to display Session("varTest"), it comes up blank (no error).
Finally, if I set Session("varTest") = "123" in my asp page, then
display it, it shows up, all of which leads me to believe that the
global.asax file is not seen by the project, even though it was
inserted automatically.

Anyone have any idea how to rectify this problem?

You've probably failed to use IIS Manager to create an application in your
virtual directory.
http://msdn2.microsoft.com/en-us/library/ha2y9493.aspx

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '06 #3
Joe Befumo wrote:
Finally, if I set Session("varTest") = "123" in my asp page, then


Oh! I missed the fact that you were trying to read this session variable in
an "asp" page. Was that a typo? Did you actually mean "aspx"? If not, read
Dave's reply.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 13 '06 #4
Bob Barrows [MVP] wrote:
There was no way for you to know it, but this is a classic
asp newsgroup...

First off, when I set a break point at that line, it is never reached
when the application starts. Secondly, when I try to post a test
alert(), to display Session("varTest"), it comes up blank (no error).
Finally, if I set Session("varTest") = "123" in my asp page, then

^^^^^^^^^^^^^^
Looks like ASP to me, Bob. At least in part.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 13 '06 #5

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

Similar topics

1
by: Bill Manring | last post by:
The startup page for my ASP.NET application is an HTML frames page with two frames. This seems to cause the Session_Start event in the Global.asax file to fire twice. When I change the startup...
1
by: jcode | last post by:
I have an ASPNET application that has worked correctly on couple of servers. I have just deployed it to another server and cannot resolve an issue. It appears as if the Session_Start is not...
3
by: Joe Befumo | last post by:
I'm workinbg in Visual Studio 2003. I'm experimenting with creating a session variable, and from all I can gather. the Session_Start event is not firing. In Global.asx.vb, in the Session Start...
0
by: RobbRoss | last post by:
I have a C# Web project that I migrated from VS2003 to VS 2005. I have some session variables in the global.asax file's Session_Start event. I want to set default values here for these variables....
6
by: Joe Befumo | last post by:
I just created the default personal site project in Visual Studio 2005, and it worked perfectly -- very nice. Next, I'd like to import some stat-capture code that I have working in a Visual Studio...
7
by: Bruno | last post by:
We are attempting to automatically log users off from the Session_End event in global.asax and set some values on session_start. It is not a critical task, more of a housekeeping task so that we...
6
by: Alex | last post by:
Hello All, I'm having a problem with global.asax file. The session_start method of globals.asax.vb is not firing in my project when I copy the files to a production server. It works OK in my...
3
by: Mufasa | last post by:
I have code in my session_start to create a temp directory for the session. On session_end it is supposed to delete the directory but doesn't seem to be firing. I've enclosed the code below. ...
5
by: greg | last post by:
Written in Asp.Net 2.0 The session_start fires on Development server running withing Visual Studio 2005 and also if access web site via localhost on development machine. But if copy to...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.