|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
EvidenceIs my class library is it possible to get the calling assembly's executable
full name, or the Url if it is being linked from an ASP? Thanks, Joe TIA, poifull "poifull" <poiful***@yahoo.com> wrote in message Check the docs for Assembly.GetExecutingAssembly() which returns an assembly news:JyE3f.35434$zw5.8971@tornado.texas.rr.com... > Is my class library is it possible to get the calling assembly's > executable full name, or the Url if it is being linked from an ASP? object and the Location property which gets the location of the loaded file. Regards, Will "William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message Oops, replace GetExecutingAssembly() with GetCallingAssembly()news:e1vRGfG0FHA.1924@TK2MSFTNGP14.phx.gbl... > "poifull" <poiful***@yahoo.com> wrote in message > news:JyE3f.35434$zw5.8971@tornado.texas.rr.com... >> Is my class library is it possible to get the calling assembly's >> executable full name, or the Url if it is being linked from an ASP? > > Check the docs for Assembly.GetExecutingAssembly() which returns an > assembly object and the Location property which gets the location of the > loaded file. > > Regards, > Will Regards, Will Thanks!
Show quote "William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message news:eIYEWmH0FHA.2924@TK2MSFTNGP15.phx.gbl... > "William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message > news:e1vRGfG0FHA.1924@TK2MSFTNGP14.phx.gbl... >> "poifull" <poiful***@yahoo.com> wrote in message >> news:JyE3f.35434$zw5.8971@tornado.texas.rr.com... >>> Is my class library is it possible to get the calling assembly's >>> executable full name, or the Url if it is being linked from an ASP? >> >> Check the docs for Assembly.GetExecutingAssembly() which returns an >> assembly object and the Location property which gets the location of the >> loaded file. >> >> Regards, >> Will > > Oops, replace GetExecutingAssembly() with GetCallingAssembly() > > Regards, > Will > > >
Show quote
"William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message Surely you want the CodeBase not the Location. The codebase is the logical news:eIYEWmH0FHA.2924@TK2MSFTNGP15.phx.gbl... > "William DePalo [MVP VC++]" <willd.no.spam@mvps.org> wrote in message > news:e1vRGfG0FHA.1924@TK2MSFTNGP14.phx.gbl... >> "poifull" <poiful***@yahoo.com> wrote in message >> news:JyE3f.35434$zw5.8971@tornado.texas.rr.com... >>> Is my class library is it possible to get the calling assembly's >>> executable full name, or the Url if it is being linked from an ASP? >> >> Check the docs for Assembly.GetExecutingAssembly() which returns an >> assembly object and the Location property which gets the location of the >> loaded file. >> >> Regards, >> Will > > Oops, replace GetExecutingAssembly() with GetCallingAssembly() > > Regards, > Will > location is was loaded from not the physicaly which can be affected by shadow copying Regards Richard Blewett - DevelopMentor http://www.dotnetconsult.co.uk/weblog http://www.dotnetconsult.co.uk |
|||||||||||||||||||||||