.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

Private deployment of SQL CE 3.5 SP2 on .NET 4.0 blocked by no aparrent way to private deploy the Vi

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server

I find many discussion threads on this topic, some a lot clearer than others, but I really am trying to avoid having to include either the .NET Framework 2.0 or Visual C++ Runtime 2005 in my ClickOnce deployment of a .NET 4.0 application for which I strongly want to do a private deployment.  I'm deploying to hundreds to thousands of machines outside of the corporate umbrella, and I really want to minimize the number of dependencies outside the application.  My current goal is to keep it to JUST .NET 4.0 (and the windows installer to support that).  However, installs on clean Windows XP SP2 and SP3 machines fail to load the private deployment of SQL CE engine.  It's frustrating that everyone seems to give up and fall back on doing full installs of more prereqs.

Based on reviewing the threads out there, I feel pretty confident that I understand the problem, and I can get it to work by just my .NET 4.0 ClickOnce prereq and then a manual install of the Visual C++ 2005 Runtime redistributable.  Therefore, I am convinced I have everything working other than the VC runtime.  As far as I have read, I am supposed to be able to do a "private assemblies" deployment of the VC runtime as well by including in my copy deployment the Microsoft.VC80.CRT and Microsoft.VC80.MFC that are available under a VS.NET 2005 install.

View Complete Post

More Related Resource Links

MSSQL CE 3.5 SP2 Private Deployment

I use Visual C# express 2008 for my development.  I use MSSQL CE3.5 SP1 and have deployed this will my application for over a year as a private deployment (just included all the DLLs in my project).  This has worked well and kept me from being dependent on the product deployments.  I am running into an issue with the application deploying on Windows 7 64-bit home edition.  From my readings it seems that I need to upgrade to the MSSQL CE 3.5 SP2 but the indication is that I need to deploy 32-bit and the 64-bit SP2 for the 64-bit environements.  Since my development environment is on Windows XP I have not found a way to obtain the 64-bit version of the DLLs to include in my project as a private deployment.  Can I do this?  Is there a better way?  Where can I get the 64-bit DLLs. Thanks in advance for any help anyone can provide.David Allen

private deployment of SQL CE & accesss from unmanaged code. Possibel?



is it possible to access an sql ce database from unmanaged code, if i do private deployment? Unfortunatelly we have some  scenarios where we must assume that neither .net frameork nor sql ce is installed. Do we have any chance to use sql-ce in this scenarios?

Thanks in advance!










SSC 3.5 SP2 Private Deployment issue on Windows Mobile with SSC 3.5 (3.5.5386) installed


I want to deploy applications that use Private Deployment for SQL Server Compact 3.5 SP2 for Windows Mobile.
I made test sample according to SQL Server Compact 3.5 Service Pack 2 Books Online instructions.

I tested with WM 6.5 device and emulator.

I deploy to application folder on WM the following files:
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\System.Data.SqlServerCe.dll
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i\sqlceme35.dll
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i\sqlceqp35.dll
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i\sqlcese35.dll

The code is simple:
using (SqlCeConnection sqlCeConnection = new SqlCeConnection())
   button1.Text = sqlCeConnection.ServerVersion;

When I run my test on clean WM 6.5(with SSCE 3.1 in ROM), it's ok. Server version is 3.5.8080.0.

When I run my test on WM 6.5 with SSC 3.5 SP1 installed, test fails with the error:
The application is trying to load native components of version 5386 that are incompatible with ADO.NET provider of version 8080.
Incompatible versions can lead to application instability and hence loading of SQL Server Compact has been aborted.

VB2008 Express and SQL Server CE 3.5 private deployment issues


Windows Forms application developed with VB 2008 Express.
Using private deployment as described in SQL Server Books Online.
Deploying SQL CE version 3.5.8080.0.
Development system is 32 bit Windows 7 Home Premium SP1 version 6.1.7601.65536.
System installed SQL CE version is 3.5.8080.0.

For several months of development there have been no issues with this setup.  A month or so ago I began getting an occasional error message while making updates to the application in the development environment.  The message dialog would come in waves of three several minutes apart and would subside once I rebuilt the project.  The error message is "Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider version 8080".
The application uses a designer generated DataSet.  While trying to add an additional TableAdapter from the DataSet to the main form the above mentioned error dialog, for which I would click OK, would try to prevent changes from being made.  After several design environment restarts and restoring the impacted form.Designer.vb and .resx files I could finally complete making changes in the form designer.

