473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CryptographicException, 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.Evidence" incorrectly? And another
question is what if I pass Evidence that I've created using
CreateEvidenceForUrl(@"my working directory")? What is the diference
between this evidence and evidence that I've retrieved from Assembly
(this.GetType().Assembly.Evidence)?

Here is the code snippet:

XslTransform xt = new XslTransform();
try
{
xt.Load(new XmlTextReader(stream), null,
this.GetType().Assembly.Evidence);
}
catch(XsltCompileException ex)
{
throw new Exception(Utils.ExceptionsToString(ex), ex);
}

And here is the stacktrace:

Exception: System.Security.Cryptography.CryptographicExceptio n
Message: The parameter is incorrect.
Source: mscorlib
at System.Security.Policy.PolicyLevel.GenericResolve( Evidence
evidence, Boolean& allConst)
at System.Security.Policy.PolicyLevel.Resolve(Evidenc e evidence,
Int32 count, Char[] serializedEvidence)
at System.Security.PolicyManager.Resolve(Evidence evidence,
PermissionSet request)
at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence)
at System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver
xmlResolver, Evidence evidence)
at System.Xml.Xsl.XslTransform.Compile(XPathNavigator stylesheet,
XmlResolver resolver, Evidence evidence)
at System.Xml.Xsl.XslTransform.Load(XPathNavigator stylesheet,
XmlResolver resolver, Evidence evidence)
at System.Xml.Xsl.XslTransform.Load(XmlReader stylesheet,
XmlResolver resolver, Evidence evidence)

Thanks in advance,
Tod
Nov 22 '05 #1
0 1423

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

Similar topics

5
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...
0
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...
1
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...
0
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...
6
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 ( >...
1
by: Rob Richardson | last post by:
Greetings! I have a SQL Server stored procedure that takes one parameter, named @key. I am trying to run that stored procedure from a VB app. When I create a Parameter object and give it the...
1
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...
5
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 ...
6
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...
4
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...
0
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...
0
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,...
1
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...
0
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...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.