Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

dmdock

Site funciona no localhost, mas não no UolHost (permissões?)

Recommended Posts

Boa tarde!


Criei um site padrão (daqueles que já vêm pré codificados do visual studio 2013), utilizando tecnologia asp.net mvc com autenticação comum por contas individuais.


No meu localhost o site roda que é uma beleza, cadastra usuários, confiro no banco de dados e está tudo perfeito.


Porém quando publico para o uol host, na hora de logar com um usuário cadastrado, ele dá problema de permissão (print: http://s18.postimg.org/fm2qw8gzt/print.png)


Não acredito que seja necessário ter full trust para rodar uma aplicação tão básica, senão não seria possível hospedar asp.net mvc em quase nenhum servidor comercial. Deve ser alguma configuração (não funciona se eu definir trust level = full no webconfig pois o uol host não permite essa mudança).


Já tentei de tudo que se pode imaginar, mas ainda não consegui fazer funcionar.


Alguém já teve esse problema antes e pode me dar uma luz? Gratifica-se kkkkkk


Abaixo a descrição do erro. Obrigado.


Diego



Descrição do erro:

Server Error in '/' Application.


Attempt by security transparent method 'Microsoft.AspNet.Identity.ClaimsIdentityFactory`1+<CreateAsync>d__0<TUser>.MoveNext()' to access security critical method 'System.Security.Claims.ClaimsIdentity.AddClaim(System.Security.Claims.Claim)' failed.


Assembly 'Microsoft.AspNet.Identity.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.MethodAccessException: Attempt by security transparent method 'Microsoft.AspNet.Identity.ClaimsIdentityFactory`1+<CreateAsync>d__0<TUser>.MoveNext()' to access security critical method 'System.Security.Claims.ClaimsIdentity.AddClaim(System.Security.Claims.Claim)' failed.


Assembly 'Microsoft.AspNet.Identity.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted.

Compartilhar este post


Link para o post
Compartilhar em outros sites

tente colocar dentro da tag <System.web> do meu web.config a tag <trust level="medium" originUrl="" />.

 

Ou migrar para servidor win server que aceita full trust. Alguns Host não permitem mesmo. Tente fazer um teste no Windows Azure: http://azure.microsoft.com/pt-br/

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.