2013-07-16 3 views
5

FluentSecurity를 ​​사용하는 ASP.NET MVC 웹 사이트를 가지고 있습니다. Azure 웹 사이트로 잘 작동합니다. 나는 이것을 웹 롤로 만들 필요가있다. WebRole 프로젝트를 추가했지만 시작시 WebRole이 실패합니다. "내부 서버 오류가 발생했기 때문에이 페이지를 표시 할 수 없습니다."FluentSecurity는 Azure WebRole을 실패로 만듭니다.

DenyAnonymousAccessPolicyViolationHandlerRequireRolePolicyViolationHandlerIPolicyViolationHandler이고 전체 FluentSecurity 설정은 http://blog.mariusschulz.com/setting-up-fluentsecurity-to-use-ninject-for-dependency-resolution입니다.

두 클래스를 모두 삭제하면 IPolicyViolationHandler을 구현할 때 WebRole이 정상적으로 시작된다는 것을 발견했습니다. 이 문제를 설명하는 샘플 프로젝트를 만들었습니다. https://dl.dropboxusercontent.com/u/73642/MvcApplication1.zip에서 찾을 수 있습니다.

그래서 정책 클래스를 포함하여 Azure WebRole에서 FluentSecurity 작업을 어떻게 할 수 있습니까?

+1

처럼 "... 당신의 Web.config에서 재 조립하여이 문제를 해결?" 내 DenyAnonymousAccessPolicyViolationHandler와 똑같은 문제가 있습니다. – Faraday

+0

나는하지 않았다. Github에서 버그를보고했는데 응답이 없습니다. –

답변

0

같은 문제가있었습니다. 웹 사이트에서는 작동하지만 웹 역할에서는 작동하지 않습니다.

Fluent Security가 MVC4가 아닌 MVC3을 참조하기 때문입니다. Github의이 버그에 대한 의견은 https://github.com/kristofferahl/FluentSecurity/pull/39으로 세부적으로 들어갑니다.

중 하나를 수행 할 수 있습니다

1)이 FluentSecurity.csproj의 로컬 복사본을 가지고 그것을 MVC 4 System.Web.MVC 참조의 업그레이드, 다음 (이) 우리가 무슨 짓을 솔루션에 포함.

2) 또는, 위의 Github에서 버그 링크를 따라 혹시이에 대한 해결책을 찾았나요이

<runtime> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> 
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> 
    </dependentAssembly> 
    <dependentAssembly> 
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 
    <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> 
    </dependentAssembly> 
    <dependentAssembly> 
    <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> 
    <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> 
    </dependentAssembly> 
</runtime> 
관련 문제