System.Security.SecurityException: Failed to get permission request for primary

Can someone point me in the right direction, how can I fix this error?

System.Web.Services.Protocols.SoapException: Server was unable to process request. 
     ---> System.Security.SecurityException: Request for principal permission failed.
at System.Security.Permissions.PrincipalPermission.ThrowSecurityException()
at System.Security.Permissions.PrincipalPermission.Demand()
at System.Security.PermissionSet.DemandNonCAS()
at LiveDocx.MailMerge.SetLocalTemplate(String template, String format)

I installed this software that my company purchased from LiveDocx. Thus, I have no way to change the code or even read the code. I installed everything in accordance with their documentation, and the site confirmed that it works. I can only change settings in IIS, folder permissions and Web.config. Our server, their software.

Now I have a problem with you logging in to the web service. Before you think that this is a soap client, I confirmed that it works by calling vendor servers.

Locally, I can successfully call the web service during login, and it works fine. However, when I make a subsequent call, I get Request for principal permission failed.

At the request of their technical support, I added <trust level="Full" />to web.config, but this did not work. Now they have stopped responding to our letters.

I am not an ASP.NET developer, so my knowledge is limited by the server settings. Can someone point me in the right direction, why this error occurs, and a few places to look to solve this problem?

+5
source share
4 answers

- . . , , , . web.config, .

, web.config <authentication> . ( ) - , cookie. , , LiveDocx. , Request for principal permission failed. , .

ASP.NET 2.0

+2

, , , , ASP.Net -, IIS.

- IIS ( ), ( , ), .

, .

+2

, -, cookie.

Web.config -

<authentication mode="Forms">
  <forms name="AuthCookie" path="/"></forms>
</authentication>

web.config,

<authentication mode="Forms">
  <forms name="WRONGCOOKIENAME" path="/"></forms>
</authentication>

- , :

[PrincipalPermissionAttribute(SecurityAction.Demand, Role = "Foo", Authenticated = true)]

, , , cookie . cookie .

+2

, . "" " ".

, web.config, .

If you have an application ported from WinXP to Win7 and another higher version, you can see that there is a managed pipeline that, by default, points the website to Intergrated mode. I changed this to classic mode, which fixed the problem. Hope this helps members who are trying to port the application from WinXp to Win7

+2
source

All Articles