Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

Unable to read values from owstimer.exe config file in sharepoint timerjob execute method

$
0
0

Hi,

I'm getting an empty value while reading the owstimer.exe.config file from the execute method.

i tried both the codes below to read the value from Owstimer,

In Execute method:

string str1=ConfigurationSettings.AppSettings["URl"]

string str2=ConfigurationManager.AppSettings["URl"]

In Owstimer.exe:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
  </runtime>
<appSettings>
 <add key="URl" value="MyUrl"/>
</appSettings>
</configuration>

But i'm getting an empty value.

Any Idea ? 

Regards,

Sandhya M


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>