Somebody please help - Request for the permission of type 'System.Web.AspNetHostingPermission' [...]

A

AnalogKid17

Keywords:
ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a
WinXP Box

I've betting the following for days... it's driving me insane:

Server Error in '/' Application.

Security Exception
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.Web.AspNetHostingPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
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.


The token can be found here:
<DbSource ConnectionRef="strMRConn_Test_System (Web.config)" [...]
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
This is in my XSD (DataSet) file.

This is a compile error I think (not an RTE), as the default page has
no connection: it's plain HTML. Yet I can buil successfully. Running
(w/ or w/out debugging won't work).

The ASPNET account of the IIS6 server has full permission on the site
folders (under wwwroot).

PLEASE help,
AK
 
A

AnalogKid17

Michel,
Thanks for taking the time.

No, I try to stay away from FP and extension. I'm working locally on my
machine were evering WAS fine and then moved to an IIS6 server on the
network.

Thanks for the suggestion but that did not phase my nice RTE at all!
Still there!

I should mention that now the app stopped working even locally (using
the VS web server).

Here's my web.config if it can shed any light... Thanks again!

<?xml version="1.0"?>
<configuration>
<connectionStrings>
<!--Test System-->
<add name="strMRConn_Test_System" connectionString="Data
Source=[local server];Initial Catalog=MedicalRecords;Integrated
Security=True" providerName="System.Data.SqlClient"/>
<!--Live System-->
<add name="strMRConn" connectionString="Data Source=[prod
server];Initial Catalog=MedicalRecords;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<!--Crystal reports-->
<add key="CrystalImageCleaner-AutoStart" value="true"/>
<add key="CrystalImageCleaner-Sleep" value="60000"/>
<add key="CrystalImageCleaner-Age" value="120000"/>
</appSettings>
<system.web>
<httpHandlers>
<!--Register the AJAX Component(s)-->
<add verb="POST,GET" path="ajax/*ashx"
type="Ajax.PageHandlerFactory, Ajax"/>
<!--Crystal Reports-->
<add verb="GET" path="CrystalImageHandler.aspx"
type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
<httpModules>

</httpModules>
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="CrystalDecisions.Web, Version=10.2.3600.0,
Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.2.3600.0,
Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0,
Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.Framework,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.Desktop.Report,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Enterprise.InfoStore,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc,
Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
</compilation>
<pages validateRequest="false" enableSessionState="true">
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Data"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Data.SqlTypes.SqlXml"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
<add namespace="System.Xml"/>
</namespaces>
</pages>
<authentication mode="Windows"/>
<customErrors mode="Off"/>
</system.web>
</configuration>



You probably do not use frontpage extensions ??

probably you use a file share ,,,, see this
http://support.microsoft.com/?id=320268


Please let us know if this solved the problem

regards

Michel Posseth [MCP]




Keywords:
ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a
WinXP Box

I've betting the following for days... it's driving me insane:

Server Error in '/' Application.

Security Exception
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.Web.AspNetHostingPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
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.


The token can be found here:
<DbSource ConnectionRef="strMRConn_Test_System (Web.config)" [...]
ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
This is in my XSD (DataSet) file.

This is a compile error I think (not an RTE), as the default page has
no connection: it's plain HTML. Yet I can buil successfully. Running
(w/ or w/out debugging won't work).

The ASPNET account of the IIS6 server has full permission on the site
folders (under wwwroot).

PLEASE help,
AK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top