Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi

My requirement is to generate reports from windows service and email it to the group of people.

For this I am using Microsoft Enterprise Library to get the email distribution list from database. However it is failing.

I am getting below error.

Suprising thing for me is same kind of configuration is working for me when calling db from web application with same configuration in WEB.CONFIG but failing in WIN Service using app.config

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Locating source for 'e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs'. Checksum: MD5 {63 6f bc e4 a2 84 be 78 e1 82 68 e3 a1 db fb 18}
The file 'e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs' does not exist.
Looking in script documents for 'e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs'...
Looking in the projects for 'e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs'.
The file was not found in a project.
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'E:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs.
The debugger could not locate the source file 'e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Database.cs'

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


My App config section is defined as in below:

XML
<configsections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configsections>
  <dataconfiguration defaultdatabase="MYDB">
     </dataconfiguration>
  <connectionstrings>
    <add name="MYDB" connectionstring="Data source=MYDBSOURCE;User Id=MYDBUSER;Password=MYDBPWD;Integrated Security=true;" providername="System.Data.OracleClient" />
  </connectionstrings>


Can anybody suggest what is causing the problem? Is some thing wrong with my App config?

I have googled out but could not find the solution.
Posted
Updated 14-Jul-13 20:43pm
v5

1 solution

<pre lang="xml">Issue has been resolved after modifying the config file to below.

<pre lang="xml">
<configsections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true"/>
</configsections>
<dataconfiguration defaultdatabase="MYDB">
</dataconfiguration>
<connectionstrings>
<add name="MYDB" connectionstring="Data source=MYDBSOURCE;User Id=MYDBUSER;Password=MYDBPWD;Integrated Security=true;" providername="System.Data.OracleClient" />
</connectionstrings>

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</pre></pre>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900