473,770 Members | 7,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request for principal permission failed

Hi!

I have a curious problem in my C# ASP .Net application (Visual Studio
2002, .Net Framework 1.0 SP3 (previously SP2 with the same error -
following), Crystal Reports (shipped with Visual Studio)).

In my page there is an ASP ImageButton. If i click on that a crystal
report will be generated and written into a PDF file. After generating
this button the Button clicked will be set' to invisible.
Sometimes (every about 50 to 500 report starts) the error "Request for
principal permession failed" comes.

The detailed error message is following:
Request for principal permission
failed.[System.Security .SecurityExcept ion] (Rolle:
Administrator-KBL/01/???) mscorlib at
System.Security .Permissions.Pr incipalPermissi on.Demand()| at
System.Security .PermissionSet. Demand()| at
AtosOrigin.BTB. Web.rpt_journal bericht_kbl.get _ibtnPDF()| at
AtosOrigin.BTB. Web.rpt_journal bericht_kbl.Cre atePdf() in
c:\inetpub\wwwr oot\btb_dev\Rep orts\rpt_journa lbericht_kbl.as px.vb:line
1161 BTB.Framework 2128 VMVID-TEST-WEB

CreatePdf() is the method where the PDF-file is generated, line 1161
is following:
ibtnPDF.Visible = false;
(ibtnPDF is NOT a user control, it's an ASP ImageButton)

How can such an exception occur in this line??
To get more information i have written a try/catch block around this
line, and in the catch block i have tried to access the button with
"ErrorLog.Write Line(FindContro l("ibtnPDF").ID )" first and then
directly with "ErrorLog.Write Line(ibtnPDF.ID )".
"FindControl("i btnPDF")" works in this "exception situation", but
"ibtnPDF.ID " not! It seems that the "reference" to the button has
gone!?
I have tried to avoid this error by replacing the "ibtnPDF.Visibl e =
false" by "FindControl("i btnPDF").Visibl e = false". This works almost,
but the next line "lblFiles.T ext = "PDF File öffnen:"" throws the same
exception in this "special situation" (as i said it comes very
rarely).

Can anybody give me a hint how this situation can be or how can i
avoid/solve this?
I would be glad about any comment.

Armin Braunstein
Jul 21 '05 #1
0 4562

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4701
by: Marius Horak | last post by:
I have a window (not webservice) service written in c#. It's running under MyDomain/Administrator account. It fails to execute any store procedure. The error is: "Request for the permission of type System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed." Would it bt a 'pure' dotnet problem or service/SQL Server problem?
1
1841
by: Marius Horak | last post by:
I have a window application written in c#. It connects to a remote SQL Server but it fails to execute any store procedure. The error is: "Request for the permission of type System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed." I'm a new to dotnet and after reading a number of MSDN pages I have no idea
1
4394
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String *ipAddress = S""; IDictionary *server_config = dynamic_cast<IDictionary*>(ConfigurationSettings::GetConfig("ServerAddress") ); ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
0
1288
by: Armin Braunstein | last post by:
Hi! I have a curious problem in my C# ASP .Net application (Visual Studio 2002, .Net Framework 1.0 SP3 (previously SP2 with the same error - following), Crystal Reports (shipped with Visual Studio)). In my page there is an ASP ImageButton. If i click on that a crystal report will be generated and written into a PDF file. After generating this button the Button clicked will be set' to invisible. Sometimes (every about 50 to 500 report...
1
9483
by: Rachel | last post by:
I have created a simple web service in VC# that adds two numbers. It returns an integer value to the client once invoked. I used Visual Studio .NET 2003, Windows XP Pro and .NET 1.1. I created a Windows form client. While debugging I get the following error : Unhandled Exception: System.Net.WebException: The request failed with HTTP status 401: Access Denied. in the following line:
8
13883
by: Bryan Dickerson | last post by:
The full message is: Request for permission of the type 'System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. It happened while trying to execute a small program, from a network share, that will tests the correct installation of some ODBC/OLE drivers. It opens a specific registry key with My.Computer.Registry.LocalMachine and then does a quick SQL query...
2
20847
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. Security Exception Description: The application attempted to perform an operation not
3
12061
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) ---> System.Security.SecurityException: Request for the permission of type
5
8331
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: for the permission of type
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.