System.Diagnostics.
StackFrame sf = new System.Diagnostics.StackTrace().GetFrame(2);string programName = sf.GetMethod().ReflectedType.Module.Name;
This code would give me 'programName.dll'. Now when I call the assembly from a web app I get 'App_Web_randomString.dll'.
I need a way to get the meaningful name of the web application that called the assembly. It doesnt have to be 'programName.dll', I just need someway to identify what program called this assembly.
Any help would be appreciated.
Thanks.
Replies
Know the answer? Post it — somebody with the same question will find it here.