473,480 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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?
Nov 19 '05 #1
6 2539
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/de...atesection.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" <Mi*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.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?

Nov 19 '05 #2
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"
<Mi*******@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 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?


Nov 19 '05 #3
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:
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/de...atesection.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" <Mi*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.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?


Nov 19 '05 #4
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"
<Mi*******@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 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?


Nov 19 '05 #5
Right.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mike Moore" <Mi*******@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.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:
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"
<Mi*******@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
>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?


Nov 19 '05 #6
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" <Mi*******@discussions.microsoft.com> wrote in message
news:AB**********************************@microsof t.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:
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/de...atesection.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" <Mi*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.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?


Nov 19 '05 #7

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

Similar topics

8
1968
by: Robert | last post by:
I have what I think should be a pretty common scenario in a corporate environment. I have a web app and three environments on three servers: Development, QA and Production. We develop in...
3
602
by: Tim Gallivan | last post by:
Hi all, I think read somewhere (but I can't find it ... note to self: must get new filing system ...) that there is a workaround so that an app.config can have multiple keys with the same name...
14
3480
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
5
2269
by: Sridhar | last post by:
Hi, I have created a project which contains classes to read the data from the database. This project has an App.Config file which contains the SqlConnection String. when this code is called from...
17
3220
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
8
1946
by: theWizard1 | last post by:
Using Asp.NET 1.1, and C#. I have a directory for the website, and a directory under it named Secure. I have a web.config in each of the above directories. The web.config in the Secure...
2
5358
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
0
7037
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
6904
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
7032
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,...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4767
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.