Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Credentials

Credentials

Scheduled Pinned Locked Moved ASP.NET
sharepointsysadminsecuritydebugginghelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    troels_sorensen
    wrote on last edited by
    #1

    Hi. I'm trying do do some communication between CMS and Sharepoint portal server 2003. my code looks like this. --------------- HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(myURL); CredentialCache wrCache = new CredentialCache(); wrCache.Add(new Uri(myURL),"NTLM", (NetworkCredential)CredentialCache.DefaultCredentials); wr.PreAuthenticate = true; wr.Credentials = wrCache; WebResponse wrsp; try { wrsp = wr.GetResponse(); } catch(Exception ex) { throw new Exception("Error during call to provider:\n" + ex.Message); } ------------------ both servers are set up with only integrated authentication. the user wich is logged on has access o both servers. there is no double hop in the call. Still i get a 401 unauthorized access from the call. I also tried just using the defaultCredentials without making a new credentialcache.got the same result. if i hardcode a username, password and domain into a new credentialcache, it works. If i place a breakpoint and look at the contens of the defaultcredentials, the username is blank. Is this normal?:confused: if i hardcode a new credentialcache the username is not blank. Any ideas?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups