2014-03-14 4 views
1

방금 ​​사이트를 업로드했으며 보안 예외가 발생했습니다. 클라이언트는 데이터베이스 나 등록/로그인 기능 또는 전자 메일 설정이 필요하지 않으므로 이와 같은 것을 사용하지는 않습니다.Webmatrix 사이트 - 보안 예외 - 거기에 있으면 안 됨

내 페이지 (현재 한 페이지, SiteLayout 및 Default.cshtml 파일)에는 모두 일반 오래된 HTML 및 CSS 만 있습니다.

오류 및 스택 트레이스이다 : 나는 완전히 다음에 수행 할 무엇으로 난처한 상황에 빠진거야

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 for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 


[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] 
    System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 
    System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31 
    System.Security.CodeAccessPermission.Demand() +46 
    System.Web.HttpContext.System.IServiceProvider.GetService(Type service) +54 
    System.Web.HttpContextWrapper.GetService(Type serviceType) +11 
    System.Web.WebPages.UrlRewriterHelper.IsUrlRewriterTurnedOn(HttpContextBase httpContext) +108 
    System.Web.WebPages.UrlRewriterHelper.WasRequestRewritten(HttpContextBase httpContext) +13 
    System.Web.WebPages.UrlUtil.GenerateClientUrlInternal(HttpContextBase httpContext, String contentPath) +138 
    System.Web.WebPages.UrlUtil.GenerateClientUrlInternal(HttpContextBase httpContext, String contentPath) +103 
    System.Web.WebPages.UrlUtil.GenerateClientUrl(HttpContextBase httpContext, String basePath, String path, Object[] pathParts) +144 
    System.Web.WebPages.WebPageExecutingBase.Href(String path, Object[] pathParts) +44 
    ASP._Page_Default_cshtml.Execute() +264 
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198 
    System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69 
    System.Web.WebPages.WebPage.ExecutePageHierarchy() +131 
    System.Web.WebPages.StartPage.RunPage() +17 
    System.Web.WebPages.StartPage.ExecutePageHierarchy() +64 
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78 
    System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +171 
    System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +66 
    System.Web.WebPages.WebPageHttpHandler.ProcessRequest(HttpContext context) +5 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69 

. 어떤 도움이라도 대단히 감사하겠습니다!

답변

1

사용중인 호스팅이 다른 웹 사이트와 공유되는 경우 응용 프로그램 보안 수준이 Medium Trust으로 설정되고 응용 프로그램의 일부가 Full Trust이어야합니다.

다음은 중간 트러스트 환경을 좀 더 자세히 설명하는 기사입니다.

http://msdn.microsoft.com/en-us/library/ms998341.aspx#paght000020_step1

+0

WinHost 공유 호스팅입니다. Windows 호스팅. 나는 그들을 수년간 사용 해왔다. 새 계정을 가진 새로운 고객입니다. 구성 파일에서 trustLevel = "Full"을 설정했지만 아무 것도 변경하지 않았습니다. – uSeRnAmEhAhAhAhAhA

+1

호스팅이 Machine.Config 또는 IIS에서 응용 프로그램 용으로 설정된 경우 Web.Config에서 설정을 덮어 씁니다. 해당되는 경우 호스팅 업체에 문의하십시오. – ThiagoPXP

+0

Thanks @Thiago, 연락 드리겠습니다. – uSeRnAmEhAhAhAhAhA