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.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +165
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +272
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +55
   System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
   System.Reflection.RuntimeAssembly.GetExportedTypes() +21
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.LoadSharedDataContractTypes(ClientOptions proxyOptions, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, IList`1 importErrors) +275
   System.Web.Compilation.WCFModel.VSWCFServiceContractGenerator.CreateDataContractImporter(ClientOptions proxyOptions, CodeCompileUnit targetCompileUnit, CodeDomProvider codeDomProvider, String proxyNamespace, IContractGeneratorReferenceTypeLoader typeLoader, Int32 targetFrameworkVersion, IList`1 importErrors) +200
   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) +517
   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) +228
   System.Web.Compilation.WCFBuildProvider.GenerateCodeFromServiceMapFile(String mapFilePath) +216


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