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

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

Getting "The process must have access rights for the private key." clientside error when the process

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :WCF

When I run my client side code I keep getting this error:

The certificate 'CN=WCFClientCert' must have a private key. The process must have access rights for the private key.

The ClientCert certificate is in my Current User\Personal\Certificates store.

I created it using:

makecert -sk WCFClientCert-iv WCFServiceCA.pvk -n "CN=WCFClientCert" -ic WCFServiceCA.cer -sr CurrentUser -ss My -sky exchange -pe WCFClientCert.cer

, so I did do -sky exchange and -pe.

I used findprivatekey.exe to find the location of WCFClientCert's key, and went to its location in the directory. But the file already had all the permissions I could think of. Administrator, COMPUTERNAME\Users, the account I log into, SYSTEM, etc.

I have run the client code from both within Visual Studio 2010s Debug mode, and from building the project and its setup/deployment project and actually installing it on a machine. The actual installation was on another machine, but I am getting the same error.

The WCF Service is on a separate server, and I received this error when installing the service, but fixed it by adding the NETWORK USER user to the permissions on the key file. (service is hosted on IIS).

So why am I receiving the same error on the client side, but the same solution does not work?


Thank you in advance for any he

View Complete Post

More Related Resource Links

Error "The process cannot access the file ....." occurs while using function "ExportToStream"


Dear all,

   I sometimes get the following error while printing crystal report to pdf:

   System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because
it is being used by another process. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export
(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream
(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
 at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) at
 CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) at
 CommonWA.CommonFunc.GetPDFMemoryStream(DCMSReportDoc _dcmsreportdoc, Boolean& _DataExist) in E:\wwwroot\ASPWA\CommonWA\CommonCom.vb:line 382

  The error not occurs frequently but sometimes it will happen, can someone tell me why the error occurs and how can I solve the problem?

Thank you very much.


Execute Process task - On Error (i want to override the error message)

Hi, In my package I am calling one exe to copy the files from local folders to SFTP. I am using a execute process task and I am passing the parameters like (address, username, password,....). The exe and syntax are given below. SFTPCopier.exe <<machinename>> <<username>> <<password> <<local directory path>> The problem is when the exe is failing to copy the files to SFTP due to some reason, the SSIS package is outputting the entire command in the log information (including the username & password). I dont want to write the password in the log information. I want to remove that password from the log information when an error occured in the execute process task. Can some one please tell me the way to override the message? Can I put a on error handler for that execute process task and use a script task to modify the "ErrorDescription" variable? Will that works? Thanks in advance.  

Login error - No process is on the other end of the pipe on initial logon attempt

I am having a logon problem with asp.net apps that were created using Visual Web Developer 2008.  Data is on SQL Server Express 2008 running on Windows 2003 server with IIS6.  Connection is on a LAN.  The first time I try to log in to the site, I get the following error:Server Error in '/' Application.A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)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.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)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:[SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No proce

Restoring 2008 Database with Filestream - Process cannot access file error

I'm trying to restore a copy of a database that has a filestream and am getting the error below. I've tried with move option to specify a new path and left it with default path, neither worked. Did a trace with procmon, didn't see anything. FileStream1 is a new folder that the restore process creates. I've deleted the folder, tried it with a new name, re-took the backup from the source machine, restarted SQL, rebooted the machine, drive permissions are open. I've run out of ideas on how to debug further. Looking up the error online wasn't much help either. Msg 3634, Level 16, State 1, Line 1 The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'OpenFile' on 'X:\Data\FileStream1\4ecb2e48-0eee-4c99-a3f0-f1e6c7f00b24\f2efe374-9481-4c1b-a7f2-dcdcee350807\0000001b-0000aaa6-00f6'. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. ' SQL Server 2008 SP 1, MS Server 2008 R2 Server

Stuck during restore process, no error messages

I need to restore a solution (a webpart) from a Sharepoint 2010 backup to another Sharepoint 2010 installation on another server. In CA and exactly in the page _admin/BackupStatus.aspx I see that: A backup or restore is currently in progress. There are no current or recent backup or restore processes to show. If you recently started a backup or restore process, you may need to refresh this page after several minutes for it to appear. Hours have passed since I started the restore process In _admin/ServiceRunningJobs.aspx there is no backup/restore job running. The question is: What can I do to try again a restore if I cannot stop the restore that is "running"? Please Help.  

Log Reader Error: The process could not execute 'sp_repldone/sp_replcounters'

I have transactional replication going between servers A and B. SQL Server 2005 64 bit A is Publisher B is Distributor and Subscriber Now I am getting the following Log reader Agent Error Msg The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011) Get help: http://help/MSSQL_REPL20011 Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database at a time. If you executed a log-related procedure, drop the connection over which the procedure was executed or execute sp_replflush over that connection before starting the Log Reader Agent or executing another log-related procedure. (Source: MSSQLServer, Error number: 18752) Get help: http://help/18752 The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017) Get help: http://help/MSSQL_REPL22017 The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037) Get help: http://help/MSSQL_REPL22037 Can anybody help me in solving this issue? I read that we have to delete the existing publication and subscription.  Is there any way to solve this problem without deleting the existing subscription and publication Any help would be appreciated Thanks

Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection

