Click here to Skip to main content
15,889,493 members
Home / Discussions / C#
   

C#

 
QuestionDifference between where<>() and where() in linq? [modified] Pin
sri_34643-Mar-10 0:29
sri_34643-Mar-10 0:29 
AnswerRe: Difference between where() and where() in linq? Pin
Pete O'Hanlon3-Mar-10 1:30
mvePete O'Hanlon3-Mar-10 1:30 
AnswerRe: Difference between where() and where() in linq? Pin
Scott Dorman3-Mar-10 6:47
professionalScott Dorman3-Mar-10 6:47 
GeneralRe: Difference between where() and where() in linq? Pin
Pete O'Hanlon3-Mar-10 9:44
mvePete O'Hanlon3-Mar-10 9:44 
GeneralRe: Difference between where() and where() in linq? Pin
Scott Dorman3-Mar-10 12:41
professionalScott Dorman3-Mar-10 12:41 
GeneralRe: Difference between where() and where() in linq? Pin
Pete O'Hanlon3-Mar-10 21:41
mvePete O'Hanlon3-Mar-10 21:41 
GeneralRe: Difference between where() and where() in linq? Pin
Scott Dorman4-Mar-10 4:25
professionalScott Dorman4-Mar-10 4:25 
QuestionWeb Service web.config variables from dll in bin folder Pin
BASONJS2-Mar-10 23:39
BASONJS2-Mar-10 23:39 
Hi all,

I have a question regarding web services and configuration files.

Platform:
.Net Framework , code behind c#.

Scenario:
I have a web service which when i publish, creates a bin folder. All normal. Now, in that bin folder i have a dll which is effectively my data access layer, CRUD for databases etc. Now i use ConfigurationManager.GetSection("AppConfig") within this dll in order to get database connection strings, which the dll brings out from the web service web.config file.

File Structure:

<My Web Service Folder>
--><AppData>
--><bin>--><My Data Access Layer DLL>
--><web.config(includes data access layer variables)>

Within my development environment, this works like a charm, using ConfigurationManager.GetSection("AppConfig") from my dll to get out the appconfig section from my web.config and then searching the nodes in order to find the right key.

Example of web.config:

<AppConfig>
<Configs use="true">
<add key="Databases" use="true" />
</Configs>

<!-- Web Service Configuration Settings-->
<Databases>
<ConnectionStrings>
<add key="<MY KEY NAME>" providerName="System.Data.SqlClient"
value="<MY CONNECTION STRING>" />
</ConnectionStrings>
</Databases>
</AppConfig>

So far so good.

Now i am testing a deployment of this system on a virtual pc. I copy and paste the c:\initpub\<mywebservice> folder into the c:\inetpub of the virtual pc. I try and run it and it fails. After inserting debugging into the code to see where it is failing, I found out that ConfigurationManager.GetSection("AppConfig") is actually returning null instead of the appconfig section from the web.config. Does anybody know why this is happening ?

Please excuse the length of the post but was needed to explain the situation.

James
QuestionHow to send commands to a running application from the command line? Pin
Ted On The Net2-Mar-10 22:43
Ted On The Net2-Mar-10 22:43 
AnswerRe: How to send commands to a running application from the command line? Pin
Eddy Vluggen2-Mar-10 23:35
professionalEddy Vluggen2-Mar-10 23:35 
GeneralRe: How to send commands to a running application from the command line? Pin
Ted On The Net2-Mar-10 23:42
Ted On The Net2-Mar-10 23:42 
GeneralRe: How to send commands to a running application from the command line? Pin
Som Shekhar2-Mar-10 23:53
Som Shekhar2-Mar-10 23:53 
GeneralRe: How to send commands to a running application from the command line? Pin
Eddy Vluggen3-Mar-10 0:00
professionalEddy Vluggen3-Mar-10 0:00 
GeneralRe: How to send commands to a running application from the command line? Pin
Ted On The Net3-Mar-10 0:13
Ted On The Net3-Mar-10 0:13 
GeneralRe: How to send commands to a running application from the command line? Pin
Eddy Vluggen3-Mar-10 0:30
professionalEddy Vluggen3-Mar-10 0:30 
AnswerRe: How to send commands to a running application from the command line? Pin
OriginalGriff2-Mar-10 23:42
mveOriginalGriff2-Mar-10 23:42 
GeneralRe: How to send commands to a running application from the command line? Pin
Ted On The Net2-Mar-10 23:44
Ted On The Net2-Mar-10 23:44 
AnswerRe: How to send commands to a running application from the command line? Pin
PIEBALDconsult3-Mar-10 3:51
mvePIEBALDconsult3-Mar-10 3:51 
Questioncreate word file Pin
Milind Panchal2-Mar-10 22:33
Milind Panchal2-Mar-10 22:33 
AnswerRe: create word file Pin
Eddy Vluggen2-Mar-10 23:41
professionalEddy Vluggen2-Mar-10 23:41 
QuestionUpdate Cell Value into Excel Cell like 2009.03 and it become 2009.3 Pin
pankaj.calm2-Mar-10 22:17
professionalpankaj.calm2-Mar-10 22:17 
QuestionRe: Update Cell Value into Excel Cell like 2009.03 and it become 2009.3 Pin
Eddy Vluggen3-Mar-10 0:55
professionalEddy Vluggen3-Mar-10 0:55 
AnswerRe: Update Cell Value into Excel Cell like 2009.03 and it become 2009.3 Pin
pankaj.calm3-Mar-10 0:59
professionalpankaj.calm3-Mar-10 0:59 
QuestionRe: Update Cell Value into Excel Cell like 2009.03 and it become 2009.3 Pin
Eddy Vluggen3-Mar-10 1:39
professionalEddy Vluggen3-Mar-10 1:39 
AnswerRe: Update Cell Value into Excel Cell like 2009.03 and it become 2009.3 Pin
pankaj.calm3-Mar-10 2:02
professionalpankaj.calm3-Mar-10 2:02 

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.