views:

28

answers:

1

I have a classic ASP website (yes they still exist) that needs to call a .NET DLL registered for COM interop.

A simple VBScript test indicates the component is properly installed.

When the .asp page runs, it creates the component properly, but when a method is called there's an application-specific error message that leads me to believe that the web.config isn't being found/processed.

Specifically (though probably not that pertinent to the answer), I get

Specified argument was out of the range of valid values. Parameter name: Policy 'ClientPolicy' is not configured in the system

when the .NET component in turn makes a web service call using WSE3. Web.config includes an appropriate policy file with a line like:

<policy fileName="PolicyFile.config"/>

I think the problem is whether web.config is read at all when a classic ASP page is processed and in turn invokes a .NET DLL that needs a .config file, if so how that config file should be named and where it should be located, and if not, how can configuration information be provided.

Complicating the question slightly is whether the external configuration file referenced by the WSE3 configuration should be located in the same directory.

A: 

I don't think you can set up an out-of-the-box config file for classic ASP, and it's really difficult to create a config file for a DLL (which is what your COM component is, essentially). Your best bet is to either configure the machine.config, or roll your own configuration file reader.

Edit: or store information in the global.asa, and have that get passed to the .NET component.

bryanjonker
Hmmm machine.config sounds like it might be viable in this situation. I'll check that route. The thing that's not getting it's configuration info is really WSE3, so a custom config provider won't help.
Eric J.

related questions