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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wenning@kvsa.nl

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

    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 .SecurityExcept ion: Request for the
    permission of type 'System.Web.Asp NetHostingPermi ssion, System,
    Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9'
    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:


    [SecurityExcepti on: Request for the permission of type
    'System.Web.Asp NetHostingPermi ssion, System, Version=2.0.0.0 ,
    Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.]
    System.Reflecti on.Assembly.Get Type(String name, Boolean
    throwOnError, Boolean ignoreCase) +0
    System.Web.UI.U til.GetTypeFrom Assemblies(ICol lection assemblies,
    String typeName, Boolean ignoreCase) +140
    System.Web.UI.T emplateParser.G etType(String typeName, Boolean
    ignoreCase, Boolean throwOnError) +295
    System.Web.UI.T emplateParser.P rocessInheritsA ttribute(String
    baseTypeName, String codeFileBaseTyp eName, String src, Assembly
    assembly) +163

    System.Web.UI.T emplateParser.P ostProcessMainD irectiveAttribu tes(IDictionary
    parseData) +192




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
    ASP.NET Version:2.0.507 27.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: 39b77da5032a40a 4ae4f3490228b47 c6
    Event sequence: 1
    Event occurrence: 1
    Event detail code: 0

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

    Process information:
    Process ID: 608
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWO RK 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_Se rver

    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@kvsa.nl

  • bruce barker \(sqlwork.com\)

    #2
    Re: Security Exception Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.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@kvsa.n lwrote in message
    news:1155912880 .675190.258350@ b28g2000cwb.goo glegroups.com.. .
    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 .SecurityExcept ion: Request for the
    permission of type 'System.Web.Asp NetHostingPermi ssion, System,
    Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9'
    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:
    >
    >
    [SecurityExcepti on: Request for the permission of type
    'System.Web.Asp NetHostingPermi ssion, System, Version=2.0.0.0 ,
    Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.]
    System.Reflecti on.Assembly.Get Type(String name, Boolean
    throwOnError, Boolean ignoreCase) +0
    System.Web.UI.U til.GetTypeFrom Assemblies(ICol lection assemblies,
    String typeName, Boolean ignoreCase) +140
    System.Web.UI.T emplateParser.G etType(String typeName, Boolean
    ignoreCase, Boolean throwOnError) +295
    System.Web.UI.T emplateParser.P rocessInheritsA ttribute(String
    baseTypeName, String codeFileBaseTyp eName, String src, Assembly
    assembly) +163
    >
    System.Web.UI.T emplateParser.P ostProcessMainD irectiveAttribu tes(IDictionary
    parseData) +192
    >
    >
    >
    >
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.507 27.42;
    ASP.NET Version:2.0.507 27.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: 39b77da5032a40a 4ae4f3490228b47 c6
    Event sequence: 1
    Event occurrence: 1
    Event detail code: 0
    >
    Application information:
    Application domain: /LM/W3SVC/1542597267/Root-4-128003860780000 000
    Trust level: Full
    Application Virtual Path: /
    Application Path: \\bullseye\Webs ites\www.digitalnews.nl\
    Machine name: SEASPIKE
    >
    Process information:
    Process ID: 608
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWO RK 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_Se rver
    >
    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@kvsa.nl
    >

    Comment

    • robbiesmith79@gmail.com

      #3
      Re: Security Exception Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.42

      After fighting and reading for two hours, Here's my fix.

      On IIS 6.0 , the website in question, the Home Directory needs to be a
      directory located on this computer, not a UNC name ( or a share located
      on another comptuer). Yes, it can still be a shared folder, but the
      location needs to be drive:\folder

      With half my hair missing,

      Rob

      bruce barker (sqlwork.com) wrote:
      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)

      Comment

      • robbiesmith79@gmail.com

        #4
        Re: Security Exception Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.42

        After fighting and reading for two hours, Here's my fix.

        On IIS 6.0 , the website in question, the Home Directory needs to be a
        directory located on this computer, not a UNC name ( or a share located
        on another comptuer). Yes, it can still be a shared folder, but the
        location needs to be drive:\folder

        With half my hair missing,

        Rob

        bruce barker (sqlwork.com) wrote:
        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)

        Comment

        • robbiesmith79@gmail.com

          #5
          Re: Security Exception Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.42

          After fighting and reading for two hours, Here's my fix.

          On IIS 6.0 , the website in question, the Home Directory needs to be a
          directory located on this computer, not a UNC name ( or a share located
          on another comptuer). Yes, it can still be a shared folder, but the
          location needs to be drive:\folder

          With half my hair missing,

          Rob

          bruce barker (sqlwork.com) wrote:
          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)

          Comment

          • wenning@kvsa.nl

            #6
            Re: Security Exception Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.42

            Hi,

            Thank you for submitting your tips and tricks.
            It did the job, everything is working properly now !

            Regards,

            Ferry Wenning

            Comment

            Working...