2
Personal Locaweb made an update on its servers and a site of a client of mine started to present the following error:
System.Security.Securityexception: Request for the permission of type 'System.Security.Permission...
They suggested that I change the Trust Level to FULL. I went to do it on the web.config like this:
<configuration>
<system.web>
<trust level="Full" />
Ai the site started to present the following error:This configuration section cannot be used at this path. This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.
How I solve this I do not know much about ASP.NET.
This is the website code.config.
<configuration> <system.web>
<trust level="Full" />
<httpRuntime executionTimeout="240" maxRequestLength="100000" requestValidationMode="2.0" />
<!--<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.captchaImageHandler, MSCaptcha" />
</httpHandlers>-->
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
<buildProviders>
<add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
</buildProviders>
</compilation>
<authorization>
<allow users="?" />
</authorization>
<roleManager enabled="true" />
<authentication mode="Forms">
<forms loginUrl="~/administracao/login.aspx" name="frm_login" protection="All" timeout="2880" path="~/administracao" defaultUrl="~/administracao/default.aspx" />
</authentication>
<customErrors mode="Off" />
</system.web>
<location path="administracao">
<system.web>
<authorization>
<allow roles="administradores" />
<!--<deny users="*"/>-->
<allow users="?" />
</authorization>
</system.web>
I think if they set in a
.config
higher than the config cannot be overwritten (allowOverride="false"
) there will be no way, you will have to ask for their support allow this change (allowOverride="true"
)– Marcus Vinicius
What version of Windows Server?
– Leonel Sanches da Silva
@Ciganomorrisonmendez version is Windows 2008 - Enterprise.
– Joao Nivaldo