Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.net framework problem

Status
Not open for further replies.

jockey

Programmer
Nov 18, 2003
34
GB
Hopefully this is a simple config problem.

I have a web app that runs fine when it is hosted on my local pc using localhost to display the pages in my browser.

Ehen I move this app to the intranet server I get errors.

I have pinned down the error to be caused by the <sessionState> tag in my web.config file.
I know this as when it is removed everything is OK.

Can anyone tell me why this is and how to solve it??

thankx in advance

Jamie
 
how is sessionState defined in your web.config?

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I have defined session state like this :-

<sessionState mode="SQLServer"
sqlConnectionString="data source=127.0.0.1;user id=<user>;password=<password>"
cookieless="false"
timeout="20"/>

 
Just a guess. If you are storing session state in SqlServer then you're not using cookies, right? So, cookieless = "true". You also need a valid connection string to a SqlServer(2K) instance.
 
cookieless only reflects the way the session id is passed on from one request to another (whether by cookie or by url) and has nothing to do with SQLServer

verify that the correct string is provided by the connection string and that you ran the sql script provided for storing sessions in SQL Server

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
I am 100% sure the the way I have declared the sessionstate is correct as it works when run using my pc as a local host. It is when I move the files from my PC onto the IIS server that it gives me an error.
 
sqlConnectionString="data source=127.0.0.1;user id=<user>;password=<password>"

this shows that the server needed to use cookies is localhost. when moving to the web server, this will mean the sql server will have to be on the same machine as the web server.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
The SQL server and the IIS server are on the same machine at the moment.

This has me well and truely stumped. The reason I want this is that I keep loosing session state regularly at random time interval and I felt stroing session on the sql server would be more stable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top