title: Deploying custom Asp.net applications to same IIS site as Sharepoint
body: <p>I am attempting to setup an Asp.net application on the same site as Sharepoint.  So where <a href="http://sharepointurl" rel="nofollow noreferrer">http://sharepointurl</a> is the url for sharepoint, to access the application the url would be <a href="http://sharepointurl/MyCustomWebApp/" rel="nofollow noreferrer">http://sharepointurl/MyCustomWebApp/</a>.  I have setup an IIS application at this level but attempting to run the application with a custom dll in the bin results in the error <br /><br />" Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed." <br /><br /></p>
  
  <p>I attempted to sign the dll and register it with the sharepoint servers GAC but then I received: <br /><br />
  "System.Security.SecurityException: That assembly does not allow partially trusted callers." <br /><br />
  If I remove the DLL from the applications bin directory the page loads but I lose functionality I need within it.<br /><br />
  Edit: The error happens only if the Dll is in the bin, it does not depend on any one line of code in the Dll.
  <br /><br />
  IIS Version 6
  Sharepoint: WSS 3.0
  Windows Server 2003  <br />
  <br />
  Update: I ran "caspol -machine -addfulltrust (path to dll)" and it succeeded but I still receive the same error. </p>