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\mac hine.confi g 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|fa lse]" - 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=b77a5c56193 4e089"
/>
-->
</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\F ramework\v 1.1.4322\g acutil -i COMTEST3.dll
C:\WINDOWS\Microsoft.NET\F ramework\v 1.1.4322\r egasm /tlb:COMTEST3.tlb COMTEST3.dll
Is there a problem compiling the dll locally?
Thanks!
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\
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|fa
proxyaddress="[string]" - A Uri string of the proxy server to use.
bypassonlocal="[true|false
-->
<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,
/>
-->
</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\F
C:\WINDOWS\Microsoft.NET\F
Is there a problem compiling the dll locally?
Thanks!
ASKER
Many of the links seem to hint toward a permissions issue on the following registry key:
HKCU\Software\Microsoft\Wi ndows\Cur rentVersio n\Internet
Settings\Connections
I gave "Everyone" read access to that key and it did not solve the problem.
HKCU\Software\Microsoft\Wi
Settings\Connections
I gave "Everyone" read access to that key and it did not solve the problem.
ASKER
Figured it out - updated the default proxy element in machine.config to:
<defaultProxy>
<proxy
usesystemdefault="false"
proxyaddress=""
bypassonlocal="true"
/>
</defaultProxy>
<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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.google.com/search?q=%22Exception+in+configuration+section+handler%22
http://groups-beta.google.com/groups?q=%22Exception%20in%20configuration%20section%20handler%22
Michel