Link to home
Start Free TrialLog in
Avatar of knewbranch
knewbranch

asked on

Error Calling Web Service from COM Callable Wrapper

I created a COM Callable Wrapper in VB.net. Within the COM Class, there are 2 public functions:
1. Test() - merely returns a hard-coded string so I can verify connectivity.
2. GetAccountStatus() - Makes a function call to a web service outside my company's network.

I am instantiating the COM object from an ASP page sitting on a Windows 2003 server.  When I call function Test(), it works properly and returns the expected string to the asp page. When I call GetAccountStatus(), I get the following error:

Error. Description: Exception in configuration section handler (c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config line 91)

The section of code beginning at line 91 of my config file is:
        <defaultProxy>

            <!--
                The following entry enables reading of the per user (LAN) Internet settings.
                Adding additional proxy settings, without first setting to "false",
                will individually override. Note that "Automatic configuration" and
                "automatic configuration scripts" cannot be read.
               
                <proxy> settings:
                    usesystemdefault="[true|false]" - Read settings from Internet Options (see above)
                    proxyaddress="[string]" - A Uri string of the proxy server to use.
                    bypassonlocal="[true|false]" - Enables bypassing of the proxy for local resources.
             -->

            <proxy
                usesystemdefault="true"
            />

            <!-- use this section to disable proxy use for matching servers
                example:
            <bypasslist>
                <add address="bypassRegexString" />
            </bypasslist>
            -->                  

            <!-- use this section to override proxy settings with your own IWebProxy implementation
                example:
            <module
                type="System.Net.WebProxy, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            />
            -->                  

        </defaultProxy>

Any ideas as to what is causing the problem? I am able to make the calls to the web service from a windows application, but can't seem to do it from the COM object.

To compile the COM object, I do the following:
1. Build the dll locally on my machine within VSS.
2. Copy the dll to the server and run a batch file with the following commands:
          C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil -i COMTEST3.dll
          C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\regasm /tlb:COMTEST3.tlb COMTEST3.dll

Is there a problem compiling the dll locally?

Thanks!
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Avatar of knewbranch
knewbranch

ASKER

Many of the links seem to hint toward a permissions issue on the following registry key:
HKCU\Software\Microsoft\Window­s\CurrentVersion\Internet
Settings\Connections

I gave "Everyone" read access to that key and it did not solve the problem.
Figured it out - updated the default proxy element in machine.config to:

<defaultProxy>
<proxy
usesystemdefault="false"
proxyaddress=""
bypassonlocal="true"
/>
</defaultProxy>
Excellent..

Post a question in community support
https://www.experts-exchange.com/Community_Support/
asking for this to be PAQ'd and refunded

Thanks
Michel
ASKER CERTIFIED SOLUTION
Avatar of OzzMod
OzzMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial