Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web application which used a web service in some pages.that web service required this line of code
VB
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
XML
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
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900