"William LaMartin" <> wrote in message
news:%...
> In Visual Studio 2008, consuming a web service is a bit different from in
> VS 2005 in an ASP.Net project.
>
> It goes something like this
>
> Dim ds As New Data.DataSet
> Dim url As New
> System.ServiceModel.EndpointAddress("http://www.MyService.asmx")
> Dim ws As New MyService.Service1SoapClient("Service1Soap")
> ws.Endpoint.Address = url
>
> ds = ws.GetData()
>
> where GetData is a method of the service that returns a dataset.
>
> My problem is that the application runs fine from within Visual Studio,
> but when I deploy it, I will receive the error message:
>
> "Could not find endpoint element with name 'Service1Soap' and contract
> 'MyService.Service1Soap' in the ServiceModel client configuration section.
> This might be because no configuration file was found for your
> application, or because no endpoint element matching this name could be
> found in the client element. "
>
> unless I copy what is below from the web.config of the Visual Studio
> project and add it to the Web.config of the web site. I don't really like
> doing this, since I can foresee a problem if I add many applications to
> the site that use web services.
>
> Is there another way--like a configuration file that can go inside the
> application folder at the site?
No, a Web application with a Web.config is the root configuration file, and
it has to be in that config file and nowhere else, that I know about.
If you're complaining about this, wait until you see what has to be in
ASP.Net's Web.config and what must be in a WCF's Web service Web.config to
consume a WCF Web service.