Hello All, Suddenly, the sql server is down, in the log file, C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG, I found the record as follows, 2007-03-05 15:40:31.59 Logon       Error: 17189, Severity: 16, State: 1.2007-03-05 15:40:31.59 Logon       SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems. [CLIENT:] What else I can do to further investigate? Thanks Spencer

Import Error: Could not process the file Documents/Application Deployment.mht as a Single File Web P

Hi there everyone, Version: Windows Sharepoint Services 3.0 with Cumulative Update June 29, 2010 applied. I am having issues importing an exported site into a different domain. I've overcome most of the issues and actually got most of the site to import, however, the import process get's stuck on import a Single File Web Page document from a document library. I believe the original cause of this error is http://support.microsoft.com/kb/980079 The issue I face now is, I already have a large number of .mht files in my document library which I do need to import into the test environment (or that I might need to restore in a DR scenario). Does anyone have any information on either: forcing the import commmand to "on error resume next" (ie. not stop processing when it encounters an error) fixing the already corrupt .mht files in the database easily The error text from the import command is: Error: Could not process the file Documents/Application Deployment.mht as a Single File Web Page document. at Microsoft.SharePoint.Library.SPRequest.CreateOrUpdateFileAndItem(String bstrUrl, String bstrWebRelativeUrl, Guid& docId, Object varDoc, Int32 docLength, Int32 exists, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Int32 iVersion, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String checkInComment, Int3

Analysis Service Process Dimension Cause : OLE DB error: OLE DB or ODBC error: ORA-00942: table or v

Dear Gurus, I'd face a "STRANGE" problem. I'm using SQL2008 connect to Oracle Data Source (OracleOldDB.1) When I process a snow-flake dimension . There is a ORA-00942 problem. But if I past the SQL Statement to a Oracle Tool . It worked without any problem. Does any body ever face this "STRANGE" problem ? And I'd try to remove this table from data-source-view and re-join it . Still same problem !!  Wilson

Connection Error: (provider: Shared Memory Provider, error: 0 - No process is on the other end of th

Hello,Please bear with me as I am no Sql Server guru, but am getting this error that is preventing me from continuing with my development work.  I am the only developer on my team running Sql Server 2005 and it has been working just fine for the last week.  I opened the Management Studio this morning, just like every other morning and got this error:TITLE: Connect to Server------------------------------ Cannot connect to (local). ------------------------------ADDITIONAL INFORMATION: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233) Of course the help page says no help is available.  I have googled myself sick and still have not found a way so resolve this...has anyone else had this error and/or a fix?  I am using XP Pro SP2...any help would be greatly appreciated!Thanks!Steph

Fatal Error in Process

Not sure if this is the best place to ask, but here goes: I have a SQL Server Alert set up for Fatal error 20 on our production server.  If there is a fatal error of 20, I get emailed.  Ocassionally, this happens, and I get the following message: DESCRIPTION:   The client was unable to reuse a session with SPID 118, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.  Of course, the SPID is usually different... My problem is, I can't track down any other information about this error.  There's nothing else in the SQL logs, or the Windows application logs.  I would like to use profiler, but the error only happens every couple days, and I don't really want the overhead of running profiler all the time.  If I run a trace on our production server without using the profiler GUI, and store the output to a file on a different server, what would be the impact on our production server? Any help is much appreciated!Clint

