Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SharePoint > SharePoint 2010 > BOOK: Beginning SharePoint 2010 Development
Password Reminder
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 Search this Thread Display Modes
  #1 (permalink)  
Old July 14th, 2010, 02:20 PM
Registered User
 
Join Date: Jun 2003
Location: Houston, Texas, USA.
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.
Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
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.
Reply With Quote
  #4 (permalink)  
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)!
Reply With Quote
  #5 (permalink)  
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 :)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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



All times are GMT -4. The time now is 10:43 PM.


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