Click here to Skip to main content
15,916,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionasp.net intraction with database Pin
Sonia Gupta5-Oct-07 23:03
Sonia Gupta5-Oct-07 23:03 
AnswerRe: asp.net intraction with database Pin
John-ph5-Oct-07 23:19
John-ph5-Oct-07 23:19 
GeneralRe: asp.net intraction with database Pin
Sonia Gupta5-Oct-07 23:33
Sonia Gupta5-Oct-07 23:33 
AnswerRe: asp.net intraction with database Pin
Christian Graus5-Oct-07 23:42
protectorChristian Graus5-Oct-07 23:42 
AnswerRe: asp.net intraction with database Pin
Abhijit Jana6-Oct-07 0:59
professionalAbhijit Jana6-Oct-07 0:59 
Questionreference parameters in user defined functions Pin
Sonia Gupta5-Oct-07 22:39
Sonia Gupta5-Oct-07 22:39 
AnswerRe: reference parameters in user defined functions Pin
Christian Graus5-Oct-07 23:40
protectorChristian Graus5-Oct-07 23:40 
QuestionAppSettings vs. ConnectionStrings in .NET 2.0 [modified] Pin
alfakappasigma5-Oct-07 22:29
alfakappasigma5-Oct-07 22:29 
I have the following code (works fine in .NET 1.x) which I believe expects to get the connectionstring from the key-value pair within <appSettings>...</appSettings> block in my web.config file. But I'm using .NET 2.0 now and all of my connection strings are within <connectionstrings>...</connectionstrings> block. How can I convert this line:
string strConnexn = SecureConnection.GetCnxString("cnxNWSecure");

to read my connectionstring from <connectionstrings>...</connectionstrings> block and not from <appsettings>...</appsettings>.

I'm familiar with the following in .NET 2.0 which doesn't involve string encryption & decryption:

string strConnexn = ConfigurationManager.ConnectionStrings["cnxNonSecure"].ToString()

What I'm looking for is something that works for secure connection.

Here's a chunk of code from a function for your review:
...
try
{
// Grab the encrypted connection string and decrypt it
string strConnexn = SecureConnection.GetCnxString("cnxNWSecure");

// Establish DB connection
using(SqlConnection cnxString = new SqlConnection(strConnexn))
{
cnxString.Open();
// Perform operation
...
}
...

Thank you in advance for your advice and support.

Anjani K Shiwakoti



Computer programs and social cultures are the same.




-- modified at 4:48 Saturday 6th October, 2007
Questionstored procedures in asp.net Pin
Sonia Gupta5-Oct-07 21:42
Sonia Gupta5-Oct-07 21:42 
AnswerRe: stored procedures in asp.net Pin
Imran Khan Pathan5-Oct-07 21:44
Imran Khan Pathan5-Oct-07 21:44 
GeneralRe: stored procedures in asp.net Pin
Sonia Gupta5-Oct-07 21:55
Sonia Gupta5-Oct-07 21:55 
GeneralRe: stored procedures in asp.net Pin
Sonia Gupta5-Oct-07 23:31
Sonia Gupta5-Oct-07 23:31 
GeneralRe: stored procedures in asp.net Pin
Christian Graus5-Oct-07 23:42
protectorChristian Graus5-Oct-07 23:42 
JokeRe: stored procedures in asp.net Pin
Urs Enzler6-Oct-07 3:40
Urs Enzler6-Oct-07 3:40 
QuestionDisplaying the images from the Database Pin
.NET- India 5-Oct-07 21:21
.NET- India 5-Oct-07 21:21 
AnswerRe: Displaying the images from the Database Pin
Imran Khan Pathan5-Oct-07 21:49
Imran Khan Pathan5-Oct-07 21:49 
GeneralRe: Displaying the images from the Database Pin
.NET- India 5-Oct-07 21:52
.NET- India 5-Oct-07 21:52 
GeneralRe: Displaying the images from the Database Pin
Imran Khan Pathan5-Oct-07 22:08
Imran Khan Pathan5-Oct-07 22:08 
AnswerRe: Displaying the images from the Database Pin
Abhijit Jana6-Oct-07 2:17
professionalAbhijit Jana6-Oct-07 2:17 
GeneralRe: Displaying the images from the Database Pin
.NET- India 6-Oct-07 2:53
.NET- India 6-Oct-07 2:53 
GeneralRe: Displaying the images from the Database Pin
Abhijit Jana6-Oct-07 3:20
professionalAbhijit Jana6-Oct-07 3:20 
AnswerRe: Displaying the images from the Database Pin
Abhijit Jana7-Oct-07 3:50
professionalAbhijit Jana7-Oct-07 3:50 
Questionnvarchar is incompatible with image Pin
kishoregani5-Oct-07 21:08
kishoregani5-Oct-07 21:08 
AnswerRe: nvarchar is incompatible with image Pin
Christian Graus5-Oct-07 21:15
protectorChristian Graus5-Oct-07 21:15 
QuestionFor write protecting a drive for all the Users Pin
Gopi Ramanathan5-Oct-07 20:49
Gopi Ramanathan5-Oct-07 20:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.