none
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.

    2011年3月25日 下午 02:07

解答

  • That's odd. I wanted to build the setup so I could put it on a Win7 box without SP1, so I switched to Release mode. I ran it once more on my box, and it worked... It also works now in Debug mode - no idea what's going on.   
    2011年3月28日 上午 07:29

所有回覆

  • And the manifest file is there as well?

    Which OS and SP level?


    Visit my SQL Server Compact blog - Please mark as answer, if this was it.
    2011年3月25日 下午 03:17
    版主
  • Yes, the manifest is there. I copied the entire directory.

    I'm running Windows 7 SP 1, and using VS 2010 SP 1.

    2011年3月25日 下午 06:43
  • Is it a Win 7 SP1 issue? Can you test on Win 7 RTM?
    Visit my SQL Server Compact blog - Please mark as answer, if this was it.
    2011年3月25日 下午 09:06
    版主
  • That's odd. I wanted to build the setup so I could put it on a Win7 box without SP1, so I switched to Release mode. I ran it once more on my box, and it worked... It also works now in Debug mode - no idea what's going on.   
    2011年3月28日 上午 07:29
  • Sometimes I get almost the same exception, but can't reproduce it deterministically. It's like 1 out of 20 times.

    "The CRT binary present in application/bin folder is not signed and can be a potential security risk. Please place the original Microsoft CRT binary in application/bin folder."

    The environment is: Visual Studio 2010 SP1, SQL CE 4 - Private install, WPF application, Windows Vista 32bit SP2

    2011年5月16日 下午 02:24
  • Hello,

    I have the same problem with two of my end-users. It looks like the problem could exists only the first time after system boot/reboot. Second attempt to establish the connection succeeds.

    Both users are using: Microsoft Windows NT 6.1.7601 Service Pack 1

    call stack:

    System.Data.SqlServerCe.NativeMethods.ValidateCRT(String appDirectory)
    System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath)
    System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall)
    System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
    System.Data.SqlServerCe.SqlCeConnection..ctor()
    System.Data.SqlServerCe.SqlCeConnection..ctor(String connectionString)

    regards
    Bart

    2012年5月28日 上午 07:11