i had received this error:
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 the permission of type
'System.Configuration.ConfigurationPermission, System.Configuration,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
failed.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
|
Stack Trace:
[SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.] System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0 System.Security.CodeAccessPermission.Demand() +59 System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +6 |
when i have added <trust level="Full" originUrl="m" processRequestInApplicationTrust="true" /> in my web.config file
then received
Configuration Error
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 105: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> Line 106: </httpModules> Line 107: <trust level="Full" originUrl="m" processRequestInApplicationTrust="true" /> Line 108: </system.web> Line 109: <system.webServer>
|
Source File: E:\Domains\viettradetour.com\wwwroot\web.config Line: 107
any1 help me ???
the following is my web.config file
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
<section name="VietnamTour" type="VietnamTour.VietnamTourSection"/>
</configSections>
<VietnamTour defaultConnectionStringName="VietnamTourSqlServer">
<contactForm mailTo="guest@vietnamtour.com"/>
<categories/>
<articles pageSize="10" importance="1"/>
<tours importance="2"/>
<hotels importance="3"/>
<destinations importance="4"/>
</VietnamTour>
<connectionStrings>
<remove name="VietnamTourSqlServer"/>
<!-- <add name="VietnamTourSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=VietnamTour;Integrated Security=True" providerName="System.Data.SqlClient"/>-->
<add name="VietnamTourSqlServer" connectionString="Server=.\sqlexpress;Initial Catalog=mydatabase;User ID=myuser;Password=mypassword;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings/>
<system.web>
<roleManager enabled="true" />
<urlMappings>
<add url="~/Vietnam_Adventure_Tours.aspx" mappedUrl="~/Tours.aspx?cat=4"/>
<add url="~/Vietnam_Classic_Tours.aspx" mappedUrl="~/Tours.aspx?cat=5"/>
<add url="~/Vietnam_Golf_Tours.aspx" mappedUrl="~/Tours.aspx?cat=6"/>
<add url="~/Vietnam_MICE_Tours.aspx" mappedUrl="~/Tours.aspx?cat=14"/>
<add url="~/Vietnam_Indochina_Tours.aspx" mappedUrl="~/Tours.aspx?cat=15"/>
<add url="~/Vietnam_Honeymoon_Tours.aspx" mappedUrl="~/Tours.aspx?cat=20"/>
<add url="~/TourGuide.aspx" mappedUrl="~/TravelServices.aspx?id=13"/>
<add url="~/TrainService.aspx" mappedUrl="~/TravelServices.aspx?id=14"/>
</urlMappings>
<!--<healthMonitoring heartbeatInterval="10800">
<providers>
<remove name="SqlWebEventProvider"/>
<add name="SqlWebEventProvider" connectionStringName="VietnamTourSqlServer" buffer="false" bufferMode="Notification" maxEventDetailsLength="1073741823" type="System.Web.Management.SqlWebEventProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<eventMappings>
<add name="VietnamTour Events" type="VietnamTour.WebCustomEvent, VietnamTour.CustomEvents"/>
</eventMappings>
<rules>
<clear/>
<add name="VietnamTour Events" eventName="VietnamTour Events" provider="SqlWebEventProvider" profile="Critical"/>
<add name="All Errors" eventName="All Errors" provider="SqlWebEventProvider" profile="Critical"/>
<add name="Failure Audits" eventName="Failure Audits" provider="SqlWebEventProvider" profile="Critical"/>
<add name="Heartbeats" eventName="Heartbeats" provider="SqlWebEventProvider" profile="Critical"/>
</rules>
</healthMonitoring>
-->
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<customErrors mode="Off"/>
<authentication mode="Forms" />
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<trust level="Full" originUrl="m" processRequestInApplicationTrust="true" />
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>
<system.net>
<mailSettings>
<smtp deliveryMethod="PickupDirectoryFromIis" from="info@viettradetour.com">
<network host="(localhost)" port="25" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
</configuration>
Ultimate Guide to Link Building - What you always want to know!