How can I check third-party components that is property installed before the web page start in web.config. And throw error before start.
A:
Find something about the component that your code can test, then have the code test it. Best place for testing it would probably be the Application_Start event handler in global.asax.
What to test depends on what kind of component you are talking about. You could use reflection to attempt to locate information about a known assembly if the component is a compiled assembly referenced by your application, or you could use System.IO to check a physical file on the file system that should exist. You could possibly even call a constructor on some object from the component and verify that it instantiates correctly.
Stephen M. Redd
2010-01-12 10:03:01