Site works on localhost, but not on Uolhost (permissions?)

Asked

Viewed 1,078 times

1

I created a standard site (those that already come pre-encoded from visual studio 2013), using Asp.net mvc technology with common authentication by individual accounts.

On my localhost the site runs which is a beauty, register users, check in the database and everything is perfect.

But when I publish it to the Uol host, when logging in with a registered user, it gives permission problem (print: http://s18.postimg.org/fm2qw8gzt/print.png)

I do not believe that it is necessary to have full trust to run such a basic application, otherwise it would not be possible to host Asp.net mvc on almost no commercial server. It must be some configuration (it doesn’t work if I set trust level = full in webconfig because Uol host doesn’t allow this change).

I’ve tried everything imaginable, but I haven’t been able to make it work.

Someone’s had this problem before and can shed some light?

Error description:

Server Error in '/' Application.

Attempt by security Transparent method 'Microsoft.AspNet.Identity.Claimsidentityfactory`1+d__0.Movenext()' to access security Critical method 'System.Security.Claims.ClaimsIdentity.Claim(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+d__0.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.

  • I may be wrong, but I’ll tell you one thing, there’s more than one way to do something (it’s just a theory)

  • I know this doesn’t add anything to the question, but this winspymonitor seems to be a "little" invasion of privacy. "See Facebook Profiles visited" '-'

  • @user2000542 can help me set up . net MVC to connect to localhost?

2 answers

1

Try to add the code below in your web.config

<system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer>

I once had a similar problem and this code solved my problem.

0

You can try adding the configuration below in your web.config, within the System.web tag:

<trust level="medium" originUrl="" />

But this may not work on some hosts, as they block this setting.

It doesn’t cost to test.

  • Does not work, the default server is already medium.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.