We have a user that has reported the following error when starting up
our client application that uses a web service on our back end:
System.Configuration.ConfigurationException: Missing required Web
Services section of the Web.config file.
at
System.Web.Services.Configuration.WebServicesConfiguration.get_Current()
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
This is in the call to instantiate the web services proxy on the client
side, which has a class declaration like the following (this is just to
show you it's the standard web service in a client):
public class MyWebService :
System.Web.Services.Protocols.SoapHttpClientProtocol
>From what I can tell, the user has .Net 2.0 (we compile with 1.0) and
in 2.0, the client has the ability to choose to use Soap 1.1 or Soap
1.2 and it goes to the web.config file to figure this out. In the
web.config file that comes with .Net 2.0, there is no webservices
section and I think that is why we get this error.
I added a web services section to a copy of the web.config file and
placed it in our "program files" application startup directory, but
still get the missing required section error. What I added to the
web.config file is the following:
<webServices >
<protocols>
<remove name="HttpSoap12"/>
</protocols>
</webServices>
Any ideas or suggestions?
Thanks,
Ken
John Saunders - 08 Nov 2006 01:22 GMT
> We have a user that has reported the following error when starting up
> our client application that uses a web service on our back end:
[quoted text clipped - 24 lines]
> still get the missing required section error. What I added to the
> web.config file is the following:
Is your client application a web application? If not, it won't be using
web.config.
If the application is named C:\program files\something\foo.exe, then you
need a C:\program files\something\foo.exe.config.
John
seriouslynonamesleft - 05 Jan 2007 16:21 GMT
Did you ever find a work-around for this? I'm having the exact same
problem. What did you add to your app.config in order to mimic the
presence of a web.config with a services section? I've tried just
cutting and pasting the "system.web" section from the web.config into
the app.config but that didn't work. I must be missing something but I
don't know what.
> > We have a user that has reported the following error when starting up
> > our client application that uses a web service on our back end:
[quoted text clipped - 32 lines]
>
> John