Server Error in '/' Application.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request failed.]
   System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
   System.Reflection.RuntimeAssembly.GetExportedTypes() +32
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.LoadSharedDataContractTypes(ClientOptions proxyOptions, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, IList`1 importErrors) +417
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.CreateDataContractImporter(ClientOptions proxyOptions, CodeCompileUnit targetCompileUnit, CodeDomProvider codeDomProvider, String proxyNamespace, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, IList`1 importErrors) +311
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.CreateWsdlImporter(SvcMapFile svcMapFile, Configuration toolConfiguration, CodeCompileUnit targetCompileUnit, CodeDomProvider codeDomProvider, String targetNamespace, IServiceProvider serviceProviderForImportExtensions, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, IList`1 importErrors, Type typedDataSetSchemaImporterExtension) +962
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.GenerateCodeAndConfiguration(SvcMapFile svcMapFile, Configuration toolConfiguration, CodeDomProvider codeDomProvider, String proxyNamespace, Configuration targetConfiguration, String configurationNamespace, IServiceProvider serviceProviderForImportExtensions, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, Type typedDataSetSchemaImporterExtension) +417
   System.Web.Compilation.WCFBuildProvider.GenerateCodeFromServiceMapFile(String mapFilePath) +308


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0