locked
Problems redirecting the proxy RRS feed

  • Question

  • Hi all, i have a proxy reference to a ASP.NET webservice. The reference was created by VS 2005 update web reference, now the problem is that i need in runtime to change the web address of that service, i already try to change the property URL of the reference  to webservice and doesn't work, i  configured  the URL Behavior (in VS 2005) to dynamic, i'm missing something ???

    The configuration that i need to do is diferente in wcf ?

    I can see that the project that have the webreference insert in app.config the url, and that is used when i create a instance of that reference, do i need to change that too ?

    By the way there is possible to configure the timeout of the request ? Like i only want to wait about 10 seconds for the response of a request to that webservice (the default is 1 minute).


    Thanks in advance!
    Thursday, September 13, 2007 9:42 AM

Answers

  •  

    For WCF, you can either specify the URL in a config file or when the proxy is created in the CreateChannel() call.   In WCF, all timeouts are easily configurable either through config or by setting the timeout properties on bindings.

     

    For  ASP.NET Web Services,  the URL and Timeout properties on a WebClientProtocol based proxy should change the address and timeout used  for the web services call.   If that doesn't work for you, go ahead and post your client code.

    Thursday, September 20, 2007 3:46 PM
  •  

    By the way, the difference between dynamic and static URL behaviors is that one reads the URL from a config file,the other uses a hard coded value.   In either case, you can override the URL used with the URL property.
    Thursday, September 20, 2007 3:50 PM

All replies

  •  

    For WCF, you can either specify the URL in a config file or when the proxy is created in the CreateChannel() call.   In WCF, all timeouts are easily configurable either through config or by setting the timeout properties on bindings.

     

    For  ASP.NET Web Services,  the URL and Timeout properties on a WebClientProtocol based proxy should change the address and timeout used  for the web services call.   If that doesn't work for you, go ahead and post your client code.

    Thursday, September 20, 2007 3:46 PM
  •  

    By the way, the difference between dynamic and static URL behaviors is that one reads the URL from a config file,the other uses a hard coded value.   In either case, you can override the URL used with the URL property.
    Thursday, September 20, 2007 3:50 PM
  • The URL property worked out, i had a problem passing the reference by copy Tongue Tied and i was changing the copy not the real object hehehehe, sory Smile

    Thanks Martin, now i understand the static and dynamic URL Wink
    Friday, September 21, 2007 9:09 AM