Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SharePoint > SharePoint 2010 > BOOK: Beginning SharePoint 2010 Development
|
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 July 14th, 2010, 02:20 PM
Registered User
 
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error with Chapter 2 Src code for WPF that uses Lists.asmx

The call to:

Code:
XmlNode myListView = myListService.GetListAndView("Customers", "");
(page 56)

causes a permissions exception. Since the code uses CredentialCache.DefautlCredentials, I tried changing it out with = new NetworkCredential(uname, pass, domain);

This didn't work either. Just to check myself, I unzipped the src code for the book and plugged in my server name and fired it up. It also gave the same exception.

Any guidance would be greatly appreciated.
 
Old July 15th, 2010, 03:09 AM
Registered User
 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run as Administrator

Try to run VS as an administrator.
 
Old January 18th, 2011, 10:03 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Still an issue

Reopened the project as ADMINISTRATOR .... Still an issue ^&%&^%

Thanks for the suggestion though.

Cant believe that there are so many on the first project

Thanks.
 
Old February 11th, 2011, 12:24 PM
Registered User
 
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Possible solution to Error with Chapter 2 Src Code WPF

If you followed the book word for word, you probably created your "Customers" list inside of a site called "sprocks", so try changing your
Code:
myListService.Url = "http://<your server name>/_vti_bin/Lists.asmx";
to
Code:
myListService.Url = "http://<your server name>/sprocks/_vti_bin/Lists.asmx";
Or use whatever site name you used....


That's what got it working for me (with a little help from some individuals where I work)!
 
Old April 28th, 2011, 02:47 AM
Registered User
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Try this out

Try this out :


myListService.UseDefaultCredentials = true;
myListService.Credentials = System.Net.CredentialCache.DefaultCredentials;

Hope it works for you :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
WPF basics Chapter 6 mhccStudent BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 8 May 12th, 2010 07:37 AM
Chapter 7 - WPF Text Editor - pg 236 Crissytenav BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 2 April 14th, 2010 10:38 AM
Importing Src Code into Netbeans 6 ecarballo BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 1 April 23rd, 2008 11:05 PM
chapter 7 js error when changing image src grom BOOK: Beginning Ajax with ASP.NET 1 January 3rd, 2008 12:41 PM
chapter2-src\src\ch02\sample5 _ need help M7777777bill BOOK: Professional Java Development with the Spring Framework 0 June 14th, 2006 10:00 PM





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