J'ai créé une fonction définie par l'utilisateur et l'ai exécutée. Il renvoie le message d'erreur ci-dessous. Besoin de votre soutienSQL CLR - Longueur non valide pour un tableau ou une chaîne char Base-64
public partial class UserDefinedFunctions
{
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlBoolean SqlFunctValidateUserCred()
{
bool verify = Crypto.VerifyHashedPassword("test", "test1");
return verify;
}
}
Erreur:
Msg 6522, Level 16, State 2, Line 11 A .NET Framework error occurred during execution of user-defined routine or aggregate "SqlFunctValidateUserCred": System.FormatException: Invalid length for a Base-64 char array or string. System.FormatException: at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s) at System.Web.Helpers.Crypto.VerifyHashedPassword(String hashedPassword, String password) at UserDefinedFunctions.SqlFunctValidateUserCred()
Pouvez-vous s'il vous plaît plus d'expliquer comment votre message répondre à la question? –