Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 305443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:22:26+00:00 2026-05-12T07:22:26+00:00

I am receiving the following exception trying to browse a medium trust ASP.NET MVC

  • 0

I am receiving the following exception trying to browse a medium trust ASP.NET MVC application (using Linq-to-SQL) on Cassini 3.5.0.2:

Could not load file or assembly 'Cassini, Version=3.5.0.2, Culture=neutral, PublicKeyToken=da0fefd60d522a7d'
or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)

with an inner exception:

Execution permission cannot be acquired.

Stack trace:
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset,
    PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset,
    PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)

The same application works on IIS7 and on internal VS2008 web server. Cassini works without any problems with ASP.NET MVC application which are not using Linq-to-SQL.

Both the ASP.NET MVC application and the Linq-to-SQL repository project have [assembly: System.Security.AllowPartiallyTrustedCallers] applied in order to work in medium trust.

Has anyone any clue about this problem?

EDIT

The exception is thrown on this line from Server.cs:

return appManager.CreateObject(appId, hostType, virtualPath, physicalPath, false);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:22:27+00:00Added an answer on May 12, 2026 at 7:22 am

    [http://blogs.msdn.com/dmitryr/archive/2009/04/23/cassini-support-for-friendly-urls-routing.aspx#9855758%5D

    Unfortunately this is a side-effect of the single-EXE Cassini. In the worker app domain Cassini EXE is treated as untrusted code.

    To make it work in Medium trust, you need either tinker with Medium Trust definition (to allow Assemblies signed by your key to get Full Trust) or go back to putting Cassini into GAC, as in previous versions.

    Thanks,

    Dmitry

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am receiving the following exception when trying to run my unit tests using
I am receiving the following exception when trying to serialize an object using XMLSerialization.
I am sometimes receiving the following exception when attempting to deserialise an object using
Recently while using richtext field and ckeditor I started receiving following error while trying
I am receiving the following exception while trying to make an SSL connection to
I'm receiving an exception when parsing the following date: SimpleDateFormat sdf = new SimpleDateFormat(EEE
Background I'm receiving the following error when trying to render a partial view in
I am receiving the following error in my code (c#, .Net 3.5, VS2008) when
I am receiving the following error when I try to send mail using a
I'm trying to implement my own GenericIdentity implementation but keep receiving the following error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.