CAS & ASP.Net

S

Subir

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 http://localhost/WebApplication1/WebForm1.aspx 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
 
N

Nicole Calinoiu

Subir said:
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
http://msdn.microsoft.com/library/e...ConfigurationToolToWorkWithPermissionSets.asp.

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
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconASPNETTrustLevelsPolicyFiles.asp.

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top