小编Wad*_*hal的帖子

快速向SQL Server中插入200万行

我必须从文本文件中插入大约200万行.

插入时我必须创建一些主表.

将如此大量的数据插入SQL Server的最佳和快速方法是什么?

c# database sql-server asp.net ado.net

67
推荐指数
4
解决办法
13万
查看次数

IOS推送通知中的问题 - 身份验证失败,因为远程方已关闭传输流

我使用以下代码进行推送通知.

public void PushNotificationIOS(string message, string registrationKey)
{

    string deviceID = registrationKey; 
    int port = 2195;
    String hostname = System.Configuration.ConfigurationManager.AppSettings["HostName"];//"gateway.sandbox.push.apple.com";
    string certPath = string.Empty;
    certPath = System.Configuration.ConfigurationManager.AppSettings["CertificatePath"] + System.Configuration.ConfigurationManager.AppSettings["Cer
    String certificatePath = System.Web.HttpContext.Current.Server.MapPath(certPath);
    string certPassword = System.Configuration.ConfigurationManager.AppSettings["CertificatePassword"];
    TcpClient client = new TcpClient(hostname, port);
    try
    {

        X509Certificate2 clientCertificate = new X509Certificate2(System.IO.File.ReadAllBytes(certificatePath), certPassword);
        X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate);
        SslStream sslStream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
        sslStream.AuthenticateAsClient(hostname, certificatesCollection, SslProtocols.Tls, false);
        MemoryStream memoryStream = new MemoryStream();
        BinaryWriter writer = new BinaryWriter(memoryStream);
        writer.Write((byte)0); …
Run Code Online (Sandbox Code Playgroud)

push-notification apple-push-notifications ios asp.net-mvc-4

6
推荐指数
1
解决办法
260
查看次数