473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CryptographicEx ception, The parameter is incorrect.

Not so long I've found really strange bug in the .NET. It seems that
Evidence that I've got from the current executing Assembly is somehow
expired (it happens suddenly after about month) and Xslt Transformation
stop working at all for the whole AppDomain until I restart it. Am I
using "this.GetType() .Assembly.Evide nce" incorrectly? And another
question is what if I pass Evidence that I've created using
CreateEvidenceF orUrl(@"my working directory")? What is the diference
between this evidence and evidence that I've retrieved from Assembly
(this.GetType() .Assembly.Evide nce)?

Here is the code snippet:

XslTransform xt = new XslTransform();
try
{
xt.Load(new XmlTextReader(s tream), null,
this.GetType(). Assembly.Eviden ce);
}
catch(XsltCompi leException ex)
{
throw new Exception(Utils .ExceptionsToSt ring(ex), ex);
}

And here is the stacktrace:

Exception: System.Security .Cryptography.C ryptographicExc eption
Message: The parameter is incorrect.
Source: mscorlib
at System.Security .Policy.PolicyL evel.GenericRes olve(Evidence
evidence, Boolean& allConst)
at System.Security .Policy.PolicyL evel.Resolve(Ev idence evidence,
Int32 count, Char[] serializedEvide nce)
at System.Security .PolicyManager. Resolve(Evidenc e evidence,
PermissionSet request)
at System.Security .SecurityManage r.ResolvePolicy (Evidence evidence)
at System.Xml.Xsl. Compiler.Compil e(NavigatorInpu t input, XmlResolver
xmlResolver, Evidence evidence)
at System.Xml.Xsl. XslTransform.Co mpile(XPathNavi gator stylesheet,
XmlResolver resolver, Evidence evidence)
at System.Xml.Xsl. XslTransform.Lo ad(XPathNavigat or stylesheet,
XmlResolver resolver, Evidence evidence)
at System.Xml.Xsl. XslTransform.Lo ad(XmlReader stylesheet,
XmlResolver resolver, Evidence evidence)

Thanks in advance,
Tod
Jul 21 '05 #1
0 2424

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

Similar topics

5
7402
by: Michelle Kinsey-Clinton | last post by:
Hello, I am writing an ASP app which is giving me some very frustrating errors. They appear intermittently, no real pattern to them, and often go away if you reload, or back up a few pages and start over again. The first error is logged as a 400 error and says only, "The parameter is incorrect." It (mostly, but not always) happens upon submitting a form, and a reload is generally successful in bringing the page up just fine. I have...
1
3110
by: jasonjbwalton | last post by:
Hi I am implementing a solution based upon Sitecore CMS version 4.3.2.6 ..Net 1.1 on a Windows 2003 server We are experiencing an error once in a while when transforming XML with XSLT. We receive an exception System.Security.Cryptography.CryptographicException (incorrect parameter)
0
322
by: Nick Jones | last post by:
Hello, I've got the following problem on two machines and have had no luck tracking down a solution. I've seen two other people make similar posts this year but with no response. Has anyone got any ideas about how to go about finding a solution or what the solution might be? Many thanks, Nick
6
1924
by: Tim Barg | last post by:
I am using a CryptoStream to encrypt and then save an xml file. However, when reading it back in, I am getting a CryptographicException. I am hitting this because I have some large xml files ( > 10MB) and I only need a certain node...I use an XmlTextReader to find the node I need, and then attempt to abort reading in the rest of the xml, but when I close the XmlTextReader I get the exception. I've included some sample code and xml that...
0
1584
by: Tod Johnson | last post by:
Not so long I've found really strange bug in the .NET. It seems that Evidence that I've got from the current executing Assembly is somehow expired (it happens suddenly after about month) and Xslt Transformation stop working at all for the whole AppDomain until I restart it. Am I using "this.GetType().Assembly.Evidence" incorrectly? And another question is what if I pass Evidence that I've created using CreateEvidenceForUrl(@"my working...
1
1605
by: Brad | last post by:
Our .Net 2 web apps recently started getting CryptographicExceptions from WebResource.axd, and these almost always seem to be when the client is a web crawler...most notably googlebot (but a few times it is a client browser such as IE). I'm curious if anyone has some insight as to why this would be happening, if there is a way to resolve this. If it was just a web crawler I'd ask if we should even care. The error is - ...
5
3629
by: Dennis | last post by:
Hi I'm trying to alter my stored procedure to take a parameter for the Database Name, but as usual the syntax is killing me. Thanks for any help Dennis '--------------------------------------------------------------------------­-------------------------------- Before - This Works without a paramater '--------------------------------------------------------------------------­--------------------------------
6
6308
by: andrew | last post by:
Hi, I have a web service application written in C# .NET 1.1 using MD5CryptoServiceProvider.ComputeHash(Byte) The problem is that after a while(web service processes requests) the call throws CryptographicException "the parameter is incorrect" Here's the stack trace: System.Security.Cryptography.CryptographicException: The parameter is
4
2635
by: Porty | last post by:
Hi all, I admittedly don't know the first thing about .NET. I have a new client who has been having problems on her website and asked me to look into it (she has lost contact with the programmer who originally did this work for her). I know some programming languages, but this is not one of them and I am hoping someone can help me. My client has a real estate website and I get the following error (per her complaint) when I try and sign up...
0
9480
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
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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...
1
10083
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8968
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...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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

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.