You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
When I try to follow the instruction listed on page 370 of your book, I get the following error message after I try to add a WCF service to project, in the form of a pop up message box in Visual Studio:
Failed to update the configuration file. The value for the property "name" is not valid. The string must be at least 1 characters long.
Is your web.config file present, valid and writable? What name are you giving to the service? Are the service files added to the project successfully? A bit more background would certainly help....
Actually I even tried using your downloaded files inside of Visual Studio 2012 project (that I created by doing Open Website and then select chapter 10 in the dialog box) and when I try to open up a different webservice with different name than the one in the book I get the same error. So I am using your code and all the files and their associated dependencies including the webconfig file that downloads from the Wrox website. Correct me if I am wrong but shouldn't be able to right click on the webservices folder in Visual Studio 2012 and then choose add new item and select AJAX Wcf Services and name it AJax and then get a AJAX.svc file put into your Visual Studio 2012 project?
Correct me if I am wrong but shouldn't be able to right click on the webservices folder in Visual Studio 2012 and then choose add new item and select AJAX Wcf Services and name it AJax and then get a AJAX.svc file put into your Visual Studio 2012 project?
Indeed; that's how it should work, and how it works for me.
I had the wrong language selected on the left hand side of the Visual Studio dialog box when I was trying to first create the AJAX WCF file. I had VB selected, when my project was actually created in C#.