locked
Web service works in a browser but not in an application RRS feed

  • Question

  • User637170214 posted

    Hello

    Any ideas why a web service would run successfully within Internet Explorer but, in certain circumstances, not in a Windows application?

    I have a Windows application and chose to implement any database access code through a web service. My application works everywhere other than schools.  What is confusing me is that I can successfully run my web services, on a schools PC, through Internet explorer but not through a Windows application (as well as the main application, I have written a test application which enables me to call individual web methods).

    The web service is installed on a DMZ server.  The IP address has been added to the no authentication exceptions.

    Our only thought is whether the communication goes through a different port, whether the web service is being called from the browser or an application?

    The error is a 407 proxy authentication error.  My test application enables us to try the default credentials or specify credentials, both for the web service and a proxy.  No permutation appears to work.

    Any suggestions?

    Thanks

    Friday, May 17, 2013 6:21 AM

Answers

  • User-1225287840 posted

    Have you tried setting up defaultProxy in your app.config file?

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.net>
        <defaultProxy useDefaultCredentials="true" />
      </system.net>
    </configuration>

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 20, 2013 12:35 PM

All replies

  • User970350993 posted

    Hi

    Have you hosted the webservice some where ? If yes then you can consume in window application and using proxy of that sevice, you can call the exact method. I hope the process for consuming webservice in window and web is very much similar.

    Please read this thread, it is similar to your problem

    http://stackoverflow.com/questions/8723545/wcf-client-407-proxy-authentication-required-while-running-webservice

    Sunday, May 19, 2013 7:27 AM
  • User637170214 posted

    Hello

    as I said before the web service has been deployed to our dmz server.  If I run the application at any location, other than schools, it works fine.

     

    It's only at a schools location that it fails.  However, I can view and execute the web service methods, at a school, through Internet Explorer.

     

    Thanks

    Monday, May 20, 2013 11:36 AM
  • User-1225287840 posted

    Have you tried setting up defaultProxy in your app.config file?

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.net>
        <defaultProxy useDefaultCredentials="true" />
      </system.net>
    </configuration>

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 20, 2013 12:35 PM