The changes in the designer were not carried over into the

SQLCE 3.5 SP2 private deploy method issue

I have a c# application that uses private deploy method with a SQLCE 3.5 SP2. If my application is installed on a machine already having SQLCE 3.5 SP1 installed. It uses the SP1 version in GAC rather then my private deployment. 
Is there a way to force what sqlce version to run? Im my case i want MY SP2 version to run. The problem im facing is http://support.microsoft.com/kb/958478/EN-US. And i dont want the enduser to install sp2 or hotfix since im providing the correct sqlceruntime through my private deployment.
Ive looked into a simalar case, http://stackoverflow.com/questions/1165190/is-there-a-way-to-force-using-a-dll-version, but its the other wayaround :/. The problem seems to be the assemblyversion, its in both SP1 and SP2 for System.Data.SqlServerCe.dll so i cant use his "fix". 
My SqlCe versions:
SP1: 3.5.5692.0
SP2: 3.5.8080.0
Any thoughts suggestions on this issue?

Private deployment: CRT binary not signed?


I want to use SQL CE 4 in my WPF application. I've added the contents of SQLCE's Private/ folder to my project and modified the app.config, as described here. The application worked fine with SQL CE 4 before I switched to private deployment.

When I run the application, I get a SqlCeException, the message roughly translates to "The CRT binary in the application/bin folder is not signed and might pose a security risk. Put the original Microsoft CRT binary in the application/bin folder."

I used Windows Explorer to check all dll's in the x86/Microsoft.VC90.CRT and amd64/Microsoft.VC90.CRT folders, they are digitally signed.

SMTP not working if I use web deployment package to deploy my app.


Hi all

I use msdeploy to install my web app. deployment package. everything about web app works, but find out email was not working.

I checked telnet smtp is running.

I debug the project, and it was sending out email too.

So my solution was upload the whole project (not complied) to wwwroot, and email works too. Thats why I assume the deployment cause the problem.

at last, I also tried to copy the web deployment web.config to replace the project's web.config, and the email also work, so it wasn't the web.config problem.

Could anyone tell me whats going on?

My environment:

window 2003

iis 6

.net framework 4.0

Security: Protect Private Data with the Cryptography Namespaces of the .NET Framework


The .NET Framework includes a set of cryptographic services that extend the services provided by Windows through the Crypto API. In this article, the author explores the System.Security.Cryptography namespace and the programming model used to apply cryptographic transformations. He discusses reasons why cryptography is easier in .NET than it was before, including the easy programmatic acccess developers have to the cryptography APIs and the difference between symmetric and asymmetric algorithms. Along the way, a brief discussion of the most widely used algorithms, including RSA, DSA, Rijndael, SHA, and other hash algorithms, is provided.

Dan Fox

MSDN Magazine June 2002

Checkout/Chevk in issue in MOSS 2007 while connecting through VPN(virtual private network)


HI, I am using VPN connection . When I try modify a file and try to checkin the file in sharepoint document library it does not gets checked in. I get a message saying

"Unable to checkin the file, since File is being edited in Local Draft, please close the application or discard the checkout ".

Please do the needful....



Certificate API question - Private Key.

I am trying to follow http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2.aspx but I am finding that the Private Key property of the certificate is always null. I created the certificate with makecert -pe -n "CN=BuySeasonsThirdParty" -r -b 08/26/2010 -e 08/26/2011 -sky exchange Amazon.cer. Then installing it on the local user store using: X509Store store = new X509Store(storeName, StoreLocation.CurrentUser); and using the same API to get the certificate from the store. The certificate that I retrieve from the store is non-null it is just the PrivateKey is null. So I can encrypt using something like: ((RSACryptoServiceProvider)cert.PublicKey.Key).Encrypt(Encoding.Unicode.GetBytes(text), true)   But since the Private Key property is NULL I cannot decrypt. Any ideas? Kevin

System.Messaging - Error accessing properties of remote private queues - "UnsupportedFormatNameExcep

