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

Session_start is not called .... :o(

Hi,

I have a test application, that is a Web.config, a Global.asax,
default.aspx and a final.aspx page.

When a user enters my application, I want session_start to always
redirect him to the final.aspx page.

Here's my Web.config:

<configuration>
<system.web>
<identity impersonate="true" />
<compilation debug="true" defaultLanguage="vb" explicit="true" />
<globalization requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1" />
<sessionState mode="SQLServer" cookieless="false" timeout="15"
sqlConnectionString="...cut out..." />
<customErrors mode="Off" />
</system.web>
</configuration>
Here's my Global.asax:

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("~/final.aspx")
End Sub
Here's my default.aspx:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim i As Integer = 10
End Sub

My final.aspx has no code.

When I execute my application on my develloper machine, everything works
perfect, but when I execute it on the production server (an exact copy
of my solution), the session_start is not fired.

I've tried to delete the website and create it again. Still the same
problem ... session_start wont fire.

Any idea?? ... I'm going crazy here. :o)

Thanks!!!

M O J O

Nov 18 '05 #1
4 2551
Hi M O J O,

I have tried to created a web application with ASP.NET Session State, which
will save the session information in SQL server. After copying it to
another server, it works fine on both servers.

Can you help to send the following information to me?

1. Is there any error message on the production server when we access the
aspx page?

2. Can you access the SQL server from the production server and save data
to the database?

3. Do you use the same operation system on the develop server and the
production server?

I also suggested that we perform the following steps:

1. Create a new web site on the production server.

2. Copy the solution to the new web site.

3. In Internet Information Service Manager, create a application for this
solution:

1) Click Start -> Run, type the following command and click OK.

inetmgr

2) Locate the node for the solution, for example ¡°Mywebsite -> Mysolution¡±

3) Right click and then choose ¡°properties¡± from the pop-up menu.

4) On the ¡°Directory¡± tab, click the ¡°Create¡± button at the right of ¡
°Application Name¡±.

5) Click OK to close the window.

4. Now, please try to access the page again.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2
Hi Steven,

Thank you for answering my post.

1. No - no error messages are shown. It just jumps to the default.aspx
instead of the final.aspx.

2. I've changed the sessionstate to ... <sessionState mode="InProc" />.
No database is used then and it is still the same problem.

3. Develop machine is Win XP Pro, production is Win 2000 server.

Creating a new web site and copy from develop to production still
results in the same problem.

This is very wird.

M O J O

Steven Cheng[MSFT] wrote:
Hi M O J O,

I have tried to created a web application with ASP.NET Session State, which
will save the session information in SQL server. After copying it to
another server, it works fine on both servers.

Can you help to send the following information to me?

1. Is there any error message on the production server when we access the
aspx page?

2. Can you access the SQL server from the production server and save data
to the database?

3. Do you use the same operation system on the develop server and the
production server?

I also suggested that we perform the following steps:

1. Create a new web site on the production server.

2. Copy the solution to the new web site.

3. In Internet Information Service Manager, create a application for this
solution:

1) Click Start -> Run, type the following command and click OK.

inetmgr

2) Locate the node for the solution, for example ¡°Mywebsite -> Mysolution¡±

3) Right click and then choose ¡°properties¡± from the pop-up menu.

4) On the ¡°Directory¡± tab, click the ¡°Create¡± button at the right of ¡
°Application Name¡±.

5) Click OK to close the window.

4. Now, please try to access the page again.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #3
Hi Steven,

Thank you for helping me out here!!!

Running "aspnet_regiis.exe -i" seamed to solve the problem.

Thanks again!!!!

M O J O

Steven Cheng[MSFT] wrote:
Hi M O J O,

Thanks for your reply.
I suggest that we perform the following steps:
1. I have created one simple sample, which works fine on my side. Can you
copy the sample to your production machine and test again?

Note: Please replace the user and password information in the web.config
file and try to access the ¡°WebForm1.aspx¡± file.

sqlConnectionString="data source=localhost;user id=sa;password=pass"
2. If the sample still does not work, there can be some problems with
ASP.NET on the production server. Let¡¯s perform the following steps to
reinstall ASP.NET:
1) Click "Start", and then click "Run".
2) In the "Open" text box, type "cmd" (without the quotation marks), and
then press ENTER.
3) At the command prompt, type the following, and then press ENTER:
""%windir%\Microsoft.NET\Framework\<version>\aspne t_regiis.exe" -i"
(without the quotation marks) In this path, <version> represents the
version number of the .NET Framework that you installed on your server.
For ASP.NET 1.0, the version is ¡°v1.0.3705¡± while ¡°v1.1.4322¡± for
ASP.NET 1.1.
If there are any new findings, please feel free to let me know.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Nov 18 '05 #4
Hi MOJO,

Thanks for your response. I'm very glad that we've resolved this issue.
Have a good day!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

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

Similar topics

19
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so...
0
by: Sandy | last post by:
Hi All, My session_start in the global.asa is called more than once. If I just go to the default page and refresh it is called every time I refresh. From the default page it is called once...
1
by: Mercy | last post by:
Hi, I'm a newbie. I was trying to figure out how to use the Session_start method? The reference books I'm reading say that a session STARTS when "session_start" is called. But ... in their sample...
8
by: lkrubner | last post by:
I was trying to set a cookie before I called session_start() and it was giving me an error. But isn't sessions really just a cookie? Why would it matter if I sent a cookie before session_start? Can...
2
by: Jeanne Louw | last post by:
Hi Why would this happen? The Application_Start and Session_Start events fires on each page request on my website. SessionID stays the same between page requests. <sessionState mode="InProc"...
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...
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
5
by: paladin.rithe | last post by:
I'm running into an issue with session_start(). I see that you can't run it twice, otherwise it causes an issue. That's fine, and makes sense. I also saw some ideas on how to get around this if...
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...
4
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world,...
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
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
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...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.