Web Config File & Connection String

G

Guest

I'm not very familiar with the web config file. I would like to use the
timeout item in the session state for our connection string, but not use the
stateconnection string and sqlconnectionstring in the sessionstate section.
I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authentication mode="Windows" />
<identity impersonate="true" />

We we do our app development on our workstations with the database on our
development server.

Do you have to have the connection string in the sesssion state section that
same as what's in the appsetting section?
 
M

Manohar Kamath

Mike,

I am not sure of the question -- but are you asking if you can only use
timeout attribute in the sessionState section? Looking at the MSDN example:

http://msdn.microsoft.com/library/d...us/cpgenref/html/gngrfsessionstatesection.asp

You will have to specify sqlConnectionString since your mode is "SQLServer."
This is logically a different connect string when compared to the connect
string for the application. Plus, I don't know if you can programmatically
set the sqlConnectionString.
 
S

Scott Allen

Hi Mike:

The two settings to not need to match. Just set the connection timeout
values independently.
 
G

Guest

We are able to use our sql connection string in the app setting section. If
I use the sql connection in the app setting section do I need to also have it
in the stateconnectionstring attribute in order for the timeout?

If I can then the app will use the connectionstring from the app setting
section and use the timeout from the sessionstate - right?
 
G

Guest

So I can do this -


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

and set my connection string in the appsetting section - right?

Our app will use the connection string from the appsettings section and the
timeout attribute from the session state - correct?
 
M

Manohar Kamath

Yes, you are correct. I thought you were planning to store the state in SQL
server. Sorry for the confusion.
 

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

Top