FIM CM Provisioning API
Hello, I want to create an Enroll request as described in the getting started MSDN site as a win32 console application. i always get the error System.ArgumentNullException: Value cannot be null. Parameter name: channelProperties This appears, because the remoting configuration is not set. Since i am new in c# and .net, I did not found where to set it up. Therefore i tried to initialize this inside my script using System.Runtime.Remoting. RemotingConfiguration.Configure(configFileLocation,false); were configFileLocation is a file containing the proposed configuration from msdn. But i receive again the same error message. Could you give me a hint, what i am doing wrong or at least where i can configure the remoting. Thanks in advance
October 13th, 2010 4:36pm

Sorry, but it seems some formatting went wrong here therefore i am repeating the last lines... i am using System.Runtime.Remoting.RemotingConfiguration(configFileLocation,false); were configFileLocation is a file containing the proposed configuration from msdn. But i receive again the same error message. Could you give me a hint what i am doing wrong or at leat where i can configure the remoting. Thanks in advance
Free Windows Admin Tool Kit Click here and download it now
October 13th, 2010 4:40pm

Hello Christos, Have you tried following these steps? http://msdn.microsoft.com/en-us/library/bb468077(VS.85).aspx Once you have your exe.config file, you can use this code to load it in your exe: Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); RemotingConfiguration.Configure(config.FilePath, false);
October 14th, 2010 9:14pm

Hi Henna, Thanks for your quick reply. I made the change you suggested, but i still get the error. System.ArgumentNullException: Value cannot be null. Parameter name: channelProperties at Microsoft.Clm.Provision.FindOperations.get_Proxy() at Microsoft.Clm.Provision.FindOperations.GetProfileTemplate(Guid profileTemplateUuid) at CLMEnrollTest.CreateEnrollmentTestClass.Main() Inside my code i made even the settings FindOperations.UseRemoting = true; and RequestOperations.UseRemoting = true; Find my code below Cheers Christos public static void Main() { StreamWriter file; if (!File.Exists("logs.txt")) { file = new StreamWriter("logs.txt"); } else { file = File.AppendText("logs.txt"); } Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); RemotingConfiguration.Configure(config.FilePath, false); string sUuid = "a89eee17-450c-40d3-9517-fcb6a66e32ad"; Guid uuid = new Guid(sUuid); try { FindOperations.UseRemoting = true; ProfileTemplate profileTemplateUuid = FindOperations.GetProfileTemplate(uuid); if (profileTemplateUuid == null) { file.WriteLine("Could not find a Profile Template for uuid {0}", sUuid); // Caller should deal with error checking, etc. return; } string input ="DOMAIN\tuser16"; 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); file.WriteLine("Enroll request uuid: {0}", enrollRequest.Uuid); } } catch (Exception ex) { file.WriteLine(ex); } file.Close(); } } }
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2010 4:05pm

<channels> <channel ref="http" useDefaultCredentials="true" port="0"> <clientProviders> <formatter ref="binary" /> </clientProviders> </channel> </channels> Do you have a channels section in your exe.config file like the one above?
October 18th, 2010 5:24am

Hi Henna, i didn't and i tried. Unfortunately i got the same error... System.ArgumentNullException: Value cannot be null. Parameter name: channelProperties if i use the port 80 i got this error System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions Regards Christos
Free Windows Admin Tool Kit Click here and download it now
October 18th, 2010 2:03pm

Hi, I made the changes described in http://support.microsoft.com/kb/970308 and the result is that the Client is configured OK. Nevertheless it seems that the FindOperations still fails. Bye Christos
October 18th, 2010 2:55pm

Hi Christos, Ensure that you have the following section properly defined in the FIM CM web.config file: <system.runtime.remoting> <application> <channels> <channel ref="http" priority="100"> <serverProviders> <provider ref="wsdl" /> <formatter ref="binary" typeFilterLevel="Full" /> </serverProviders> <clientProviders> <formatter ref="binary" /> </clientProviders> </channel> </channels> <service> <wellknown mode="Singleton" type="Microsoft.Clm.BusinessLayer.RemoteRequests, Microsoft.Clm.BusinessLayer" objectUri="remoterequests.rem" /> <wellknown mode="SingleCall" type="Microsoft.Clm.Provision.RequestOperationsByCulture, Microsoft.Clm.Provision" objectUri="remoterequests2.rem" /> <wellknown mode="SingleCall" type="Microsoft.Clm.Provision.FindOperationsByCulture, Microsoft.Clm.Provision" objectUri="remoterequests3.rem" /> <wellknown mode="SingleCall" type="Microsoft.Clm.Provision.PermissionOperationsByCulture, Microsoft.Clm.Provision" objectUri="remoterequests4.rem" /> <wellknown mode="SingleCall" type="Microsoft.Clm.Provision.ExecuteOperationsByCulture, Microsoft.Clm.Provision" objectUri="remoterequests5.rem" /> </service> </application> <customErrors mode="off" /> </system.runtime.remoting> Note the channel settings and the service settings. For testing purposes, use all of the wellknown settings. Note the Microsoft.Clm.BusinessLayer.RemoteRequests entry; ensure that is present. In your application configuration file, ensure the following has been added (with the correct URL to your CM server): <system.runtime.remoting> <application> <channels> <channel ref="http" useDefaultCredentials="true" port="0"> <clientProviders> <formatter ref="binary" /> </clientProviders> </channel> </channels> <client> <wellknown type="Microsoft.Clm.Provision.FindOperationsByCulture, Microsoft.Clm.Provision" url="http://clm-server-name/clm/remoterequests3.rem" /> <wellknown type="Microsoft.Clm.Provision.RequestOperationsByCulture, Microsoft.Clm.Provision" url="http://clm-server-name/clm/remoterequests2.rem" /> <wellknown type="Microsoft.Clm.Provision.PermissionOperationsByCulture, Microsoft.Clm.Provision" url="http://clm-server-name/clm/remoterequests4.rem" /> <wellknown type="Microsoft.Clm.Provision.ExecuteOperationsByCulture, Microsoft.Clm.Provision" url="http://clm-server-name/clm/remoterequests5.rem" /> </client> </application> </system.runtime.remoting> In your code, initially set the UseRemoting to True to test the above. If that fails, and you are running the application on the same server as the FIM CM, set the UseRemoting to False and test again. Good luck, MarcMarc Mac Donell, ILM MVP, VP Identity and Access Solutions, Avaleris Inc.
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2010 4:15pm

Hi, I am facing same problem even tried what you suggested Marc. but one more thing in my case CA is not properly installed and i cant see my CA data in FIM CM database. Can you please guide
February 5th, 2011 11:27pm

This means that you have one of two things wrong: 1) The connection string is incorrect in the properties of the Exit Module at the CA 2) You have not created a logon for the CA computer account in SQL or have not assigned the CA computer account the CLMApp role for the FIMCertificateManagement database. The record for the CA is created in the CertificateAuthority table only after the CA computer account successfully authenticates and connects to the FIMCertificateManagement databasevia the connection string Brian
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2011 12:15am

Hi Brian, I realised one thing that connectionstring given in test lab is not proper we need to remove "provider" from it. your input was helpful thanks
February 9th, 2011 2:29am

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

Other recent topics Other recent topics