- In the web.config file locate the XML node
within the node . For instance in the above example locate the node that describes the 'BarService'. Delete that node but leave in the file. - In the same file locate the node
with an attribute 'behaviorConfiguration' and an attribute value of 'BarService'. This node also contains the endpoints for the service. Remove this node. - Try again, and this time it should work.
Comments, how-to's, examples, tools, techniques and other material regarding .NET and related technologies.
Friday, March 20, 2009
"Failed to create a service in configuration file"
You may encounter this error message when you try to add a WCF base service to your web service project.
The additional text of this error message is:
A child element named 'service' with same key already exists at the same configuration scope. Collection elements must be unique within the same configuration scope (e.g. the same application.config file). Duplicate key value: 'FooProject.BarService'.
The cause for this error message might be that you added a service to your project with the same name previously, then deleted it again. The remnants of that deleted service prevent the new service with the same name to be created.
To resolve the problem do this:
Labels:
Technology
Subscribe to:
Post Comments (Atom)
2 comments:
Thanks for the info. It really helped me to solve the problem. BTW this was the only reference about the subject that I found on google
Thank you, that solved my issue.
Post a Comment
All comments, questions and other feedback is much appreciated. Thank you!