Re: .NET 2.0 Trust issue on Hosted Server
- From: Dominick Baier [DevelopMentor] <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 May 2006 22:25:12 +0000 (UTC)
I would set the trust level to medium on my local copy too and try to
debug...
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
That's on the hosted server. The allowOverride="false" probably is
set to false, but I can't get to that, because it's on the hosted
server.
"Dominick Baier [DevelopMentor]"
<dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4580be6319b8118c84a0899a02430@xxxxxxxxxxxxxxxxxxxxx
Thats your local machine?web.config
seems you have locked it down somehow - try to set the trust level in
in the framework directory. is there something like
allowOverride="false" set?
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
I get this error whe I try to set medium trust:
Description: An error occurred during the processing of a
configuration file required to service this request. Please review
the specific error details below and modify your configuration file
appropriately.
Parser Error Message: 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.
Source Error:
Line 12: <pages styleSheetTheme="White"/>
Line 13:
Line 14: <trust level="Medium" />
Line 15:
Line 16: <customErrors mode="Off"/>
Source File: D:\Inetpub\loftla\loftla\web.config Line: 14
"Dominick Baier [DevelopMentor]"
<dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4580be6319b7d98c849b4f64ddf90@xxxxxxxxxxxxxxxxxxxxx
I would set the trust level to medium on my local copy too and trydebug...
to
---------------------------------------file:
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Oh, I forgot to add, when I refresh 1-10 times it will work.
"Cindy Lee" <cindylee@xxxxxxxxxxx> wrote in message
news:e6OItS3eGHA.3640@xxxxxxxxxxxxxxxxxxxxxxx
I'm using a .net 2.0 Hosted server, IIS has trust level I think I
medium, which I can't over-ride.
I'm working off the Personal Website wizard. I get this security
issue
usually after I log in and come back. Sometimes I get it, and
sometimes I
don't. I can't repeat it all the time.
How should I set my token key? i just use what's in the config
theb77a5c561934e089.
I know I can't do full Trust because it get's overridden.
There's nothing on my pages that is a big security issue. I don't
care who
has access to it. Is there anything I should do to change my
config
file.
This is my error below, and my config file is below that
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
PublicKeyToken=b77a5c561934e089'permission of type 'System.Security.Permissions.FileIOPermission,mscorlib,
Version=2.0.0.0, Culture=neutral,
Catalog=loftladb;Persistfailed.xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
Conifg
<?xml version="1.0"?>
<configuration
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=SQLB1.webcontrolcenter.com;Initial
Catalog=loftladb;PersistSecurity
Info=True;User ID=xxx;Password=xxx"/>
<add name="Personal" connectionString="Data
Source=SQLB1.webcontrolcenter.com;Initial
Catalog=loftladb;PersistSecurity
Info=True;User ID=xxx;Password=xxx"
providerName="System.Data.SqlClient" />
<add name="loftladbConnectionString1" connectionString="Data
Source=SQLB1.webcontrolcenter.com;Initial
timeout="300"Security
Info=True;User ID=xxx;Password=xxx"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<pages styleSheetTheme="White"/>
<customErrors mode="Off"/>
<compilation debug="true"/>
<membership defaultProvider="YourSqlProvider">
<providers>
<add connectionStringName="LocalSqlServer"
applicationName="LoftLAApp"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" name="YourSqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<authentication mode="Forms">
<forms loginUrl="default1.aspx" protection="Validation"
responseEncoding="utf-8"/>/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
<globalization requestEncoding="utf-8"
defaultProvider="AspNetSqlRoleProvider"<roleManager enabled="true"
which/>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="SiteMap provider
System.Web,readsin
.sitemap XML files." type="System.Web.XmlSiteMapProvider,
PublicKeyToken=b03f5f7f11d50a3a"Version=2.0.0.0, Culture=neutral,
siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
</system.web>
<location path="Admin">
<system.web>
<authorization>
<allow roles="Administrators"/>
<!-- deny users="*"/ -->
</authorization>
</system.web>
</location>
</configuration>
.
- References:
- Re: .NET 2.0 Trust issue on Hosted Server
- From: Cindy Lee
- Re: .NET 2.0 Trust issue on Hosted Server
- Prev by Date: How to set the Password from SQL using aspnet_Membership_CreateUser
- Next by Date: Re: .NET 2.0 Trust issue on Hosted Server
- Previous by thread: Re: .NET 2.0 Trust issue on Hosted Server
- Next by thread: Re: Use RunAs command with NT Authority\Network account for DPAPI
- Index(es):
Relevant Pages
|