Sorry, nothing to see here
[mono.git] / mcs / class / System / System.Net / CredentialCache.cs
index 57ca16805388aa827d6c5a9f2784f1ae0f9ef0db..9b2b9f5b51b6158ad4e566f9a24bd89052b2f5e4 100644 (file)
@@ -32,6 +32,7 @@ using System.Runtime.Serialization;
 
 namespace System.Net {
        public class CredentialCache : ICredentials, IEnumerable {
+               static NetworkCredential empty = new NetworkCredential ("", "", "");
                Hashtable cache;
 
                public CredentialCache () 
@@ -43,10 +44,17 @@ namespace System.Net {
                public static ICredentials DefaultCredentials {
                        get {
                                // This is used for NTLM, Kerberos and Negotiate under MS
-                               return null;
+                               return empty;
                        }
                }
-               
+
+#if NET_2_0
+               // MS does might return a special ICredentials which does not allow getting the
+               // username/password information out of it for non-internal classes.
+               public static NetworkCredential DefaultNetworkCredentials {
+                       get { return empty; }
+               }
+#endif
 
                public NetworkCredential GetCredential (Uri uriPrefix, string authType)
                {