Symantec Developer Group

 View Only
  • 1.  Create New Resource Web Service

    Posted Jun 06, 2013 08:48 PM

    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);

     



  • 2.  RE: Create New Resource Web Service

    Posted Jun 07, 2013 10:35 AM

    I'm able to get this working after changing the application pool's identity from ApplicationPoolIdentity to LocalSystem.  Is that a good solution?



  • 3.  RE: Create New Resource Web Service

    Posted Jul 18, 2013 02:30 AM

    Hi EathenR,

    I have tried to create an application as mentioned by you. We gave the reference of ResourceModelService. but could not find AltirisWebService.

    Could you tell us that whether the AltirisWebService is an external service created by you or it is provided by Altiris?

    Thanks,

    Prasanna



  • 4.  RE: Create New Resource Web Service

    Posted Jul 18, 2013 09:06 AM

    In C# I added a Web Service Reference which pointed to the WDSL URL.  I called the web service reference AltirisWebService.  If I recall correctly it is call a service reference for a C# console application.

    If needed, I can provide more detail.



  • 5.  RE: Create New Resource Web Service

    Posted Jul 18, 2013 09:10 AM

    Hi Eathen,

    Could you please provide me the URL of the service which you referred? Please let us know about this in details.

    Thanks,

    Prasanna

     

     



  • 6.  RE: Create New Resource Web Service

    Posted Jul 18, 2013 10:14 AM

    Substitute your server name for localhost.

    http://localhost/Altiris/nswebservice/resourcemodel.asmx?WSDL

    Within Visual Studio click Project -> Add Service Reference.

    Put the URL above in the Address line and click go.

    Enter a Namespace.  I called mine AltirisWebService

    Visual studio will discover and create a list of methods.



  • 7.  RE: Create New Resource Web Service

    Posted Jul 26, 2013 06:55 AM

     I have checked and found that Application Pool identities uses the machine account to access network resources and in case of Localsystem ,if the user is administrator then it will work. normally it's better to use identity as ApplicationPoolIdentity but as per the details provided by you it works with LocalSystem.



  • 8.  RE: Create New Resource Web Service
    Best Answer

    Posted Jul 29, 2013 09:16 AM

    I too would like it to use the ApplicationPoolIdentity which is the default.  I switched to the LocalSystem and got it to work.

    I did a complete removal of Symantec and IIS.  Once it was reinstalled it worked with the ApplicationPoolIdentity.



  • 9.  RE: Create New Resource Web Service

    Posted Jul 29, 2013 09:21 AM

    Ok.Thanks for the update.