TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amazonpup
NA
4
0
I am looking for a way to get the calling programs name form the called assembly...any ideas?
Jun 13 2006 5:31 PM
I have an assembly that I am using to log errors and I am working on updating it from .Net 1.1 to 2.0. In 1.1 I could use the following code to get the calling programs name:
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.
Reply
Answers (
0
)
Delegate throwing Null Exception
can not update my SQL server database from C# Application