马老师:
您好~~~~
在您百忙这中,打扰您了~~~
我现在在学习中碰到一个问题,我用了Sqlmobile与服务器上的SQLServer 2005同步的功能,没有加SSL的时候,功能正常,可以下载数据.但是我加了SSL的时候,从手机IE里面可以连接上Sqlcesa30.dll,提示证书未受信,继续后,可以看到 SQL Server Mobile Server Agent 3.0, 但在手机上编程下载就不行了,证书类也写了,代码如下:
public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
{
public TrustAllCertificatePolicy()
{
}
public bool CheckValidationResult(ServicePoint servicepoint,
System.Security.Cryptography.X509Certificates.X509Certificate cert,WebRequest req, int problem)
{
MessageBox.Show("Invoke");
return true;
}
}
System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
t = new System.Threading.Thread(new System.Threading.ThreadStart(this.DownLoadDataSynchronize));
可发现根本没到认证这一步来,报错信息
HResult=-2147012841 NaitiveError=28037 将数据发送到运行IIS的请求失败!
我的E-Main: Landy0104@163.com
谢谢您了
蓝天明