0
votes

We have a legacy asp web application which needs to consume a .net dll that I have written, I have created a com wrapper for this which works however in the .net code I am using

ConfigurationManager.Connectionstrings[].ConnectionString

to get the connection string for the database it would appear that getting the setting from the config file fails when the dll is being called from the classic asp application.

In the wrapper I have created a GetConnectionString() method, when I call this from classic asp I get a null reference exception.

I don't really want to hard code the connection strings, this dll is deployed to several environments and I don't want to have to have a different build of the component on each one just to change the connection string.

Any help appreciated.

1

1 Answers

0
votes

The way that we resolved this was to pass the connection string into the wrapper from the calling application. We extended the wrapper to expose an initialise method which accepted the string and passed it down into the .net component that we were wrapping up for use in classic asp.