Merge pull request #409 from Alkarex/patch-1
[mono.git] / mcs / class / System / System.Net / NtlmClient.cs
index 37257a3659ba275c65cbb45aedb9a02c13df3e28..ea4fecdfedf05af0f805834ae2bc8ef873282de9 100644 (file)
@@ -37,20 +37,15 @@ namespace System.Net
 {
        class NtlmClient : IAuthenticationModule
        {
-               static Type ntlmAuthType;
                IAuthenticationModule authObject;
 
-               static NtlmClient ()
-               {
-                       Assembly ass = Assembly.Load (Consts.AssemblyMono_Http);
-                       if (ass != null)
-                               ntlmAuthType = ass.GetType ("Mono.Http.NtlmClient", false);
-               }
-               
                public NtlmClient ()
                {
-                       if (ntlmAuthType != null)
-                               authObject = (IAuthenticationModule) Activator.CreateInstance (ntlmAuthType);
+#if SECURITY_DEP
+                       authObject = new Mono.Http.NtlmClient ();
+#else
+                       authObject = null;
+#endif
                }
        
                public Authorization Authenticate (string challenge, WebRequest webRequest, ICredentials credentials)