I have an ASP .Net Data Access Layer dll that handles my database connections. I have another .Net dll file that uses this Data Access Layer to returns ADODB Recordsets. In the Data Access Layer class I access the configuration section of my ".config" file
to get the DB Connection string. I've created Type Libraries and added the dlls to the GAC. The problem is when I try and use this in a classic .asp file, I get an error stating that it can't find the value from the configuration section in the .config file.
I can get it to work in classic VB because I name the config file to appname.exe.config. How can I achieve the same thing when using classic asp? Where does the config file go and what is it named to since classic asp is not an application? Thanks!
I finally solved this problem. One solution I came across was to rename the .config file to "dllhost.exe.config" and put it in the "C:\Windows\System32" folder. Now this approach was not a good one since you may have multiple web applications that use different
.config files. The other solution I came across was to create an "application.manifest" file and rename my .config file to "application.config". Next I created a new COM+ package. I added a new component (my .Net Type Library file) to the COM+ package. Then
in the properties of the COM+ package, I set the "Application Root Directory" to point to my asp application folder. I wasn't concerned about renaming my .config file since the application was an asp application that used functionality in a .Net dll file.
The "application.manifest" file contents were:
hovilat
Member
15 Points
3 Posts
COM Interop and Classic ASP Configuration
Mar 26, 2004 08:08 PM|LINK
pkr
Star
9197 Points
1860 Posts
Re: COM Interop and Classic ASP Configuration
Mar 26, 2004 10:52 PM|LINK
hovilat
Member
15 Points
3 Posts
Re: COM Interop and Classic ASP Configuration
Mar 29, 2004 07:00 PM|LINK