Saturday, March 31, 2012

Web Config File & Connection String

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?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...tatesection.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.
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:111C3866-DBE3-44D9-AF28-DE5356A4A6D5@.microsoft.com...
> 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?
Hi Mike:
The two settings to not need to match. Just set the connection timeout
values independently.
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 18 Mar 2005 07:31:09 -0800, "Mike Moore"
<MikeMoore@.discussions.microsoft.com> wrote:

>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 th
e
>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 tha
t
>same as what's in the appsetting section?
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 i
t
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?
"Manohar Kamath" wrote:

> 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...tatesection.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.
> --
> Manohar Kamath
> Editor, .netWire
> www.dotnetwire.com
>
> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
> news:111C3866-DBE3-44D9-AF28-DE5356A4A6D5@.microsoft.com...
> the
> section.
> that
>
>
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?
"Scott Allen" wrote:

> Hi Mike:
> The two settings to not need to match. Just set the connection timeout
> values independently.
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Fri, 18 Mar 2005 07:31:09 -0800, "Mike Moore"
> <MikeMoore@.discussions.microsoft.com> wrote:
>
>
Right.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:1AC3CF36-3222-4469-9684-5085EC9A71FB@.microsoft.com...
> 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?
> "Scott Allen" wrote:
>
Yes, you are correct. I thought you were planning to store the state in SQL
server. Sorry for the confusion.
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:ABA22C67-9D25-4330-95A9-05B74E7BB58A@.microsoft.com...
> 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?
> "Manohar Kamath" wrote:
>
example:
http://msdn.microsoft.com/library/d... />
ection.asp
"SQLServer."
connect
programmatically
the
use
the
our
section

0 comments:

Post a Comment