all groups > sql server (alternate) > april 2005 >
You're in the

sql server (alternate)

group:

Session State InProc. HELP??????


Re: Session State InProc. HELP?????? Erland Sommarskog
4/29/2005 12:00:00 AM
sql server (alternate): bharath (bramanujam@gmail.com) writes:
[quoted text, click to view]

It appears to me that you should post this question in a forum
dedicated to ASP .Net. This newsgroup is about SQL Server, and I
at least knows nothing about ASP .Net.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
Session State InProc. HELP?????? bharath
4/29/2005 2:41:46 AM
Hi

Can anyone help me with Session Management in ASP.NET. I have a web
application with a login page and i need to retain the username after
he logs in. This is what I have in Config Files


Global.asax

<OBJECT RUNAT="SERVER" SCOPE="SESSION" ID="MyInfo"
PROGID="Scripting.Dictionary">
</OBJECT>

web.config

<configuration>
<!-- This section stores your SQL configuration as an appsetting
called
conn. You can name this setting anything you would like.
-->
<appSettings>
<add key="conn"
value="server=ADVAITH;database=tis;uid=sa;pwd=;" />
</appSettings>
<!-- This section sets the authentication mode to forms
authentication
and routes all traffic to the specified page. It also
specifies a
timeout. The authorization section below denies all users not

authenticated. For testing purposes, custom errors was turned
off.
The section below allows pages to be trace enabled for
debugging
-->
<system.web>

<sessionState
mode="InProc"
cookieless="false"
timeout="20" />

<authentication mode="Forms">
<forms name="MyFormsAuthentication" loginUrl="login.aspx"
protection="All" timeout="720" />
</authentication>

<authorization>
<deny users="?" />
</authorization>

<customErrors mode="Off" />

<trace enabled="true" requestLimit="0" pageOutput="true" />

</system.web>

<system.web>

</system.web>
</configuration>

When i assign the user name in the log in page it works

session("username") = txtUsername.Text

But if I use a new session variable or the username(session variable as
declared in the login page, in the menu page it gives me error saying
that Decralation is expected . Is there any files that i need to import
b4 using sessions??

Please help me out. My email:bramanujam@gmail.com
AddThis Social Bookmark Button