December 12, 2005 at 4:46 pm
Hi,
I am using a custom assembly. My assembly has to read a particular file and take some values from it. I set the required permissions and everything works good. However I dont want to hardcode the location of my text file. I decided to put the text file in the same location as dll file i.e in ..\Program Files\Reporting Services\ReportServer\bin folder and thought of finding the path in my class library using something like
String pathval=System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
But this method always gives me #Error in my report expression. I also tried by removing all other code and just returning the path. Also if I try to return System.Reflection.Assembly.GetExecutingAssembly().FullName; it works good. I am totally confused as how one property will work and another one does not. Is there anything I am missing like setting some reference or changing some permission etc.
All I would like to know is the location of the dll i.e windows path(C:\Program Files\Reporting Services\ReportServer\bin) using c# code.
Any help is appreciated.
Thanks and Regards,
SrideviSriraman
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy