locked
Problem consuming web services: Error creating the web proxy specified in the 'system.net/defaultproxy' configuration section.

    Question

  • Hi all

    I'm having the following problem when my app (let's call it 'application B') consumes any web service in a Windows Vista client:

    The 'application B' launch the following error when executing a web service:

    'Error creating the web proxy specified in the 'system.net/defaultproxy' configuration section.'

     

    This error just appears when I launch the 'application B' from another 'application A'. The 'application A' is VB6, while 'application B' is .NET 2.0.

    If I launch the 'application B' from a Windows Explorer normally, the 'application B' can consume web services normally without any error.

    Also the application runs well in the first case (launching from the application A) in other system scenarios (Windows XP, 7, and also other Win Vista)

    The problematic Windows Vista system has Windows Firewall disabled as well any other protection system (antivirus, UAC..)

    I tried to set a FullTrust permissions to framework through Caspol.exe, but nothing happened.

     

    Any idea of what can be the source of the problem?.

    Thanks in advance.

    Here's the stacktrace:

    Error creating the web proxy specified in the 'system.net/defaultproxy' configuration section.

    en System.Net.Configuration.DefaultProxySectionInternal.GetSection()
       en System.Net.WebRequest.get_InternalDefaultWebProxy()
       en System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
       en System.Net.HttpRequestCreator.Create(Uri Uri)
       en System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
       en System.Net.WebRequest.Create(Uri requestUri)
       en System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
       en System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
       en System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
       en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       en MyObjectWs.ExecuteWebService(String datos)

    Friday, December 17, 2010 12:33 PM

Answers

  • First of all, this has almost nothing to do with web services, per se.

    However, I'll suggest that you look at how the VB6 application is launching your application. In particular, is it launching from the same folder that you're using when launching from Windows Explorer? This error suggests you've got a bad application.config file when you're launching from VB6.

     


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    • Marked as answer by Borja Serrano Thursday, December 23, 2010 8:35 AM
    Monday, December 20, 2010 8:50 PM
    Moderator

All replies

  • I forgot to mention, the problem occurs when the 'Application A' starts any .NET application and this tries to connect to internet, not just the 'Application B'. When I start any .NET application by Windows Explorer all is ok.
    Monday, December 20, 2010 9:41 AM
  • First of all, this has almost nothing to do with web services, per se.

    However, I'll suggest that you look at how the VB6 application is launching your application. In particular, is it launching from the same folder that you're using when launching from Windows Explorer? This error suggests you've got a bad application.config file when you're launching from VB6.

     


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    • Marked as answer by Borja Serrano Thursday, December 23, 2010 8:35 AM
    Monday, December 20, 2010 8:50 PM
    Moderator
  • Hi John

    Finally problem was solved. The issue was related probably to a third-party software that probably was causing the problems running the application in the system drive of the server. Moving the application to another drive solved the problem. This may occurs due to some security restrictions of the manufacturer server software.

     

    Thanks for reply.

    Thursday, December 23, 2010 8:43 AM