Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default CAS & ASP.Net

    Can you tell what I am doing wrong in the following:

    1. Create a web-application viz. TestWebApplication1
    2. Build the app
    3. Create a code group TestWebApp under Machine->All Code->My_computer_Zone
    4. Set the membership condition as URL and the value as
    file://C:\inetpub\wwwroot\WebApplication1\bin\*
    5. Check the “This policy level will only have the permissions etc. etc.”
    6. Assign the permission set Everything to the TestWebApp
    7. “caspol -rsp WebApplication1.dll” returns the permissions under the
    Everything set meaning that it is being assigned the correct group.
    8. When I hit [url]http://localhost/WebApplication1/WebForm1.aspx[/url] I get this
    error.
    Parser Error
    Description: An error occurred during the parsing of a resource required to
    service this request. Please review the following specific parse error
    details and modify your source file appropriately.

    Parser Error Message: Could not load type 'WebApplication1.Global'.

    Source Error:


    Line 1: <%@ Application Codebehind="Global.asax.cs"
    Inherits="WebApplication1.Global" %>



    Source File: c:\inetpub\wwwroot\WebApplication1\global.asax Line: 1


    --------------------------------------------------------------------------------

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


    Also is the above method of using CAS recommended for ASP.Net? Or should we
    only use the App Domain method?

    Thanks,
    Subir
    Subir Guest

  2. #2

    Default Re: CAS & ASP.Net

    "Subir" <Subir@discussions.microsoft.com> wrote in message
    news:7ECB02BB-F77D-4826-A937-858431E9E7A2@microsoft.com...
    > Can you tell what I am doing wrong in the following:
    <snip>

    You will need to grant AspNetHostingPermission\Minimal (or higher) in order
    for global.asax and the *.aspx pages to be useable. AspNetHostingPermission
    is not part of the Everything permission set, nor is it available in the
    permission list displayed in the .NET Framework Configuration utility UI.
    You can add it to a permission set (but not one of the built-in ones) by
    importing from an XML file as described at
    [url]http://msdn.microsoft.com/library/en-us/cpguide/html/cpconUsingNETConfigurationToolToWorkWithPermission Sets.asp[/url].

    > Also is the above method of using CAS recommended for ASP.Net?
    Not when you're only concerned about the permissions of the application when
    run from ASP.NET. In that case, you should use the ASP.NET policy settings,
    as introduced at
    [url]http://msdn.microsoft.com/library/en-us/cpguide/html/cpconASPNETTrustLevelsPolicyFiles.asp[/url].

    > Or should we
    > only use the App Domain method?
    If this means using the ASP.NET policy settings then, yes, it is the
    intended method for controlling CAS permissions for ASP.NET applications.


    >
    > Thanks,
    > Subir

    Nicole Calinoiu Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139