Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

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
 
Old April 5th, 2013, 03:57 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default WCF problem

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.
 
Old April 5th, 2013, 05:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 5th, 2013, 06:03 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Follow up

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?
 
Old April 5th, 2013, 06:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
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.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 5th, 2013, 06:56 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Imar View Post
Indeed; that's how it should work, and how it works for me.

Imar
Unfortunately it is not working for me right now. I don't know why.
 
Old April 5th, 2013, 07:40 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Okay I finally figured it out.

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#.





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is WCF, WPF? vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 28th, 2014 12:12 PM
What is WCF, WPF? vbboyd ASP.NET 4 General Discussion 0 April 26th, 2012 11:47 AM
wcf help!!! marino .NET Framework 3.5 0 March 24th, 2010 11:37 AM
WCF yangqingyue1985 C# 0 July 28th, 2008 02:17 AM
WCF endpoint error when wrapping WCF service with jdawg1979 Visual Studio 2008 0 July 8th, 2008 11:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.