EPMFAQ Forums - Connect with the EPM Community  

Go Back   EPMFAQ Forums - Connect with the EPM Community > EPMFAQ Forums > EPMFAQ Blog Posts


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-2008, 02:35 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve the Guid of a Custom Field Using its Name

Everytime I reach :

_cfDataSet = _cf.ReadCustomFields(_cfFilter.GetXml(), false);

it throws an error :
"The request failed with HTTP status 401: Unaurthorized."


I am using:
_cf.Credentials = CredentialCache.DefaultCredentials;
which logged in me with no problems.

Can someone tell me what I am doing wrong?

Thanks,
Gene








Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 05-29-2008, 03:07 AM
ssanderlin's Avatar
EPMFAQ Founder/Owner
 
Join Date: Feb 2008
Location: Quakertown, PA
Posts: 145
Thanks: 0
Thanked 11 Times in 11 Posts
Default

If you're using the same code that I posted, then the _cf.ReadCustomFields() method call is the first time you're actually trying to connect to the PSI and do anything with it -- so, you're not actually "logged in" before this point -- you've just been getting "into position", so to speak. It is possible to generate the Proxy Class from the WSDL without actually "logging in", depending on your configuration.

A few questions to start:
  1. Is your computer joined to the same domain as the server?
  2. If so, does the user account that you are logging into your computer as have a corresponding account in PWA?
  3. If so, does your user account have the necessary permissions for this method (as defined in the SDK) in Project Server (CreateNewProposalOrActivity, LogOnToProjectServerFromProjectProfessional, ManageEnterpriseCustomFields, ManageUsersAndGroups, ViewResourceCenter)?
  4. Do you have the same issue if you create a new NetworkCredential(), give it your username, password, and domain, then set it to be the credentials for the _cf Web Reference?
__________________
Stephen Sanderlin
Founder/Owner - EPMFAQ
Principal Consultant - MSProjectExperts

If you found this message useful, please click the Thanks button in the post!

This electronic message, along with any information, advice, and opinions it contains, are mine alone and are not representative of my employer. All information is provided in "GOOD FAITH" and on an "AS IS" basis only. I provide no presentations or warranties, express or implied, including implied warranties of fitness for a particular purpose, merchantability, title, and noninfringement. I strongly advise you to extensively test any changes, workarounds, or techniques described herein on a development system prior to implementation in a production environment, and you are hereby notified that I bear no responsibility whatsoever for any loss, harm, or otherwise negative outcomes resulting from your actions, whether or not said actions were a result of this electronic message, directly or indirectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-29-2008, 08:25 AM
Junior Member
 
Join Date: May 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply ... before I try and answer your questions to me ... I am going to lookup and try some things from your questions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-29-2008, 10:10 PM
ssanderlin's Avatar
EPMFAQ Founder/Owner
 
Join Date: Feb 2008
Location: Quakertown, PA
Posts: 145
Thanks: 0
Thanked 11 Times in 11 Posts
Default

Quote:
Originally Posted by CornerAnalyst View Post
Thanks for your reply ... before I try and answer your questions to me ... I am going to lookup and try some things from your questions.
Okay. Let me know how it turns out!
__________________
Stephen Sanderlin
Founder/Owner - EPMFAQ
Principal Consultant - MSProjectExperts

If you found this message useful, please click the Thanks button in the post!

This electronic message, along with any information, advice, and opinions it contains, are mine alone and are not representative of my employer. All information is provided in "GOOD FAITH" and on an "AS IS" basis only. I provide no presentations or warranties, express or implied, including implied warranties of fitness for a particular purpose, merchantability, title, and noninfringement. I strongly advise you to extensively test any changes, workarounds, or techniques described herein on a development system prior to implementation in a production environment, and you are hereby notified that I bear no responsibility whatsoever for any loss, harm, or otherwise negative outcomes resulting from your actions, whether or not said actions were a result of this electronic message, directly or indirectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -4. The time now is 11:02 PM.


Powered by: vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24