473,721 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ 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 sqlconnectionst ring in the sessionstate section.
I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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 2562
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 sqlConnectionSt ring 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 programmaticall y
set the sqlConnectionSt ring.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Mike Moore" <Mi*******@disc ussions.microso ft.com> wrote in message
news:11******** *************** ***********@mic rosoft.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 sqlconnectionst ring in the sessionstate section. I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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*******@disc ussions.microso ft.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
stateconnectio n string and sqlconnectionst ring in the sessionstate section.
I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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 stateconnection string attribute in order for the timeout?

If I can then the app will use the connectionstrin g 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 sqlConnectionSt ring 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 programmaticall y
set the sqlConnectionSt ring.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Mike Moore" <Mi*******@disc ussions.microso ft.com> wrote in message
news:11******** *************** ***********@mic rosoft.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 sqlconnectionst ring in the sessionstate

section.
I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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="fal se" 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*******@disc ussions.microso ft.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
stateconnectio n string and sqlconnectionst ring in the sessionstate section.
I have our connection string information in the appsettings section of the
web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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*******@disc ussions.microso ft.com> wrote in message
news:1A******** *************** ***********@mic rosoft.com...
So I can do this -
<sessionState mode="InProc" cookieless="fal se" 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*******@disc ussions.microso ft.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
>stateconnectio n string and sqlconnectionst ring in the sessionstate
>section.
>I have our connection string information in the appsettings section of
>the
>web config file.
>
>Our authenication mode reads -
> <authenticati on mode="Windows" />
> <identity impersonate="tr ue" />
>
>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*******@disc ussions.microso ft.com> wrote in message
news:AB******** *************** ***********@mic rosoft.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 stateconnection string attribute in order for the timeout?

If I can then the app will use the connectionstrin g 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 sqlConnectionSt ring 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 programmaticall y set the sqlConnectionSt ring.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Mike Moore" <Mi*******@disc ussions.microso ft.com> wrote in message
news:11******** *************** ***********@mic rosoft.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 sqlconnectionst ring in the sessionstate

section.
I have our connection string information in the appsettings section of
the web config file.

Our authenication mode reads -
<authenticati on mode="Windows" />
<identity impersonate="tr ue" />

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
1995
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 development and then deploy the updated application to our QA server and then once tested to our production server. The application has a web.config file. The contents of the file (appsettings part) are different in all three environments because...
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 or something of the like. What I require is the ability to point at a development or live database without changing any existing code in my multiple DLL / single form project. <add key="dtacollect.ConnectionString"...
14
3503
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, one developer suggested that it's a security flaw; therefore connection strings should be kept somewhere else or encrypted. My argument is that web.config file is protected by IIS and Windows security which is the case. And another argument is that...
5
2294
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 a web application and if I need to read the connection string it is reading the connection string from the web.config of web application. I am not knowing how to change the Application domain so that it reads the App.config file instead of...
17
3248
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 production. I'm in the process of writing a site that will have lots of traffic so I'm trying to save resources everyplace that I can. My question is - do the web.config app settings get loaded once when the
8
1968
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 directory contains the connection string information for the database. How can I use ConfigurationSettings.AppSettings to show the path of the Secure directory when getting the connection string?
2
5391
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 ASP.NET applications that all manage connection strings in Web.config the same way, like this: This client has one Web.config file per application, and that one Web.config file is duplicated across all environments (i.e., dev machines, test,...
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
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 we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.