I am attempting to setup an Asp.net application on the same site as Sharepoint. So where http://sharepointurl is the url for sharepoint, to access the application the url would be http://sharepointurl/MyCustomWebApp/. 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
" Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed."
I attempted to sign the dll and register it with the sharepoint servers GAC but then I received:
"System.Security.SecurityException: That assembly does not allow partially trusted callers."
If I remove the DLL from the applications bin directory the page loads but I lose functionality I need within it.
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.
IIS Version 6
Sharepoint: WSS 3.0
Windows Server 2003
Update: I ran "caspol -machine -addfulltrust (path to dll)" and it succeeded but I still receive the same error.