I have a web application which used a web service in some pages.that web service required this line of code
System.Net.ServicePointManager.ServerCertificateValidationCallback = Function(obj, certificate, chain, errors) True
the problem is recently the hosting company changed the trust level from high to medium which caused this error below
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I searched about it most of the answers were saying change the level trust to high which is not a solution in my case
other solution I found is modify/create custom Web_mediumtrust.config file I don't know if that's possible in our hosting company or not
please any one has an idea other than above