locked
SqlCe Exception : Operation is not supported on this platform. RRS feed

  • Question

  • I created a Setup of basic WPF application (By using SqlCe as backend) with login window, but when i open the connection with SqlCe DataBase to check the credentials getting this Exception:  "Operation is not supported on this platform."

    SqlCeConnection conn = new SqlCeConnection(connectionString)
    conn.Open();
    I did some googling and went to MSDN to find out the solution and got that , SqlCe 4.0 is not supported in XP Service Pack 2 and Previous Versions, So why this problems is coming in 2 systems only. I checked the application in various system with window 7 it is working fine but only 2 systems (2 window 7 in which Visual Studio is not installed) this exception is coming. But in all system in which Visual studio is installed is working fine, while i am installing the application using setup.
    Operation is not supported on this platform
    
    at System.Data.SqlServerCe.SqlCeSHA256.Initialize()
       at System.Data.SqlServerCe.SqlCeSHA256..ctor()
       at System.Data.SqlServerCe.HashProvider.CalculateHash(String filePath)
       at System.Data.SqlServerCe.HashProvider.MatchHash(String filePath)
       at System.Data.SqlServerCe.NativeMethods.IsValidBinary(String filename)
       at System.Data.SqlServerCe.NativeMethods.ValidateNativeBinary(String modulePath)
       at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath)
       at System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall)
       at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
       at System.Data.SqlServerCe.SqlCeConnection..ctor()
       at System.Data.SqlServerCe.SqlCeConnection..ctor(String connectionString)
       at POP.Data.DBManager.AuthenticateLogin()
       at POP.Business.POPBusiness.AuthenticateLogin(UsersEntity obj)

     


    So, What setting or changes or fix i have to do for this problem ?????

    Ashutosh Tiwari



    Tuesday, September 3, 2013 5:41 AM

Answers

All replies

  • Hi Tiwari,

    According to your description, I understood there is an issue regarding there is a SQLCE exception on the 2 Windows 7 in which VS is not installed.

    From the exception message, I thought this issue was caused by some component was not installed. When we installed VS, there were many components was installed on our machine, such as .NET Framework, Data Source provider, etc…

    I suggested you to download and install .NET Framework (If your WPF is based on .NET Framework 4.0, you should like to download .NET Framework 4.0. You can download from Microsoft Download Center) on the machine which VS is not installed.

    On the other hand, we should like to install Microsoft SQL Server Compact 4.0. You can download from the following link,

    #Microsoft SQL Server Compact 4.0

    http://www.microsoft.com/en-in/download/details.aspx?id=17876

    Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 4, 2013 3:34 AM
  • With my application setup i have integrated the following things :

                     1. Microsoft .Net Framework 4.0

                     2. Microsoft .Net Framework 4.0 Client Profile

                     3. SQL Server Compact 4.0

                     4. Windows Installer 3.1

                as Prerequisite,  Even then this exception is coming. 

                 


    Ashutosh Tiwari

    Wednesday, September 4, 2013 10:14 AM
  • Hi Tiwari,

    I searched some references about this issue. And found some information. I think it maybe help you to solve this issue. I recommended it to you.

    #SqlCeSHA256 - PlatformNotSupportedException

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7036facb-90a7-44aa-b1d7-7a0983187643/sqlcesha256-platformnotsupportedexception

    #Everything SQL Server Compact

    http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

    If this issue did not fix, please feel free to tell me.

    I think we can find a final solution together.

    Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 10:24 AM