i added an app.config to my custom assembly but when i try
to read keys from it i get Nothing back.
my config file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SERVER" value="j4b-web-srv6" />
<add key="DATABASE" value="GUIDEWEBLIVE" />
<add key="USER" value="sa" />
<add key="PASSWORD" value="sqldoor5" />
</appSettings>
<system.diagnostics>
<sources>
<!-- Th
<--snip-->
then i call it like so:
sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
the config file is renamed to FundTrackHelper.dll.configHi,
Did you get any error msg when trying to read the config file?
Any resources accessed throught custom assemblie of the report has to be
given proper permission in the assmblie and in the reports server config
policy file. Did you do that before accessing file?
in the assemblie you have to do something like this..
FileIOPermission FIOPermRead = new
FileIOPermission(FileIOPermissionAccess.Read, strPath);
FIOPermRead.Assert();
let me know if this helps
~Bava
"taz" wrote:
> i added an app.config to my custom assembly but when i try
> to read keys from it i get Nothing back.
> my config file looks like this:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <appSettings>
> <add key="SERVER" value="j4b-web-srv6" />
> <add key="DATABASE" value="GUIDEWEBLIVE" />
> <add key="USER" value="sa" />
> <add key="PASSWORD" value="sqldoor5" />
> </appSettings>
> <system.diagnostics>
> <sources>
> <!-- Th
> <--snip-->
> then i call it like so:
> sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
> the config file is renamed to FundTrackHelper.dll.config
>|||hi,
i didnt get any error msg, it just returns "Nothing".
i did not give it any permissions so i guess thats
what i was missing. i'll give it a try and let u know -
thanks a lot !
t.
"Bava Mani" wrote:
> Hi,
> Did you get any error msg when trying to read the config file?
> Any resources accessed throught custom assemblie of the report has to be
> given proper permission in the assmblie and in the reports server config
> policy file. Did you do that before accessing file?
> in the assemblie you have to do something like this..
> FileIOPermission FIOPermRead = new
> FileIOPermission(FileIOPermissionAccess.Read, strPath);
> FIOPermRead.Assert();
> let me know if this helps
> ~Bava
> "taz" wrote:
> >
> > i added an app.config to my custom assembly but when i try
> > to read keys from it i get Nothing back.
> >
> > my config file looks like this:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> >
> > <appSettings>
> > <add key="SERVER" value="j4b-web-srv6" />
> > <add key="DATABASE" value="GUIDEWEBLIVE" />
> > <add key="USER" value="sa" />
> > <add key="PASSWORD" value="sqldoor5" />
> > </appSettings>
> >
> > <system.diagnostics>
> > <sources>
> > <!-- Th
> >
> > <--snip-->
> >
> > then i call it like so:
> >
> > sServer = System.Configuration.ConfigurationManager.AppSettings("SERVER")
> >
> > the config file is renamed to FundTrackHelper.dll.config
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment