.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Intermittent CryptographicException "The system cannot find the file specified."

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF



I'm writing custom web application running on MOSS 2007 (running on Windows Server 2008 R2) with Kerberos setup.

In my code, I'm calling a 3rd party library which internally doing a signing of a string.

Intermittently in production environment, user encounter error message. When I check on the error log, I saw CryptographicExceptions with message "The system cannot find the file specified."


	Inner Exception
	Type : System.Security.Cryptography.CryptographicException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
	Message : The system cannot find the file specified.

	Source : mscorlib
	Help link : 
	Data : System.Collections.ListDictionaryInternal
	TargetSite : System.Security.Cryptography.SafeProvHandle CreateProvHandle(System.Security.Cryptography.CspParameters, Boolean)
	Stack Trace :  at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
	  at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
	  at System.Security.Cryptography.DSACryptoServiceProvider.GetKeyPair()
	  at xx.xxxx.SecurityController.signData(Byte[] message)
	  at xx.xx

View Complete Post

More Related Resource Links

System.Security.Cryptography.CryptographicException: The system cannot find the file specified





When i tried to use a third party web service  using IIS  , i am getting the following Error

Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.

[CryptographicException: The system cannot find the file specified.
   System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +1459868
   System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) +55
   System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() +79
   System.Security.Cryptography.RSACryptoServiceProvider.ExportParameters(Boolean includePrivateParameters) +38
   System.Security.Cryptography.RSA.ToXmlString(Boolean includePrivateParameters) +41
   Globeranger.EdgeServices.Security.Runtime.Client.ClientSession.a() +158
   Globeranger.EdgeServices.Security.Runtime.Client.ClientSession.RequestLogin(String reasonMessage) +200
   Globeranger.EdgeServices.Security.Runtime.Client.ClientSession.GetNewSecureSessionToken(Boolean attemptLogin) +148

Intermittent Tabel Create Failure

