I've written a SmsServiceProvider.dll class to work with the SMS OTP, and now I've stumbled across this error when resetting my password:
Microsoft.IdentityManagement.SmsServiceProviderManager: System.TypeLoadException: An error occurred while loading the custom SMS provider DLL. Please review the inner exception details. ---> System.TypeLoadException: The custom SMS provider DLL does not implement the required interface.
at Microsoft.IdentityManagement.SmsServiceProvider.SmsServiceProviderManager.InitializeSmsServiceProvider()
--- End of inner exception stack trace ---
at Microsoft.IdentityManagement.SmsServiceProvider.SmsServiceProviderManager.InitializeSmsServiceProvider()
at Microsoft.IdentityManagement.SmsServiceProvider.SmsServiceProviderManager.get_ExternalSmsServiceProviderExists()
at Microsoft.ResourceManagement.Workflow.Hosting.SmsNotificationServiceImpl.SendSmsMessage(String mobileNumber, String message, Guid requestId, Dictionary`2 deliveryAttributes)
at Microsoft.ResourceManagement.Workflow.Activities.OneTimePasswordSmsAuthenticationGate.SendOneTimePassword(String plainTextOneTimePassword)
Now the weird thing is that I've seen this in the beginning when fooling around, but then it started working. Now all of a sudden no matter what I do it just doesnt want to work.
Here's my code, a bit stripped though
using System;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.IdentityManagement.SmsServiceProvider;
using System.Diagnostics;
using System.Configuration;
using Shared.DataContracts;
using System.Reflection;
namespace FIM.SmsServiceProvider
{
public class SmsServiceProvider : ISmsServiceProvider
{
readonly static TraceSource trace = new TraceSource("SmsServiceProvider", SourceLevels.All);
public void SendSms(string mobileNumber,
string message,
Guid requestId,
Dictionary<string, object> deliveryAttributes)
{
//some logging stripped
mySMSProvider.SendSms(ui, message);
}
}
}
class mySMSProvider
{
readonly static TraceSource trace = new TraceSource("SmsServiceProvider", SourceLevels.All);
mySMSProvider()
{
}
public static int SendSms(UserInfo ui, string message)
{
//send sms logic stripped
return 1;
}
//public static string GetRequestData(string mobile, string message)
//{
// return "";
//}
//public void GetCredentials()
//{
//}
};
}
This is really really weird, as the only method to implement for that Interface is sendSMS which to me seems pretty present in the code...


