Ask a Question related to ASP.NET Security, Design and Development.
-
Steve #1
ASP.NET Exception on hosted server
When I run my ASP.NET on my computer it works fine, even in medium trust which is what mt webhost uses. However on the webhost it generates this exceptio
SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) +66
System.Security.CodeAccessSecurityEngine.Check(Per missionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) +
System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission cap, StackCrawlMark& stackMark) +8
System.Security.CodeAccessPermission.Demand() +6
System.Web.HttpContext.set_User(IPrincipal value) +7
newtelligence.DasBlog.Web.Global.Application_Authe nticateRequest(Object sender, EventArgs e) in Global.asax.cs:19
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute() +6
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +8
Steve Guest
-
The server threw an exception. (Exception
I am getting The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) When i try to open any file using Adobe ... -
#32101 [Com]: Exception in unknown on line 0 when throwing exception inside exception handler
ID: 32101 Comment by: dhopkins at DonHopkins dot com Reported By: ceefour at gauldong dot net Status: No... -
Issue using CDO and ASP when hosted from a Windows Server 2003 box
Hello. I have a function, code below, that I use to send email in ASP via the CDO object. The username and password to the SMTP server are... -
Security Exception - Winform usercontrol hosted in ASP.NET
Please forgive the lengthy post. I am trying to get my winform usercontrol to work properly when hosted in ASP.NET. It is strongly named and has the... -
FMPro Server 5.5 Hosted File Disappeared
In the last 4 days, 2 of my 4 FM database tables have disappeared from the FMPro Server 5.5 list box. The two instances occured 2 days apart from... -
Holly Mazerolle #2
RE: ASP.NET Exception on hosted server
Hi,
The following could possible scenario. I am not sure what you are doing
in your app, but you can check this with the hosting provider:
Your code could be violating SecurityPermissionFlag.ControlPolicy Ability
to manipulate
the principal object
You have to be granted perms to read and write a Principal.Identity.
In the web.config (or possibly machine.config) they have configured CAS
policy to
not grant this permission to the app.
To (un)restrict, read this page:
Using Code Access Security with ASP.NET (.NET Framework Security)
[url]http://msdn.microsoft.com/library/en-us/dnnetsec/html/THCMCh09.asp?frame=tru[/url]
e
Basically, you might need to add this in the trust level file for the app.
<IPermission
class="SecurityPermission"
version="1"
Flags="Assertion, Execution, ControlThread, ControlPrincipal,
RemotingConfiguration"
So, the web.config looks like this:
<trustLevel name="Something" policyFile="someFileLocatedSomeWhere.config"/>
Find out where someFileLocatedSomeWhere is located, and in that file look
for the
<IPermission> from above and add ControlPrincipal.
Or not. Maybe this hosting provider has a very good reason for not granting
that
permission to the app.
This could happen BECAUSE
The hosting provider has tightened their Code access security which
prevents
this.
HTH
This posting is provided "AS IS" with no warranties, and confers no rights.
Holly
Holly Mazerolle Guest



Reply With Quote

