I am also getting the following error:
Scenario -- While saving my sccm application in C# , I get "The SMS Provider reported an error."
Code--
public static void StoreApplication(Application application, String configMngrServerName, out String message)
{
Exception ex = null;
message = "Saving Application in progress.";
try
{
// connect to provided server
_connectionManager = new WqlConnectionManager();
_connectionManager.Connect(configMngrServerName);
// Initialize application wrapper and factory for creating the SMS Provider application object.
ApplicationFactory factory = new ApplicationFactory();
AppManWrapper wrapper = AppManWrapper.Create(_connectionManager, factory) as AppManWrapper;
// Set the application into the provider object.
wrapper.InnerAppManObject = application;
// prepare result object
factory.PrepareResultObject(wrapper);
// Save to the database.
wrapper.InnerResultObject.Put();
message = "Application " + application.Name + " saved successfully.";
}
catch (SmsException exception)
{
ex = exception;
}
catch (Exception exception)
{
ex = exception;
}
finally
{
if (ex != null)
{
message = "ERROR saving application in StoreApplication(). Details: " + ex.Message;
}
_connectionManager.Close();
_connectionManager.Dispose();
}
}
//at InnerResultObject.Put() I am getting the exception...
Error Details--
instance of SMS_ExtendedStatus
{
Description = "User .... is not able to get the lock at this time. Error: 0x40480732";
ErrorCode = 1078462258;
File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\ssputility.cpp";
Line = 3659;
ObjectInfo = "CObjectLock";
Operation = "PutInstance";
ParameterInfo = "";
ProviderName = "ExtnProv";
StatusCode = 2147749889;
};
Stack--
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
at TestCM2012App.Form1.SaveApplication(Application applicationRequest) in