小编aru*_*ira的帖子

存储过程中的表值参数获取执行权限被拒绝错误

调用具有表值参数作为参数之一的存储过程时,我收到以下错误

EXECUTE对象'ValidationErrors' 的权限被拒绝

ValidationErrors是使用以下语句创建的TVP:

CREATE TYPE [dbo].[ValidationErrors] AS TABLE(
    [ErrorMessage] [varchar](255) NOT NULL
)
Run Code Online (Sandbox Code Playgroud)

执行存储过程的用户对存储过程具有执行权限.但是,我仍然得到上述错误.有任何想法吗?

.net sql-server enterprise-library

21
推荐指数
1
解决办法
7158
查看次数

从RSACryptoServiceProvider创建X509Certificate2失败,无法找到请求的对象

示例代码:

        CspParameters cspParameters = new CspParameters();
        cspParameters.ProviderType = 1; // PROV_RSA_FULL

        // Create the crypto service provider, generating a new
        // key.
        mRsaCSP = new RSACryptoServiceProvider(mDefaultKeyLength, cspParameters);
        mRsaCSP.PersistKeyInCsp = true;
        RSAParameters privateKey = mRsaCSP.ExportParameters(true);


        byte[] rsaBytes = mRsaCSP.ExportCspBlob(true);

        try
        {
            X509Certificate2 cert = new X509Certificate2(rsaBytes);                
            mKeyDataPfx = Convert.ToBase64String(cert.Export(X509ContentType.Pkcs12, password));
        }
        catch (Exception ce)
        {
            string error = ce.Message;
        }
Run Code Online (Sandbox Code Playgroud)

.net c# rsa x509certificate2 x509

8
推荐指数
1
解决办法
5401
查看次数

标签 统计

.net ×2

c# ×1

enterprise-library ×1

rsa ×1

sql-server ×1

x509 ×1

x509certificate2 ×1