Anyone have success using the CreateNewResource command from the ResourceModelService. I'm able to use the GetResource, DeleteResource and SaveResource. It is only CreateNewResource that fails. I've setup a simple ASP.Net web app that uses the web service to create a new Asset Resource type, but I keep getting an error stating SRV does not have access to redirection.config. I found a article stating the App pool needs access to the file. Adding full control did not help.
AltirisWebService.ResourceModelService rms = new AltirisWebService.ResourceModelService();
System.Net.NetworkCredential cred = new System.Net.NetworkCredential();
cred.Domain = "DOMAIN";
cred.UserName = "USERNAME"
String pswd = "PSWD";
System.Security.SecureString SecureString = new System.Security.SecureString();
foreach (char x in pswd)
{
SecureString.AppendChar(x);
}
cred.Password = pswd; //SecureString;
rms.Credentials = cred;
AltirisWebService.ResourceDataInfo rdi = new AltirisWebService.ResourceDataInfo();
rdi.Name = "SouftwawrPurch12313";
rdi.ResourceTypeGUID = new Guid("b9ee0ab2-ae0e-4867-bf4c-41d4a382163b");
//rms.DeleteResource(new Guid("47703632-5fe9-48b1-8d7c-9246eef95b02"));
rms.CreateNewResource(new Guid("b9ee0ab2-ae0e-4867-bf4c-41d4a382163b"), rdi);