[Mono-osx] ServicePointManager using 2.0

Duane Wandless duane at wandless.net
Mon Oct 20 20:04:36 EDT 2008

I did not have any problems using 1.9.1.  After installing 2.0 I am
receiving this exception/stack trace (see below) when executing this
ServicePointManager.ServerCertificateValidationCallback += new

CertAuth.TrustAllCertificatesCallback simply returns true and is static.

I receive the same exception when executing this statement:
ServicePointManager.CertificatePolicy = new CertAuth();

CertAuth implements CheckValidationResult and returns true.

Again this code worked from 1.9.1.  The key point about my code is it is
running from a DLL that is embedded in a Cocoa application.  Any help would
be greatly appreciated.


Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for System.Net.ServicePointManager --->
System.Configuration.ConfigurationErrorsException: Error Initializing the
configuration system. ---> System.NullReferenceException: Object reference
not set to an instance of an object
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal
(ConfigurationUserLevel userLevel, System.Reflection.Assembly
calling_assembly, System.String exePath) [0x00000]
  at System.Configuration.ClientConfigurationSystem.get_Configuration ()
  --- End of inner exception stack trace ---
  at System.Configuration.ClientConfigurationSystem.get_Configuration ()
(System.String configKey) [0x00000]
  at System.Configuration.ConfigurationManager.GetSection (System.String
sectionName) [0x00000]

  at System.Net.ServicePointManager..cctor () [0x00000]
  --- End of inner exception stack trace ---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20081020/a06f407e/attachment.html 

More information about the Mono-osx mailing list