FIM CM provision api
Hi, I am using provision api to create custom web application for enroll. I have used remoting for achieving this but i get below error System.DirectoryServices.DirectoryServicesCOMException was caught Message=There is no such object on the server My web.config file is <configuration> <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="Microsoft.Clm.Provision, Version=4.0.2592.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="Microsoft.Clm.Shared, Version=4.0.2592.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/Login.aspx" timeout="2880"/> </authentication> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/> </providers> </membership> <profile> <providers> <clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/> </providers> </roleManager> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> <system.runtime.remoting> <application> <channels> <channel ref="http" useDefaultCredentials="true"> <clientProviders> <formatter ref="binary"/> </clientProviders> </channel> </channels> <client> <wellknown type="Microsoft.Clm.Provision.FindOperationsByCulture, Microsoft.Clm.Provision" url="http://localhost/CertificateManagement/remoterequests3.rem"/> <wellknown type="Microsoft.Clm.Provision.RequestOperationsByCulture, Microsoft.Clm.Provision" url="http://localhost/CertificateManagement/remoterequests2.rem"/> <wellknown type="Microsoft.Clm.Provision.PermissionOperationsByCulture, Microsoft.Clm.Provision" url="http://localhost/CertificateManagement/remoterequests4.rem"/> <wellknown type="Microsoft.Clm.Provision.ExecuteOperationsByCulture, Microsoft.Clm.Provision" url="http://localhost/CertificateManagement/remoterequests5.rem"/> </client> </application> </system.runtime.remoting> </configuration> My code is string sUuid = "E52935D0-8931-451A-B59E-276098F52EC2"; Guid uuid = new Guid(sUuid); try { FindOperations.UseRemoting = true; ProfileTemplate profileTemplateUuid = FindOperations.GetProfileTemplate(uuid); if (profileTemplateUuid == null) { Response.Write("Could not find a Profile Template for uuid "); return; } string input = "FIMPOC\administrator"; if (!string.IsNullOrEmpty(input)) { Guid userTarget = new Guid(input); RequestOperations.UseRemoting = true; Microsoft.Clm.Shared.Requests.Request enrollRequest = RequestOperations.InitiateEnroll(profileTemplateUuid.Uuid, null, userTarget, "My comment", 101); Response.Write("enroll uid" + enrollRequest.Uuid); } } catch (Exception ex) { Response.Write("there is some issue"); Response.Write(ex); } Can you please suggest any input in this front
February 18th, 2011 10:36pm

I think your problem is in the Usertarget Guid. you have: Guid userTarget = new Guid(input) where input is: string input = "FIMPOC\administrator" input is in the form of a NT username. and for the creation of the guid, it need to be in, well the form of a guid (something like: "0ed45616-b32f-4c5b-82af-55e8be1f6df8") If you can set up a directoryentry to your user account you are provisioning. you can get the users GUID by using the .Guid.ToString method.
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 5:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics