The problem is NOT that my WebService uses SOAP 1.2 (all .asmx web services do by default). The problem is that the tools are creating a custom binding that is not necessary and improper. If Silverlight can't support SOAP 1.2 (which is ridiculous honestly)
then the tools should not be creating this binding. Also, SL should ignore any bindings it doesn't know about. Causing a crash is not proper behavior! The XAML parser has a long way to go in this regard. No legal XML should cause a crash.
I do use WCF for application specific Web Services. However this Web Service is for consumption outside my department (SaaS) as well, and works much better as an ASMX service (I can't disable Soap 1.2 because other departments are using it). The lack of
proper auto-documentation pages with WCF (and its .NET-centric world view) is a real shortfall and will keep us using ASMX for the foreseeable future. The other problem with WCF is deploy-ability. We have load-balanced servers and deploying WCF services to
them is a real pain because you have to use host headers which are anything but trivial to use when SSL is a requirement. In short, I do use WCF, but WCF has a long ways to go before it will supplant ASMX for many purposes.
There is a real problem here, and it needs to be fixed.
In Beta 2, When I create a new WCF Service Reference in my Silverlight Application, the ServiceReferences.ClientConfig that Visual Studio generates for me references a wsHttpBinding, which is not supported in Silverlight. Replacing instances of the tag name
<wsHttpBinding> with <basicHttpBinding> does not correct the issue.
I agree that this is an insipid little bug that should be addressed. Visual Studio should generate a reference that is compatible with Silverlight 2 when adding a Service Reference in Silverlight 2.
Some day I'll be able to answer more questions than I ask.
I had a similar issue recently, though I was using a WCF service, not ASMX. I got past the error by deleting the ServiceReferences.ClientConfig file, then removing the service reference. When I readded the service reference, it created a new ClientConfig
file without the errors. Also, make sure the web.config is using basicHttpBinding, not wsHttpBinding which it will use by default.
CoderX
Member
178 Points
96 Posts
Re: Re: Re: Re: Web Services: ConfigUnrecognizedElement error
Jun 17, 2008 06:25 PM | LINK
The problem is NOT that my WebService uses SOAP 1.2 (all .asmx web services do by default). The problem is that the tools are creating a custom binding that is not necessary and improper. If Silverlight can't support SOAP 1.2 (which is ridiculous honestly) then the tools should not be creating this binding. Also, SL should ignore any bindings it doesn't know about. Causing a crash is not proper behavior! The XAML parser has a long way to go in this regard. No legal XML should cause a crash.
I do use WCF for application specific Web Services. However this Web Service is for consumption outside my department (SaaS) as well, and works much better as an ASMX service (I can't disable Soap 1.2 because other departments are using it). The lack of proper auto-documentation pages with WCF (and its .NET-centric world view) is a real shortfall and will keep us using ASMX for the foreseeable future. The other problem with WCF is deploy-ability. We have load-balanced servers and deploying WCF services to them is a real pain because you have to use host headers which are anything but trivial to use when SSL is a requirement. In short, I do use WCF, but WCF has a long ways to go before it will supplant ASMX for many purposes.
There is a real problem here, and it needs to be fixed.
Dimebrain
Member
23 Points
22 Posts
Re: Re: Web Services: ConfigUnrecognizedElement error
Jun 30, 2008 01:34 PM | LINK
Echoing CoderX,
In Beta 2, When I create a new WCF Service Reference in my Silverlight Application, the ServiceReferences.ClientConfig that Visual Studio generates for me references a wsHttpBinding, which is not supported in Silverlight. Replacing instances of the tag name <wsHttpBinding> with <basicHttpBinding> does not correct the issue.
I agree that this is an insipid little bug that should be addressed. Visual Studio should generate a reference that is compatible with Silverlight 2 when adding a Service Reference in Silverlight 2.
will.barns
Member
2 Points
1 Post
Re: Re: Web Services: ConfigUnrecognizedElement error
Jun 30, 2008 11:19 PM | LINK
Is there an official fix for this yet? Thanks.
TWallace
Member
10 Points
5 Posts
Re: Re: Web Services: ConfigUnrecognizedElement error
Jul 30, 2008 07:14 PM | LINK
I had a similar issue recently, though I was using a WCF service, not ASMX. I got past the error by deleting the ServiceReferences.ClientConfig file, then removing the service reference. When I readded the service reference, it created a new ClientConfig file without the errors. Also, make sure the web.config is using basicHttpBinding, not wsHttpBinding which it will use by default.
gregory.douguet
Member
12 Points
1 Post
Re: Web Services: ConfigUnrecognizedElement error
Aug 05, 2008 10:03 AM | LINK
Hi,
My first post here !
The simplest way to fix that is to modify the definition section of your WCF Service in your Web.Config.
It should work,
Greg
silverlight wcf binding wsHttpBinding basicHttpBinding instanciate service
rvanderkooy
Member
68 Points
111 Posts
Re: Re: Web Services: ConfigUnrecognizedElement error
Aug 25, 2008 03:32 PM | LINK
Greg,
Software Engineer
rvanderkooy
Member
68 Points
111 Posts
Re: Re: Web Services: ConfigUnrecognizedElement error
Aug 25, 2008 03:32 PM | LINK
Greg,
your solution totally works. you prevented me from pulling my hair out! thanks!
Software Engineer
rvanderkooy
Member
68 Points
111 Posts
Re: Re: Web Services: ConfigUnrecognizedElement error
Aug 25, 2008 03:32 PM | LINK
Greg,
Software Engineer
HarjinderSil...
Member
12 Points
6 Posts
Re: Web Services: ConfigUnrecognizedElement error
Sep 10, 2008 01:12 PM | LINK
Thanks Greg
Its really owesome. Its working for me.