I'm having some difficulty accessing private queues on a remote machine, but no trouble using remote public queues or private queues on a local machine. Calling: System.Messaging.MessageQueue.GetPrivateQueuesByMachine("machine"); ..succesfully returns the array of private queues on the remote machine.  However, trying to access nearly all of the properties on these MessageQueue objects returns: MessageQueueErrorCode: UnsupportedFormatNameOperation Message:"The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted." I have no trouble accessing queues created identically on the local machine using GetPrivateQueuesByMachine("."), plus accessing public queues using GetPublicQueuesByMachine("machine") also returns MessageQueue objects that are useable. The FormatName returned appears to be valid, as you would expect from queues retreived via GetPrivateQueuesByMachine().  e.g: FormatName:Direct=OS:machine\\private$\\example ..so I think the error message returned may be somewhat spurious. The permissions on the queues all appear to be set correctly.  I had even attempted allowing "Full Control" to "Everyone" on these queues as an experiment, with the same results. Any ideas for other things I might try? p.s. I am running Windows XP SP2, using .NET 2.

Private Security Model Integration

Does anyone have any recommendations on tieing the Microsoft AS security model in with an independent security model. We are at the beginning process to discuss this with a very large international partner and are looking for recommendations form anyone who has done this before. Thanks in advance Alan

Question about RSA Decrypt using private key

Hello,      I am doing a project to communiate with a bank. I send a message which was sign by my private key to the bank and get a response from the bank. The message like below: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iR0JLIj8+CjxtZXNzYWdlIG1ldGhvZD0iZXJyb3IiIHR5cGU9InJlc3BvbnNlIj4KICAgIDxkYXRlPjIwMTAwNTI4PC9kYXRlPgogICAgPHRpbWU+MTEwMzQ1PC90aW1lPgogICAgPHJldENvZGU+QVVUSDBFSTwvcmV0Q29kZT4KICAgIDxjb21tZW50UmVzPuacquW8gOWNoTwvY29tbWVudFJlcz4KPC9tZXNzYWdlPgo= Then I try to decrypt the message. The code like below:        public static string ParsePayment(HttpRequest request)     {         string CertificatePW = "123456";         string prikey_path = HttpContext.Current.Server.MapPath("~/App_Data") + "\\certificate\\test.pfx";         return CerRSADecrypt(Convert.FromBase64String(aa), prikey_path, CertificatePW);          }         public static string CerRSADecrypt(byte[] DataToDecrypt, string prikey_path, string CertificatePW)     {                        &nbs

Exception when initializing private key from xml string (RSACryptoServiceProvider using FromXmlStrin

Hi, I'm trying to create a private key using the following code segment   System.Security.Cryptography.AsymmetricAlgorithm key = new System.Security.Cryptography.RSACryptoServiceProvider();string privateKeyXml = File.ReadAllText(fullPathPrivateKey);key.FromXmlString(privateKeyXml);   It does work with .NET Framework 3.5 SP1 on Windows XP, but when I try to run it on .NET Framework 4.0 on Windows 7 I get the following exception ((System.Security.Cryptography.RSACryptoServiceProvider)(key)).CspKeyContainerInfo.Exportable' threw an exception of type 'System.Security.Cryptography.CryptographicException', with message "Key does not exist". Full stack trace is shown below: System.Security.Cryptography.CryptographicException: Key does not exist. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at System.Security.Cryptography.Utils._GetProviderParameter(SafeProvHandle hProv, Int32 keyNumber, UInt32 paramID) at System.Security.Cryptography.CspKeyContainerInfo.get_Exportable() Does anyone have a clue to why this doesn't work on .NET 4.0? Regards, Simon

How to Import a Public/Private key pair into RSA Key Container

Hi,I am trying to build a RSA decryption application with .NET(windows application). I have had my public / private keys used in existing applications, and want to reuse them. The question is how I can import them into a RSA Key Container (used in RSACryptoServiceProvider), or is there any other way that can re-use these keys?Thank you in advance,Junbin

RSA Private/Public key

I have an web application that encrypts data using a public and sent it to another web application. Which will then decrypt the data using a the user private key.My question is, since but the Private and Public key are generated in the first application. how does the other application get the private?Thanks!
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