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

Use of Session State ???

Dear all,

I have an application that use session state without any trouble when my
SessionState element of my webConfig file is set to "InProc"

Then I just try some test to make it work as out process. For that I have
modefied the web config SessionStae element part as follow :

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=nomos_srvr;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Then on the server side I install the ASPState database using the OSQL tool
as follow :
osql -s nomos_srvr -E installSqlStqte.sql

Then I run my application and get the following error :

Exception Details:
============
System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason:
Not associated with a trusted SQL Server connection.

What does it means and how to solve it ?

Thanks fro your help
regards
serge
Nov 19 '05 #1
5 2184
Serge,

You must specify a username/password combination in your sqlconnectionstring
attribute. Or, since you have used Trusted_Connection, you must give the
ASP.NET application an identity, because it is currently trying to login
with the ASP.NET account.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:86**********************************@microsof t.com...
Dear all,

I have an application that use session state without any trouble when my
SessionState element of my webConfig file is set to "InProc"

Then I just try some test to make it work as out process. For that I have
modefied the web config SessionStae element part as follow :

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=nomos_srvr;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Then on the server side I install the ASPState database using the OSQL
tool
as follow :
osql -s nomos_srvr -E installSqlStqte.sql

Then I run my application and get the following error :

Exception Details:
============
System.Data.SqlClient.SqlException: Login failed for user '(null)'.
Reason:
Not associated with a trusted SQL Server connection.

What does it means and how to solve it ?

Thanks fro your help
regards
serge

Nov 19 '05 #2
Does the ASP.NET application is given by the passwor and user in the
connection string or is it something else that I have to handle in code ?
"S.M. Altaf [MVP]" wrote:
Serge,

You must specify a username/password combination in your sqlconnectionstring
attribute. Or, since you have used Trusted_Connection, you must give the
ASP.NET application an identity, because it is currently trying to login
with the ASP.NET account.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:86**********************************@microsof t.com...
Dear all,

I have an application that use session state without any trouble when my
SessionState element of my webConfig file is set to "InProc"

Then I just try some test to make it work as out process. For that I have
modefied the web config SessionStae element part as follow :

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=nomos_srvr;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Then on the server side I install the ASPState database using the OSQL
tool
as follow :
osql -s nomos_srvr -E installSqlStqte.sql

Then I run my application and get the following error :

Exception Details:
============
System.Data.SqlClient.SqlException: Login failed for user '(null)'.
Reason:
Not associated with a trusted SQL Server connection.

What does it means and how to solve it ?

Thanks fro your help
regards
serge


Nov 19 '05 #3
I forgot to tell you.
My application authentication process is Windows authentication

"S.M. Altaf [MVP]" wrote:
Serge,

You must specify a username/password combination in your sqlconnectionstring
attribute. Or, since you have used Trusted_Connection, you must give the
ASP.NET application an identity, because it is currently trying to login
with the ASP.NET account.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:86**********************************@microsof t.com...
Dear all,

I have an application that use session state without any trouble when my
SessionState element of my webConfig file is set to "InProc"

Then I just try some test to make it work as out process. For that I have
modefied the web config SessionStae element part as follow :

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=nomos_srvr;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Then on the server side I install the ASPState database using the OSQL
tool
as follow :
osql -s nomos_srvr -E installSqlStqte.sql

Then I run my application and get the following error :

Exception Details:
============
System.Data.SqlClient.SqlException: Login failed for user '(null)'.
Reason:
Not associated with a trusted SQL Server connection.

What does it means and how to solve it ?

Thanks fro your help
regards
serge


Nov 19 '05 #4
the imperonated identioty account can not be used (unless you use kerberos
an enable creditial forwarding). in you web config define a impersonation
identity.

<identity impersonate="true" userName = "domain\accountwithsqlaccess"
password="thepassword" />

this will not change who the user is only the security creditials of the
request

note: if you use out of proc session, all session data must be serializable.

-- bruce (sqlwrok.com)
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:E1**********************************@microsof t.com...
I forgot to tell you.
My application authentication process is Windows authentication

"S.M. Altaf [MVP]" wrote:
Serge,

You must specify a username/password combination in your
sqlconnectionstring
attribute. Or, since you have used Trusted_Connection, you must give the
ASP.NET application an identity, because it is currently trying to login
with the ASP.NET account.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:86**********************************@microsof t.com...
> Dear all,
>
> I have an application that use session state without any trouble when
> my
> SessionState element of my webConfig file is set to "InProc"
>
> Then I just try some test to make it work as out process. For that I
> have
> modefied the web config SessionStae element part as follow :
>
> <sessionState
> mode="SQLServer"
> stateConnectionString="tcpip=127.0.0.1:42424"
> sqlConnectionString="data
> source=nomos_srvr;Trusted_Connection=yes"
> cookieless="false"
> timeout="20"
> />
>
> Then on the server side I install the ASPState database using the OSQL
> tool
> as follow :
> osql -s nomos_srvr -E installSqlStqte.sql
>
> Then I run my application and get the following error :
>
> Exception Details:
> ============
> System.Data.SqlClient.SqlException: Login failed for user '(null)'.
> Reason:
> Not associated with a trusted SQL Server connection.
>
> What does it means and how to solve it ?
>
> Thanks fro your help
> regards
> serge


Nov 19 '05 #5
Hi bruce thaanks fro your reply.

Why do you mean in your note for Out process session to be serialized?
Session("myKey")="my key" does not work ion out process ?
"Bruce Barker" wrote:
the imperonated identioty account can not be used (unless you use kerberos
an enable creditial forwarding). in you web config define a impersonation
identity.

<identity impersonate="true" userName = "domain\accountwithsqlaccess"
password="thepassword" />

this will not change who the user is only the security creditials of the
request

note: if you use out of proc session, all session data must be serializable.

-- bruce (sqlwrok.com)
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:E1**********************************@microsof t.com...
I forgot to tell you.
My application authentication process is Windows authentication

"S.M. Altaf [MVP]" wrote:
Serge,

You must specify a username/password combination in your
sqlconnectionstring
attribute. Or, since you have used Trusted_Connection, you must give the
ASP.NET application an identity, because it is currently trying to login
with the ASP.NET account.

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:86**********************************@microsof t.com...
> Dear all,
>
> I have an application that use session state without any trouble when
> my
> SessionState element of my webConfig file is set to "InProc"
>
> Then I just try some test to make it work as out process. For that I
> have
> modefied the web config SessionStae element part as follow :
>
> <sessionState
> mode="SQLServer"
> stateConnectionString="tcpip=127.0.0.1:42424"
> sqlConnectionString="data
> source=nomos_srvr;Trusted_Connection=yes"
> cookieless="false"
> timeout="20"
> />
>
> Then on the server side I install the ASPState database using the OSQL
> tool
> as follow :
> osql -s nomos_srvr -E installSqlStqte.sql
>
> Then I run my application and get the following error :
>
> Exception Details:
> ============
> System.Data.SqlClient.SqlException: Login failed for user '(null)'.
> Reason:
> Not associated with a trusted SQL Server connection.
>
> What does it means and how to solve it ?
>
> Thanks fro your help
> regards
> serge


Nov 19 '05 #6

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

Similar topics

5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
3
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
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
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?
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.