Session_start is not called .... :o(

M

M O J 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. :eek:)

Thanks!!!

M O J O
 
S

Steven Cheng[MSFT]

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
 
M

M O J O

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
 
M

M O J O

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top