how to differentiate whether a managed library is running in the context of asp.net application or in a executable?
how to differentiate whether a managed library is running in the context of asp.net
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could check whether
HttpContext.Currentreturnsnullor not.Technically, it’ll also return
nullin an ASP.NET application if it’s running on a non-worker thread (i.e. if you just gonew Thread(SomeProc)) but it should work 99% of the time.