Using the following code:             try {                 Server sv = _connectToServer( servername );                 Database db = sv.Databases[ databasename ];                 Table tb = new Table( db, tablename, "dbo" );                 for ( int x = 0; x < schemalist.Count; x++ ) {                     // get field                     SchemaColumn f = schemalist[ x ];                     // make column                     Column col = new Column( tb, f.Header );                     col.DataType.SqlDataType = (SqlDataType)f.DataType;  

SQL Server 2005 x64: Intermittent "Error: 18456, Severity: 14, State: 10."

Hi, We are experiencing intermittent authentication errors "Error: 18456, Severity: 14, State: 10" on a customer's production server. This is a new server that has just been rolled out in the past several months. Rebooting the server appears to make the problem go away. We are using SQL authentication from a separate server that is running IIS. The application always uses the same username and password to connect. Server info: select @@versionMicrosoft SQL Server 2005 - 9.00.2047.00 (X64) Apr 14 2006 01:11:53 Copyright (c) 1988-2005 Microsoft CorporationStandard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1) select @@versionSP1 Sample error from SQL Server errorlog: Date  7/7/2006 10:53:24 AMLog  SQL Server (Archive #2 - 7/7/2006 12:20:00 PM)Source  LogonMessageError: 18456, Severity: 14, State: 10. MSDN (http://msdn2.microsoft.com/en-us/library/ms366351.aspx) lists various states for this error message but 10 is not included, and it says "Other error states exist and signify an unexpected internal processing error." Note: This was not a case of a transient error that occurs only when SQL Server is starting up - these errors occurred at a variety of times, two months after the server was last rebooted / SQL Server last restarted. Thanks for any help you can provide. Regards,-Frank.

Getting Intermittent Execution permission cannot be acquired error

I hope I can explain the issue as I am more of a business/end user than a SharePoint expert. We are running a SharePoint intranet (MOSS 2007) within a Citrix environment. On intermittent occasions, we are receiving the error that I will post at the end of this message. This is happening intermittently and we simply can not reproduce the error.   100% of the time, we perform an IISReset on the SharePoint server and that resolves the problem. I actually have a scheduled task to run each morning to reset IIS, but the error still occurs on occasion. (again, once the error happens, if i reset IIS, it comes back up).   Has anyone ever run into this issue? Any comments or suggestions? Here is the error message:  Execution permission cannot be acquired. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Security.Policy.PolicyException: Execution permission cannot be acquired.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [PolicyException: Execution permission cannot be acquired.]    Syst

Intermittent SharePoint database connect error on SQL cluster

SQL 2008 Cluster has two SQL instances. Two separate SharePoint farms are "connected" with each SQL instance. SharePoint frontend servers eventlog is flooded with "unable to connect with database.." kind of errors for few minutes during diferent time interval. This erros occurs at the same time on both SharePoint farms. (Note that both SharePoint farm doesn't share any info, that is, each farm is running independantly). Someone suggests SQL box has some bandwidth/network issue. Enabled SQL trace. But not sure how to analyze. Can someone help? Thanks in advance    

Error: 0x80070002 The system cannot find the file specified

From Windows Server 2003 Std Ed SP, 32 bit VMWare Virtual Server .Net Framework v1.1.4322 When attempting to run a hello world aspx page it fails to load returning the message "Server Application Unavailable".  The application even viewer logged the following: Event Type: ErrorEvent Source: ASP.NET 1.1.4322.0Event Category: NoneEvent ID: 1088Description:Failed to execute request because the App-Domain could not be created. Error: 0x80070002 The system cannot find the file specified. I tried to run aspnet_regiis.exe -i, rebooted but this did not work. I tried to uninstall, reboot, reinstall .net from the Windows component section of Add/Remove Programs. Does anybody have any ideas? thanks, MP

System.Security.Cryptography.CryptographicException (BAD DATA)

Can anyone help me out in this issue ? Any help will be appreciated Stack Trace: <?xml version="1.0" encoding="utf-16"?>   <error    host="localhost"    type="System.Security.Cryptography.CryptographicException"     message="Bad Data.&#xD;&#xA;"     source="mscorlib"     detail="System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.  System.Exception: Bad Data.&#xD;&#xA; System.Security.Cryptography.CryptographicException: Bad Data.&#xD;&#xA;&#xD;&#xA;   at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)&#xD;&#xA;   at System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]&amp; outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone)&#xD;&#xA;   at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)&#xD;&#xA;   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()&#xD;&#xA;  CODE:   public static string Decrypt(string stringToDecrypt, string sEncryptionKey)         {    &

SSIS w/Oracle intermittent ORA-03135


I'm somewhat new to SSIS and very new to Oracle so any pointers would be helpful.

We're running SSIS 2008 with Oracle 10g source and destinations (using the Attunity connectors).  The SSIS packages run correctly when executed manually and *usually* run on a scheduled basis correctly as well but every several days one of the packages never completes and instead errors out with ORA-03135 (connection lost).

When the package runs correctly it takes about 15 minutes, and on nights it fails it shows as having a duration of over 6 hours culminating in the connection error above.

I haven't seen anything unusual in the alert logs on the Oracle server but I'm not sure if I have all the necessary tracing on - any debugging tips or insight would be greatly appreciated.

Intermittent timeout calling ASMX web service yet Upload data transfer completes OK

I'm calling my webservice from a web page and getting a timeout despite setting very high values in my web.config files. This occurs intermittently when the file is usually pretty large but yet the file is still getting uploaded completely (as if the timeout DID NOT occur). Here is a function in my .aspx file which calls my ASMX proxy class:
private void UploadFile(HttpPostedFile postedFile, string fileNameOnly) 
    // create an instance of the proxy class to talk to our service; calling it client: 

Intermittent EndInvoke error



We have a set of web services which intermitently fail with the error:

System.Web.Services.Protocols.SoapException: EndInvoke can only be called once for each asynchronous operation

Our own code does not use asychronous calls but does make use of WSE and we suspect that something in the WSE stack is failing. In addition we are unable to reproduce the problem in our development environment, the problem only occurs in our beta test environment and even in this environment the problem is very erratic - sometime a request works but the making the same request a few seconds later causes the problem,

Any thoughts/ideas on what we can do to investigate or fix the problem would be much appreciated.

Intermittent unavailability of an instance in a failover cluster while a standby node is offline.


Hi everyone.

I've got a small failover cluster that I run for the websites my company has. During a RAM upgrade of the standby server, our websites started to show errors about not being able to access the database server. I verified that the instance was indeed up and the server accessable via remote desktop.
I also tried a SQL connection to it and it worked, but that might have been after it became available again.

This happened on and off until we were able to roll back the hardware changes that were in progress on the standby server and we were able to bring it back up.

There was nothing of interest in the SQL Server log, but there is a continous log for the whole duration of the problem, so there was no restart of the SQL Server service. The event viewer is of more interest, since it shows events relating to the heartbeat network card, but I don't know how that would affect the availability of the server, since the standby node is offline. I'd appreciate any help you can provide, it's not very redundant if it also depends on the standby server being up. :)

Here are the event logs from the time of the problem:

Level Date and Time Source Event ID Task Category
Information 4/23/2010 10:55:56 AM Microsoft-Wind

Intermittent Picture Flicker on SharePoint 2007 using IE6

Hi I have many sites built within SharePoint 2007 and my users majority use IE6. I have been adding pictures in .jpg format and have had no issues with flicker in IE6... But recently I have added a picture on a new site and it is flickering in IE6. The format is the same as the other pictures but they do no cause flicker. Any suggestions? Thanks --------- Update, I have made the picture that flickers smaller and it has stopped the flicker. So I think it is size or filesize related? Thanks Edit again!! It is linekd to picture height... I have it flickering at 200pixels high but no flicker at 199pixels high So I think that is it, if your pics are over 199pixels and you run IE6 you will get a flicker!

An intermittent error I don't understand.


I'm new to ASP.net and using C# for the language. I wrote an application to track item moving from one location to another. Everything works fine in test and about half of the time in production but Occasionally I get an exception that I can't figure out. Any help would be great. When the user logs in I check for their access level I have stored in a Sybase database. The default page login code behind page has this code:

checkUserAccessLevel newUser = new checkUserAccessLevel();

               int currentUserAccessLevel = 0;

               currentUserAccessLevel = newUser.GetAccess();

The error message has the third line with the error plus a line in the class code file I am using.

Exception message: Object reference not set to an instance of an object.


Here is the class file located in the App_Code directory:

using System;

using System.Data;

using System.Configuration;

using Sybase.Data.AseClient;


public class checkUserAccessLevel


        string _svAppMode = (string)System.Web.HttpContext.Current.Session["_svAppMode"].ToString();

System.EnterpriseServices.dll' because of system error: The system cannot find the file specified.




Can anyone help in resloving this problem I get during the .Net 2.0 Frameworks distribution ?

Thanks in advance!

MSI (s) (7C:A4) [09:33:28:295]: Executing op: ActionStart(Name=CA_InstallAssemblyRB.3643236F_FC70_11D3_A536_0090278A1BB8,,)
11/24/06 09:33:28 DDSet_Exit: InstallAssembly ended with return value 0
MSI (s) (7C:A4) [09:33:28:310]: Executing op: CustomActionSchedule(Action=CA_InstallAssemblyRB.3643236F_FC70_11D3_A536_0090278A1BB8,ActionType=1281,Source=BinaryData,Target=UninstallAssembly,CustomActionData=System.EnterpriseServices,Version=,PublicKeyToken=b03f5f7f11d50a3a,Culture=neutral,ProcessorArchitecture=x86;258048)
MSI (s) (7C:A4) [09:33:28:310]: Executing op: ActionStart(Name=CA_InstallAssemblyDef.3643236F_FC70_11D3_A536_0090278A1BB8,,)
MSI (s) (7C:A4) [09:33:28:310]: Executing op: CustomActionSchedule(Action=CA_InstallAssemblyDef.3643236F_FC70_11D3_A536_0090278A1BB8,ActionType=1025,Source=BinaryData,Target=InstallAssembly,CustomActionData=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll;258048)
MSI (s) (7C:80) [09:33:28:310]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI1D.tmp, Entrypoint: InstallAssembly
11/24/06 09:33:28 DDSet_Status: LANGID: 1033
11/24/06 09:33:28 DDSet_Entry: InstallAssembly started
11/24/06 09:33:28 DDSet_Status: CustomActionData: c

Sql server 2008 R2 x64 / SSMS : Intermittent Connectivity Issue


I have read almost everything on this topic, applied each proposed solution, checked all conf settings but I am stil stuck with these frequent but intermittent connectivity issues.

I moved our databases from a win 2003 + SQL Server 2005 x86 enterprise (where I had no connectivity issue) to a clean install of SQL server 2008 R2 x64 enterprise on Windows Server 2008 R2 x64. Enabled tcp/ip & named pipes, recreated the users (& fixed orphans), opened ports on firewalls client, hardware, even Win Server although it is disabled, applied the UC4 patches, tried various connection strings, created aliases (for x64 and x32), ran the different recommended tools (portQryV2...) to no avail.

Most of the time, I can connect, with SSMS or via code with SqlConnection and execute queries. But frequently, I either lose the connection or cannot connect on the first call. Then it works on subsequent calls. In vb, the  code hangs on the call of the open method of the SqlConnection (and yes I properly close my connections once the queries have been executed). Setting the CommandTimeout has no effect. The code/SSMS freezes for 30/40 seconds.

No error is showing up in the Profiler, Nothing in the SQL Server Logs. The client and the server are on different networks. I connect via TCP/IP(remot

Intermittent Access Denied to Users with Member Permission Levels


Hello Community,


I have another tough SharePoint mystery I am trying to solve.  Essentially, users with Member permission levels are experiencing issues accessing a sub-site of a Site Collection intermittently. Users will Full Control, Site or Farm Collection Administrator access do not experience this issue. When the Site Owner with Full Control permission levels opens the site in the morning then the users with Member permission levels are able to access and navigate the sub-site without issue.  Does anyone have any thoughts on what this type of problem may be related to?





Tom Molskow SharePoint Architect - If I solved the issue please propose my reply as the answer - Thanks!

Firefox ask save file aspx intermittent


I have a project in asp.net 4.0 IIS Win 2003 Server.
It's working perfectly, but after a while, certain pages are asking to save, instead of open.
Ai closing the browser and open the system again, with this back to work, but it's the same problem after a while accessing.

Why is this happening?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend