In ASP.NET is there any way to programatically resolve the path to a loaded HttpHandler as it is defined in the Web.config? (i.e. SomeModule.axd)?
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.
If I understand the question correctly, you want to fetch the path from web.config right?
If so, what you are probably looking for is something like this:
The trick here is the if statement. Handlers in web.config don’t have friendly “names” you can use as a key. All they have are types (which can be ugly strings), paths, and the verb. To locate the specific handler you are interested in you might have to search within the handler’s type or path for a known substring that identifies the specific handler you are interested in finding.