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. CredentialCache.DefaultCredentials always empty?

CredentialCache.DefaultCredentials always empty?

Scheduled Pinned Locked Moved ASP.NET
csharpwcfquestion
4 Posts 2 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.
  • L Offline
    L Offline
    laserbaronen
    wrote on last edited by
    #1

    Hi! I'm trying to set the clientcredentials of a wcf-proxy to CredentialCache.DefaultCredentials, but it seems to be empty for some mysterious reason. I have the following code in my web.config:

    Any ideas why DefaultCredentials is empty?


    betonglasermur.FeedDwarf(pur_is, 17);
    ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

    Morgonen är tröttmans mecka

    A 1 Reply Last reply
    0
    • L laserbaronen

      Hi! I'm trying to set the clientcredentials of a wcf-proxy to CredentialCache.DefaultCredentials, but it seems to be empty for some mysterious reason. I have the following code in my web.config:

      Any ideas why DefaultCredentials is empty?


      betonglasermur.FeedDwarf(pur_is, 17);
      ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

      Morgonen är tröttmans mecka

      A Offline
      A Offline
      anilpal
      wrote on last edited by
      #2

      Hi, Whatr credential u r talking abt? Are u trying to pass Network credential? or some thing else

      Regards Anil Pal

      L 1 Reply Last reply
      0
      • A anilpal

        Hi, Whatr credential u r talking abt? Are u trying to pass Network credential? or some thing else

        Regards Anil Pal

        L Offline
        L Offline
        laserbaronen
        wrote on last edited by
        #3

        Yes, network credential. Like this:

        service.ClientCredentials.Windows.ClientCredential = (NetworkCredential)System.Net.CredentialCache.DefaultCredentials;

        but DefaultCredentials are null even though i have the following settings in web.config:

        <authentication mode="Windows" />
        <!-- Windows is used, Kerberos is configured as authprovider in sharepoint -->
        <identity impersonate="true" />
        <!-- Sharepoint is setting impersonate=true as default... -->
        <authorization>
        <deny users="?" />
        <!-- Force authentication by denying anonymous users. Default: allow users="*" -->
        </authorization>


        betonglasermur.FeedDwarf(pur_is, 17);
        ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

        Morgonen är tröttmans mecka

        A 1 Reply Last reply
        0
        • L laserbaronen

          Yes, network credential. Like this:

          service.ClientCredentials.Windows.ClientCredential = (NetworkCredential)System.Net.CredentialCache.DefaultCredentials;

          but DefaultCredentials are null even though i have the following settings in web.config:

          <authentication mode="Windows" />
          <!-- Windows is used, Kerberos is configured as authprovider in sharepoint -->
          <identity impersonate="true" />
          <!-- Sharepoint is setting impersonate=true as default... -->
          <authorization>
          <deny users="?" />
          <!-- Force authentication by denying anonymous users. Default: allow users="*" -->
          </authorization>


          betonglasermur.FeedDwarf(pur_is, 17);
          ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);

          Morgonen är tröttmans mecka

          A Offline
          A Offline
          anilpal
          wrote on last edited by
          #4

          Hi, Ar u working behind the proxy server ? 1.If, No and to assgin empty credential WebProxy _proxy = new WebProxy(); 2. If yes then: WebProxy _proxy = new WebProxy("http://192.168.10.5:8080",true); NetowrkCredential nc = new NetworkCredential(username, password, domain);//if any Then u can assign _proxy and nc object to respective property of your calling code.

          Regards Anil Pal

          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