Re: Security Exception Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42



by default the asp.net system account does not have network access, so unc
shares are not allowed. yu need to change the machine account to one that
has network access. also because you code will be runing from a share, it
run in a sandbox with restricted access. you will probably need to make the
share trusted.

-- bruce (sqlwork.com)


<wenning@xxxxxxx> wrote in message
news:1155912880.675190.258350@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I am struggling with a website on a W2K3 server which has the actual
content on a NAS server (also W2K3 based). The servers doesn't run in a
domain and arent intended to.

I did make the web space on the W2K3 IIS Server and pointed it to the
NAS server via an UNC path (no virtual directory).

When I place the content on the IIS, everything works fine, but when I
want to use the content on the NAS, I get the following error message
in my IE :

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.


Stack Trace:


[SecurityException: Request for the permission of type
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Reflection.Assembly.GetType(String name, Boolean
throwOnError, Boolean ignoreCase) +0
System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies,
String typeName, Boolean ignoreCase) +140
System.Web.UI.TemplateParser.GetType(String typeName, Boolean
ignoreCase, Boolean throwOnError) +295
System.Web.UI.TemplateParser.ProcessInheritsAttribute(String
baseTypeName, String codeFileBaseTypeName, String src, Assembly
assembly) +163

System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary
parseData) +192




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

My Event Log tells me :

Event code: 4010
Event message: An unhandled security exception has occurred.
Event time: 8/18/2006 4:47:59 PM
Event time (UTC): 8/18/2006 2:47:59 PM
Event ID: 39b77da5032a40a4ae4f3490228b47c6
Event sequence: 1
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1542597267/Root-4-128003860780000000
Trust level: Full
Application Virtual Path: /
Application Path: \\bullseye\Websites\www.digitalnews.nl\
Machine name: SEASPIKE

Process information:
Process ID: 608
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Request information:
Request URL: http://www.digitalnews.nl/Default.aspx
Request path: /Default.aspx
User host address: 192.168.150.20
User:
Is authenticated: False
Authentication Type:
Thread account name: SEASPIKE\IIS_Server

Custom event details:

For more information, see Help and Support Center at

Anyone an idea what could be wrong and how I can solve it ?
Help would be very much appreciated ! Thank you !

Regards,

Ferry Wenning
wenning@xxxxxxx



.



Relevant Pages

  • Re: .net user permissions in IIS
    ... The exception message has all the information you need to correct this ... You can right -click on the folder containing the resources where access is ... account, or add the needed account and grant it permission. ... the current web request. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Sql Reporting Serviced - > ASP.NET ACCESS DENIED!
    ... The account you are logging in to when on the server doesn't have the ... do you have <Impersonate> set to True? ... > Exception Details: System.UnauthorizedAccessException: Access to the path ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: sharepoint error
    ... Server Error in '/Remote' Application. ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ... t context) +97 ...
    (microsoft.public.windows.server.sbs)
  • RE: Exchange 2007 migration, OWA problem
    ... The curve here is that I am using the old existing server. ... Exception message: There was a problem accessing Active Directory. ... connection, DirectoryRequest request, DirectoryException de, Int32 ... Microsoft.Exchange.Data.Directory.ADSession.ExecuteModificationRequest(ADRawEntry entry, DirectoryRequest request, ADObjectId originalId) ...
    (microsoft.public.exchange.setup)
  • Re: outlook mobile access broken
    ... then make sure that ASP is enabled on the server. ... the current web request. ... An unhandled exception has occurred. ... Thread account name: NT AUTHORITY\NETWORK SERVICE ...
    (microsoft.public.exchange.admin)