Asp – SubSonic ActiveRecord in HttpHandler (Where does the connection string belong?)

asp.netsubsonic

I am using SubSonic 3.0.0.3 (the ActiveRecord approach) in an HttpHandler that I have in its own library. For it to work in the end, I have to have the connection string in the website's web.config instead of the class library's app.config. Is this the expected result or a bug?

Best Answer

The only config that gets picked up is the execution environment's configuration - storing this in the class lib won't work - for any config setting.

You can override our template behavior by sending in a connection string using ProviderFactory (as above).