Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
The Following User Says Thank You to westerdaled For This Useful Post:
SharePoint Stacy (November 15th, 2013)
  #4 (permalink)  
Old January 18th, 2011, 08: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.
Reply With Quote
  #5 (permalink)  
Old January 25th, 2011, 06: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
Reply With Quote
  #6 (permalink)  
Old September 6th, 2011, 12:13 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
The Following User Says Thank You to hpthegreat For This Useful Post:
SharePoint Stacy (November 15th, 2013)
  #7 (permalink)  
Old June 20th, 2012, 09:48 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #8 (permalink)  
Old March 3rd, 2013, 10:16 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #9 (permalink)  
Old May 3rd, 2013, 03:58 AM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #10 (permalink)  
Old November 15th, 2013, 08:49 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 08:20 AM. Reason: Not urls and add text
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 12:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.