all groups > dotnet sdk > august 2004 >
You're in the

dotnet sdk

group:

Identifying "System" assemblies in a stack trace


Identifying "System" assemblies in a stack trace Gopalakrishnan N.T via .NET 247
8/11/2004 4:59:03 AM
dotnet sdk:
Hi,

I am using the StackTrace class to loop through the entire stack=
trace of my application=2E I am doing this to check my calling=
assemblies for some security purposes=2E But I have a problem now=2E=
I don't want to check on "system" assemblies (like=
System=2EWindows=2EForms, etc=2E)=2E I have to stop looping through the=
stack trace the moment I enter into the "system" area=2E And I=
don't want to check by name (like checking for assemblies=
starting with "system=2E"), as this would also mean a kind of=
security risk=2E Is there any other reliable way that I can=
differentiate between "system" assemblies and other assemblies=
on the stack trace?

Thanks and Regards,
N=2ET=2EGopalakrishnan

-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)

Re: Identifying "System" assemblies in a stack trace Andriy Gnennyy
8/23/2004 9:28:44 AM
Hi,
You could check the assembly public key token (using
AssemblyName.GetPublicKeyToken method).
In this case, you will be able to compare the token value to well-known ECMA
and Microsoft tokens.
--
Andriy Gnennyy
pulsar2003@{no-spam}email.ru (Please remove {no-spam} for reply)
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx


[quoted text, click to view]
Hi,

I am using the StackTrace class to loop through the entire stack trace of my
application. I am doing this to check my calling assemblies for some
security purposes. But I have a problem now. I don't want to check on
"system" assemblies (like System.Windows.Forms, etc.). I have to stop
looping through the stack trace the moment I enter into the "system" area.
And I don't want to check by name (like checking for assemblies starting
with "system."), as this would also mean a kind of security risk. Is there
any other reliable way that I can differentiate between "system" assemblies
and other assemblies on the stack trace?

Thanks and Regards,
N.T.Gopalakrishnan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>A9mx2FmF9UKEW+lfLgOpPw==</Id>

AddThis Social Bookmark Button