Ask a Question related to ASP.NET Security, Design and Development.
-
Subir #1
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
-
Nicole Calinoiu #2
Re: CAS & ASP.Net
"Subir" <Subir@discussions.microsoft.com> wrote in message
news:7ECB02BB-F77D-4826-A937-858431E9E7A2@microsoft.com...<snip>> Can you tell what I am doing wrong in the following:
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].
Not when you're only concerned about the permissions of the application when> Also is the above method of using CAS recommended for ASP.Net?
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].
If this means using the ASP.NET policy settings then, yes, it is the> Or should we
> only use the App Domain method?
intended method for controlling CAS permissions for ASP.NET applications.
>
> Thanks,
> Subir
Nicole Calinoiu Guest



Reply With Quote

