Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
QuestionHttpWebRequest Resolving to the wrong IP Address Pin
Ennis Ray Lynch, Jr.30-Jan-13 4:08
Ennis Ray Lynch, Jr.30-Jan-13 4:08 
AnswerSolved my own problem Pin
Ennis Ray Lynch, Jr.30-Jan-13 5:49
Ennis Ray Lynch, Jr.30-Jan-13 5:49 
QuestionC# app.config permission Pin
classy_dog29-Jan-13 19:11
classy_dog29-Jan-13 19:11 
AnswerRe: C# app.config permission Pin
Richard MacCutchan29-Jan-13 21:15
mveRichard MacCutchan29-Jan-13 21:15 
AnswerRe: C# app.config permission Pin
LokoLuke30-Jan-13 0:35
LokoLuke30-Jan-13 0:35 
AnswerRe: C# app.config permission Pin
Shameel30-Jan-13 3:22
professionalShameel30-Jan-13 3:22 
GeneralRe: C# app.config permission Pin
jschell30-Jan-13 8:07
jschell30-Jan-13 8:07 
QuestionC# linq to sql error Pin
classy_dog29-Jan-13 19:10
classy_dog29-Jan-13 19:10 
In a C# 2010 windows application, I am getting the following error message:

"The connection property in the Application Settings file is missing or incorrect. The connection string from the .dbml file has been used in its place".
I am also getting the warning message: warning CS0618: 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete,
it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings".

What I am trying to do is obtain the connection string information from the app.configuration file instead from the app settings file.

To accomplish this goal I am chanigng the *designer.cs to use the following code to obtain the connection string information:
 base(ConfigurationManager.ConnectionStrings["DEVConnectionString"].ConnectionString, mappingSource)

The app.configuration file looks like the following:
 <connectionStrings>
    <add name="DEVConnectionString" connectionString="Data Source=dev2008;Initial Catalog=DEV;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

The above code works fine when I setup the code initially.
However once I reopen the soltuion file, I get the message listed above,
""The connection property in the Application Settings file is missing or incorrect.
The connection string from the .dbml file has been used in its place".

To solve this problem, I was trying to do the following steps:
1.Step 1: Right click on the .DBML file and select "Run Custom Tool".
2.Step 2: Set "Application setting = false" in the connecton properties of your DataContext.
3.Step 3: press "Save All".


The problem with the above solution is once I selected "Run Custom Tool", nothing happened. There was nothing for me to select.

Thus can you tell me and/or show me in code how to solve this problem?
AnswerRe: C# linq to sql error Pin
Richard MacCutchan29-Jan-13 21:13
mveRichard MacCutchan29-Jan-13 21:13 
QuestionReference confusion Pin
yudhistira dewanata29-Jan-13 18:57
yudhistira dewanata29-Jan-13 18:57 
AnswerRe: Reference confusion Pin
Abhinav S29-Jan-13 19:01
Abhinav S29-Jan-13 19:01 
GeneralRe: Reference confusion Pin
Shameel30-Jan-13 3:26
professionalShameel30-Jan-13 3:26 
QuestionSerial Port Errors, User Messages Pin
C-P-User-329-Jan-13 6:23
C-P-User-329-Jan-13 6:23 
AnswerRe: Serial Port Errors, User Messages Pin
Jibesh29-Jan-13 11:57
professionalJibesh29-Jan-13 11:57 
QuestionDynamic Reference to Dll Path Pin
Member 461637929-Jan-13 1:53
Member 461637929-Jan-13 1:53 
AnswerRe: Dynamic Reference to Dll Path Pin
Alan N29-Jan-13 3:29
Alan N29-Jan-13 3:29 
AnswerRe: Dynamic Reference to Dll Path Pin
jschell29-Jan-13 13:50
jschell29-Jan-13 13:50 
Question.NET Brush serialization/WYSIWIG [Solved] Pin
Amlanjyoti Saikia29-Jan-13 0:32
Amlanjyoti Saikia29-Jan-13 0:32 
AnswerRe: .NET Brush serialization/WYSIWIG Pin
Brisingr Aerowing29-Jan-13 3:12
professionalBrisingr Aerowing29-Jan-13 3:12 
GeneralRe: .NET Brush serialization/WYSIWIG Pin
Amlanjyoti Saikia30-Jan-13 1:54
Amlanjyoti Saikia30-Jan-13 1:54 
Questionhow to check the avaialbility of username from database Pin
Santhosh V.T28-Jan-13 20:51
Santhosh V.T28-Jan-13 20:51 
AnswerRe: how to check the avaialbility of username from database Pin
OriginalGriff28-Jan-13 21:17
mveOriginalGriff28-Jan-13 21:17 
AnswerRe: how to check the avaialbility of username from database Pin
PIEBALDconsult29-Jan-13 3:59
mvePIEBALDconsult29-Jan-13 3:59 
AnswerRe: how to check the avaialbility of username from database Pin
fjdiewornncalwe29-Jan-13 5:11
professionalfjdiewornncalwe29-Jan-13 5:11 
QuestionLearning C# .Net - From where to start.? Pin
mbatra3128-Jan-13 19:21
mbatra3128-Jan-13 19:21 

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.