Home All Groups Group Topic Archive Search About
Author
14 Oct 2005 2:17 AM
poifull
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?

Thanks,
Joe

TIA,
poifull

Author
14 Oct 2005 2:34 AM
William DePalo [MVP VC++]
"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
Author
14 Oct 2005 4:41 AM
William DePalo [MVP VC++]
"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
Author
14 Oct 2005 5:26 AM
poifull
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
>
>
>
Author
14 Oct 2005 8:33 AM
Richard Blewett [DevelopMentor]
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
>

Surely you want the CodeBase not the Location. The codebase is the logical
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

AddThis Social Bookmark Button