방금 MVC 응용 프로그램을 작성하여 실험실에서 작동 시켰습니다. 이제 GoDaddy에 배포 했으므로 다음 오류가 발생합니다.배포시 SecurityException이 발생했습니다.
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.
스택 추적 : 오류가 데이터베이스에있는 모든 문제를 제안하지 않는 것 비록
[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) +284 System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +70 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70 System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +40 System.Type.GetType(String typeName) +30 System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +12 System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +2175 System.Web.Configuration.CompilationSection.get_RecompilationHash() +96 System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDateInternal(Int64 cachedHash) +458 System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(Int64 cachedHash) +51 System.Web.Compilation.BuildManager.ExecutePreAppStart() +135 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +531
나는 나의 데이터베이스 연결 문자열에 대해 궁금해했다.
내 진짜 질문은 다음과 같습니다. 어떻게 문제를 해결할 수 있습니까? 메시지는 실제로 전혀 도움이되지 않는 것처럼 보입니다. 다음 단계는 무엇일까요?
MVC-5를 사용하고 있습니까? –
@StephenMuecke : 방금 Visual Studio의 최신 버전으로 업그레이드 했으므로 최신 버전을 사용하고 있습니다. –
MVC-5라고 가정합니다. 나는 GoDaddy 호스팅에 대해 아무것도 모르고 그들이 어떤 신뢰 수준을 지원하는지, MVC-5가 중간 신뢰를 더 이상 지원하지 않는다는 사실과 관련 될 수 있습니다. ([이 답변을 참조하십시오] (http://stackoverflow.com/questions/) 25347092/deploying-asp-net-mvc-project/25354496 # 25354496)) –