Wrox Programmer Forums
|
BOOK: Beginning SharePoint 2010 Development
This is the forum to discuss the Wrox book Beginning SharePoint 2010 Development by Steve Fox; ISBN: 978-0-470-58463-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning SharePoint 2010 Development 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 August 13th, 2010, 01:34 PM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2 - WPFSPListApp

I got the following error:

"Exception of type Microsoft.SharePoint.SoapServer.SoapServerExceptio n was thrown."

at the following line of code:

XmlNode myListView = WPFSPListApp.zip

in project WPFSPListApp

I download and run the source code, same problem happen

Any help would be appreciated.
 
Old October 15th, 2010, 09:22 AM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi


Me 2. I am running against Foundation on localhost:8081. I will try and catch the SoapException to see if there is a message..I take it there is You've not had a resolution on this yet

I have found a couple of mistakes in the book already.


Regards


Daniel
 
Old October 17th, 2010, 06:45 AM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default The fix is known ... here it is

Essentially, we need to the following before making the

myListService.UseDefaultCredentials = true;
myListService.PreAuthenticate = true;

myListService.Url = "http://[YOUR SERVER]/_vti_bin/Lists.asmx";


http://blogs.msdn.com/b/steve_fox/ar...exception.aspx
The Following User Says Thank You to westerdaled For This Useful Post:
SharePoint Stacy (November 15th, 2013)
 
Old January 18th, 2011, 09:49 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default No resolution yet. Still same error

I applied the fix using:
myListService.UseDefaultCredentials = true;
myListService.PreAuthenticate = true;

but I still keep getting the error:
SoapException was unhandled
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerExcepti on'

The error is on line:
XmlNode myListView = myListService.GetListAndView("Customers", "");

Did anyone run into this issue??

Also, on the code provided in the ZIP download the reference to:
using System.Xml;
using System.Xml.Linq;

is missing but is mentioned in the book on page 86

This is really frustrating to hit so many errors on the VERY FIRST PROJECT !!

Can anyone help.

Thanks.
 
Old January 25th, 2011, 07:12 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Cool

Hi are you still having issues? I think I got this working under sp2010 foundation.I have since set up SharePoint enterprise on my laptop which is a lot easier than the former even if it takes 3 times as long to do....I could port to this new env and retry.

Daniel
 
Old September 6th, 2011, 12:13 PM
Registered User
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default Easy Fix

Hey for anyone having this problem here is what solved it for me:

I changed the line:

myListService.Url = "http://<your server name>/_vti_bin/Lists.asmx";

to

myListService.Url =
"http://<your server name>/sites/Team/_vt_bin/Lists.asmx";

"Team" is what I called my site collection.

Just go to your list and look at the full path of that site. Then modify your URL to include the site your list is in and it should work.
The Following User Says Thank You to hpthegreat For This Useful Post:
SharePoint Stacy (November 15th, 2013)
 
Old June 20th, 2012, 09:48 AM
Registered User
 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default It worked...

Had the path wrong... but I got it working. Thanks for the tip.
 
Old March 3rd, 2013, 11:16 PM
Registered User
 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Chapter 2 : Web Exception was unhandled

hello

I have read through the posts here and fixed the SOAP issue, however now i am having a "Web Exception is unhandled ; The request failed with HTTP status 404: Not Found". I am new to this book and programming in VS so i am not familar with all the lingo. I tried to find out what this error means but not much luck. Any help will be appreciated.

Here is my code. It should be exactly like the book.

Code:
WPFSPListApp.MySPWebService.Lists myListService = new MySPWebService.Lists();
           
                myListService.Credentials = System.Net.CredentialCache.DefaultCredentials;
                myListService.UseDefaultCredentials = true;
                myListService.PreAuthenticate = true;

            myListService.Url = "http://servername/sites/BegSP/_vti_bin/Lists.asmx";

            XmlNode myListView = myListService.GetListAndView("Customers","");
            strListID = myListView.ChildNodes[0].Attributes["Name"].Value;
            strViewID = myListView.ChildNodes[1].Attributes["Name"].Value;
-jim
 
Old May 3rd, 2013, 03:58 AM
Registered User
 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 code not building.

When I attempt to build the solution, I get an error in the "ThisAddIn" class at the line
Code:
 ctp = this.CustomTaskPanes.Add(ctrl, ctrlTitle);
. The error is a type cast error can not convert from Systems.Windows.Control to Systems.Windows.Forms.Control error. Does anyone have any suggestions. I have tried dot net 3.5/4.0 and still the error. In dot net 3.5, the xaml library does not exist, but in the 4.0 it does but throws this error.
 
Old November 15th, 2013, 09:49 PM
Registered User
 
Join Date: Nov 2013
Posts: 2
Thanks: 3
Thanked 1 Time in 1 Post
Thumbs up Two things that fixed it

Add the System.Xml namespace and the System.Xml.Linq

Remove line one - - > myListService.URL = "http.... then your build will run with 0 errors 0 warnings and 0 Messages

Use Westerdaled's advice from the blog post, on commenting out

///+ myListService.Credentials = System.Net.CredentialCache.DefaultCredentials; +/


and then adding these two lines


myListService.UseDefaultCredentials = true;

myListService.PreAuthenticate = true;

along with HP's advice on using the correct path all the way into the sub site,

so http://2010app1/sites/team/how?_vti_bin/Lists.asmx

and not http://2010app1/_vti_...

did the trick thanks again

Last edited by SharePoint Stacy; November 16th, 2013 at 09:20 AM.. Reason: Not urls and add text





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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