SSIS Execute Process Task Give "Access is Denied" error but it is not related to access control.

Hello All - I have a very weired SSIS problem. I am using BIDS in two machines - Windows 7 Professional Edition x64 bit (development workstation) and Windows 2003 Standard Edition x32 bit SP2 (server) . The visual studio version on both the machines are Version 2.0.50727 SP2. I found that my package's ExecuteProcessTask fails with "Access is denied" error in Windows2003 but runs ok in Windows 7 dev box. I then tried to debug the package in the Windows 2003 environment itself. The package failed in debug mode too with the same message. After looking for a while I found that when I shorten the Argument length of the failing ExecuteProcessTask the task did seem to work. So in Windows2003 environment if my argument exceeds 1846 characters the ExecuteProcessTask fails with message "Access is Denied". If the argument string is less than 1846 it works ok. In Windows 7 environment there is no problem at all. It does not seem like access problem but I may be wrong. Has anyone seen this? I will appreciate any reply. Thanks, Niben  

FCB::Open: Operating system error 32(The process cannot access the file because it is being used by

Hello all,I am running into an interesting scenario on my desktop.  I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition).  OS is autopatched via corporate policy and I saw some patches go in last week.  This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up.  I chalked it up to the hard shutdown and went along my merry way.  Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday.  7 of the 18 databases on my machine came up withFCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf'. Diagnose and correct the operating system error, and retry the operation.and it also logs  FCB:pen failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to Fal

error in process cube


hi all

im trying to process a cube and im geting this error:

OLE DB error:the qurery has been canceled because the estimated cost of this query (1039) exceeds the configured thredshold  of 300

any help?

Webservice, server was unable to process request error


System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XsdValidatingReader.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at BusinessObjects.OrderHelper.PlaceOrder(String StrorderXml) in C:\Documents and Settings\mchinta\My Documents\Visual Studio 2008\Projects\CcbApp\BusinessObjects\OrderHelper.cs:line 63
   at IServiceReference.IOrder.PlaceOrder(String orderXml) in C:\Documents and Settings\mchinta\My Documents\Visual Studio 2008\Projects\CcbApp\IServiceReference\IOrder.asmx.cs:line 24
   --- End of inner exception stack trace ---

Here is my XML

<?xml version='1.0' encoding='utf-8' ?><Order>Data</Order>

My S

Memory error: Allocation failure : Not enough storage is available to process this command. .



I get the error message above. Cube has 3 measure groups, 1 main fact and 2 many to many facts. Main fact has 450k rows, other two have 165 rows and 2200k rows. It also has 4 dimensions. Dimensions have max 10000 rows.

I get the errors when I add a "calculated" fact to the the main fact group, which is a distinct count on a key. When I remove that fact, the error is gone.

I am using sql 2005 enterprise with the latest sp's and patche on a windows 2003 server with 4GB 32 bit. Any ideas ?


Database mail process does not start, no error generated, for only one maintenance plan

I have three maintenance plans:

1. Application DBs - 2am (checks integrity, full backup, log backup)
2. System DBs - 3am (checks integrity, updates statistics, full backup)
3. Backup and log file cleanup - 3:30am (removes backup history, .bak and .trn files)

For items 1 and 3 above, I see the database mail process start up and receive emails that the jobs completed.  For item 2, no email....the database mail process does not start and there are no errors in the event log.  The job history shows that the job completed successfully.

I'm having the same problem on a different server, except that items 2 and 3 email me their results, but item 1 does not.  Same exact job steps and times of execution.  None of the jobs are set to notify the operator, the notification is coming from the maintenance plan.

Obviously I've gone through the basics:

Configured an operator
Created a default, public profile
Enabled mail profile in SQL Server agent
Tested mail delivery

How do I diagnose the database mail process just not starting?  Has anyone seen this before?

SQL Server 2005 SP3, with KB 970892 applied.
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