"EndPoint could not dispatch the request" error when calling webservice

May 5, 2011 at 4:15 PM

Hello,

I'm trying to use the Resource Management Client to add a request to FIM.  The code I'm writing will be running with the credentials of FIM Service Account.  When I attempt to run the code I hit the following error:

System.ServiceModel.FaultException: The endpoint could not dispatch the request.
   at Microsoft.ResourceManagement.Client.ClientHelper.HandleFault(Message message) in C:\Users\Administrator\Desktop\fimwebservice\fim2010client_c0471ec93c2f\Microsoft.ResourceManagement.Client\ClientHelper.cs:line 12
   at Microsoft.ResourceManagement.Client.WsEnumeration.WsEnumerationClient.Enumerate(EnumerationRequest request) in C:\Users\Administrator\Desktop\fimwebservice\fim2010client_c0471ec93c2f\Microsoft.ResourceManagement.Client\WsEnumeration\WsEnumerationClient.cs:line 54
   at Microsoft.ResourceManagement.Client.EnumerationResultEnumerator.MoveNext() in C:\Users\Administrator\Desktop\fimwebservice\fim2010client_c0471ec93c2f\Microsoft.ResourceManagement.Client\EnumerationResultEnumerator.cs:line 68
   at BlueCloud.GroupMappingManager.GMM.RemoveUserFromGroup(String groupDisplayName, String userAlias) in C:\Users\Administrator\Desktop\fimwebservice\fim2010client_c0471ec93c2f\Samples\examples\GMM.cs:line 26
   at Mms_ManagementAgent_BlueCloud_RulesExtension_SourceExtension.MAExtensionObject.Microsoft.MetadirectoryServices.IMASynchronization.MapAttributesForImport(String FlowRuleName, CSEntry csentry, MVEntry mventry) in C:\BlueCloud\BlueCloud.RulesExtension.SourceExtension\BlueCloud.RulesExtension.SourceExtension.cs:line 104

Running the same code using the Administrator account ( I used to install FIM ) or FIMMA account, works fine.

I want to avoid impersonation, and having to store the FIMMA account credentials.  Is there any way to give another account the permissions to access the web services?

Thanks

Sam Amin

Coordinator
May 6, 2011 at 7:15 AM

Hi Sam,

If it's a permissions issue, you just have to define an MPR that allows the account you are using to perform the selected operation.

If you post the code that fails, I might be able to help you defining the MPR.

Cheers,
Paolo 

May 18, 2011 at 2:12 PM

Hi Sam, hi Paolo,

I have the same problem, my code is as follows:

        string displayName = "Zizou zizou";

        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);

            transaction.BeginChanges();
            person.Description = userDescription.Text;
            person.AccountName = userAccountName.Text;
            person.DisplayName = userDisplayName.Text;

            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }

When I execute, i have this error: EndPoint could not dispatch the request.

the stack is:

The endpoint could not dispatch the request.

Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.

Détails de l'exception: System.ServiceModel.FaultException: The endpoint could not dispatch the request.

Erreur source:

Ligne 18 :             MessageFault fault = MessageFault.CreateFault(message, Int32.MaxValue);
Ligne 19 :            
Ligne 20 :             throw System.ServiceModel.FaultException.CreateFault(fault,
Ligne 21 :                 typeof(PermissionDeniedFault),
Ligne 22 :                 typeof(AuthenticationRequiredFault),


Fichier source : C:\Users\hammoum\Documents\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs    Ligne : 20

Trace de la pile:

[FaultException: The endpoint could not dispatch the request.]
   Microsoft.ResourceManagement.Client.ClientHelper.HandleFault(Message message) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs:20
   Microsoft.ResourceManagement.Client.WsTransfer.WsTransferClient.Put(PutRequest request) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\WsTransfer\WsTransferClient.cs:147
   Microsoft.ResourceManagement.Client.DefaultClient.Put(RmResourceChanges transaction) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\DefaultClient.cs:179
   modifyUser.Modifier_Click(Object sender, EventArgs e) in c:\Users\Visual Studio 2010\WebSites\WebSite2\modifyUser.aspx.cs:67
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
 

//=======================================================
But whene I try with

        string displayName = "Zizou zizou";

        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);

            transaction.BeginChanges();
            person.Description = "Desctioption test";//not variable
            person.AccountName = "account name test";//
            person.DisplayName = "display name test";//

            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }

it works well.

thank you for your help.

May 18, 2011 at 2:39 PM
Hi
In our case the problem was that the account that this code was running under didn't have rights to access the web service.
To allow the account to use the web service you have to make sure it's synced into the portal, that it's Objectsid is copied to the portal, and that it is added to the administrator set.
-Sam
Sent from my iPhone

On May 18, 2011, at 5:12 PM, "hammou" <notifications@codeplex.com> wrote:

From: hammou

Hi Sam, hi Paolo,

I have the same problem, my code is as follows:

        string displayName = "Zizou zizou";

        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);

            transaction.BeginChanges();
            person.Description = userDescription.Text;
            person.AccountName = userAccountName.Text;
            person.DisplayName = userDisplayName.Text;

            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }

When I execute, i have this error: EndPoint could not dispatch the request.

the stack is:

The endpoint could not dispatch the request.

Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.

Détails de l'exception: System.ServiceModel.FaultException: The endpoint could not dispatch the request.

Erreur source:

Ligne 18 :             MessageFault fault = MessageFault.CreateFault(message, Int32.MaxValue);
Ligne 19 :            
Ligne 20 :             throw System.ServiceModel.FaultException.CreateFault(fault,
Ligne 21 :                 typeof(PermissionDeniedFault),
Ligne 22 :                 typeof(AuthenticationRequiredFault),


Fichier source : C:\Users\hammoum\Documents\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs Ligne : 20

Trace de la pile:

[FaultException: The endpoint could not dispatch the request.]
   Microsoft.ResourceManagement.Client.ClientHelper.HandleFault(Message message) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs:20
   Microsoft.ResourceManagement.Client.WsTransfer.WsTransferClient.Put(PutRequest request) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\WsTransfer\WsTransferClient.cs:147
   Microsoft.ResourceManagement.Client.DefaultClient.Put(RmResourceChanges transaction) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\DefaultClient.cs:179
   modifyUser.Modifier_Click(Object sender, EventArgs e) in c:\Users\Visual Studio 2010\WebSites\WebSite2\modifyUser.aspx.cs:67
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


//=======================================================
But whene I try with

        string displayName = "Zizou zizou";

        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);

            transaction.BeginChanges();
            person.Description = "Desctioption test";//not variable
            person.AccountName = "account name test";//
            person.DisplayName = "display name test";//

            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }

it works well.

thank you for your help.

May 18, 2011 at 2:53 PM

hello Sam,
my problem is not related to rights. because:

  • client.creat(person); is successfully
  • client.delete(person.objectID); is successfully
  • client.put(transaction);  is:
    • successfully whene I put [person.Description = "Desctioption test";]
    • not successfullu whene I put [person.Description = userDescription.Text;]

I dont know why it works with "Desctioption test" but no with userDescription.Text;

thnks


Developer
May 18, 2011 at 2:57 PM

In other words: log into the portal with the user that will be running your code below and try to make the same changes to the same object. Once you get this working in the portal it should work fin in the client code.

-Jeremy

From: SamAmin [email removed]
Sent: Wednesday, May 18, 2011 7:40 AM
To: jeremy@palenchar.net
Subject: Re: "EndPoint could not dispatch the request" error when calling webservice [fim2010client:256514]

From: SamAmin

Hi

In our case the problem was that the account that this code was running under didn't have rights to access the web service.

To allow the account to use the web service you have to make sure it's synced into the portal, that it's Objectsid is copied to the portal, and that it is added to the administrator set.
-Sam
Sent from my iPhone


On May 18, 2011, at 5:12 PM, "hammou" <notifications@codeplex.com> wrote:

From: hammou

Hi Sam, hi Paolo,

I have the same problem, my code is as follows:

        string displayName = "Zizou zizou";
 
        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);
 
            transaction.BeginChanges();
            person.Description = userDescription.Text;
            person.AccountName = userAccountName.Text;
            person.DisplayName = userDisplayName.Text;
 
            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }

When I execute, i have this error: EndPoint could not dispatch the request.

the stack is:

The endpoint could not dispatch the request.

Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.

Détails de l'exception: System.ServiceModel.FaultException: The endpoint could not dispatch the request.

Erreur source:

Ligne 18 :             MessageFault fault = MessageFault.CreateFault(message, Int32.MaxValue);
Ligne 19 :            
Ligne 20 :             throw System.ServiceModel.FaultException.CreateFault(fault,
Ligne 21 :                 typeof(PermissionDeniedFault),
Ligne 22 :                 typeof(AuthenticationRequiredFault),


Fichier source : C:\Users\hammoum\Documents\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs Ligne : 20

Trace de la pile:

[FaultException: The endpoint could not dispatch the request.]
   Microsoft.ResourceManagement.Client.ClientHelper.HandleFault(Message message) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\ClientHelper.cs:20
   Microsoft.ResourceManagement.Client.WsTransfer.WsTransferClient.Put(PutRequest request) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\WsTransfer\WsTransferClient.cs:147
   Microsoft.ResourceManagement.Client.DefaultClient.Put(RmResourceChanges transaction) in C:\Users\Visual Studio 2010\Projects\ClientFIM2010\Microsoft.ResourceManagement.Client\DefaultClient.cs:179
   modifyUser.Modifier_Click(Object sender, EventArgs e) in c:\Users\Visual Studio 2010\WebSites\WebSite2\modifyUser.aspx.cs:67
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


//=======================================================
But whene I try with
        string displayName = "Zizou zizou";
 
        DefaultClient client = new DefaultClient();
        client.ClientCredential = Credential.GetAdminCredential();
        client.RefreshSchema();
        try
        {
            foreach (RmPerson person  in client.Enumerate("/Person[DisplayName='" + displayName + "']"))
            {
            RmResourceChanges transaction = new RmResourceChanges(person);
 
            transaction.BeginChanges();
            person.Description = "Desctioption test";//not variable
            person.AccountName = "account name test";//
            person.DisplayName = "display name test";//
 
            client.Put(transaction);//the exception occurs here
            transaction.AcceptChanges();
            }
        }
        catch (Exception e1)
        {
            userDescription.Text = e1.Message;
        }
it works well.

thank you for your help.
May 18, 2011 at 3:26 PM

Hi Jeremy,

Yes in FIM Protal this modification is successfully.

Even on my client it works but with static value, not with variable.

  • this modification work: person.AccountName = "account name test";
  • this modification deosnt work: person.AccountName =userAcountName.Text; // userAcountName.Text is equal to "account name test";

Hammou

Developer
May 18, 2011 at 3:43 PM

You may need to dig down into the client with the debugger. Set a breakpoint in the code right before the client calls the web service. Examine the request that is working vs. the request that isn’t working to see if there are any differences.

-jeremy

From: hammou [email removed]
Sent: Wednesday, May 18, 2011 8:26 AM
To: jeremy@palenchar.net
Subject: Re: "EndPoint could not dispatch the request" error when calling webservice [fim2010client:256514]

From: hammou

Hi Jeremy,

Yes in FIM Protal this modification is successfully.

Even on my client it works but with static value, not with variable.

  • this modification work: person.AccountName = "account name test";
  • this modification deosnt work: person.AccountName =userAcountName.Text; // userAcountName.Text is equal to "account name test";

Hammou

May 19, 2011 at 9:28 AM

hi,

I did what Jeremy had said me "You may need to dig down into the client with the debugger"

and I serialize objects "REQUEST"and"TRANSACTION":

 

 public bool Put(RmResourceChanges transaction)
        {
            if (transaction == null)
            {
                throw new ArgumentNullException("transaction");
            }

            PutRequest request = this.requestFactory.CreatePutRequest(transaction);


            XmlSerializer serializer = new XmlSerializer(request.GetType());
            TextWriter textWriter = new StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\\requestdynamic.xml");
            serializer.Serialize(textWriter, request);
            textWriter.Close();

            /*
            PutResponse response = this.wsTransferClient.Put(request);
            if (response == null)
                return false;
            else*/
                return true;
        }
the result with :
            person.Description = "Desctioption test";//not variable
            person.AccountName = "account name test";//
            person.DisplayName = "display name test";//
is:
transaction.xml
 <?xml version="1.0" encoding="utf-8" ?> 
- <RmResourceChanges xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <RmObject>
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  </RmObject>
  </RmResourceChanges>
request.xml
  <?xml version="1.0" encoding="utf-8" ?> 
- <PutRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <ModifyRequest Dialect="http://schemas.microsoft.com/2006/11/ResourceManagement/Dialect/IdentityAttributeType-20080602">
- <Change Operation="Replace" xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess">
  <AttributeType>Description</AttributeType> 
- <AttributeValue>
  <Description xmlns="http://schemas.microsoft.com/2006/11/ResourceManagement">test</Description> 
  </AttributeValue>
  </Change>
- <Change Operation="Replace" xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess">
  <AttributeType>DisplayName</AttributeType> 
- <AttributeValue>
  <DisplayName xmlns="http://schemas.microsoft.com/2006/11/ResourceManagement">test</DisplayName> 
  </AttributeValue>
  </Change>
- <Change Operation="Replace" xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess">
  <AttributeType>AccountName</AttributeType> 
- <AttributeValue>
  <AccountName xmlns="http://schemas.microsoft.com/2006/11/ResourceManagement">test</AccountName> 
  </AttributeValue>
  </Change>
  </ModifyRequest>
  </PutRequest>

the result with:
            person.Description = userDescription.Text;
            person.AccountName = userAccountName.Text;
            person.DisplayName = userDisplayName.Text;

transaction.xml

  <?xml version="1.0" encoding="utf-8" ?> 
- <RmResourceChanges xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <RmObject>
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  <KeyValuePairOfRmAttributeNameRmAttributeValue /> 
  </RmObject>
  </RmResourceChanges>

 

request.xml
  <?xml version="1.0" encoding="utf-8" ?> 
- <PutRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModifyRequest Dialect="http://schemas.microsoft.com/2006/11/ResourceManagement/Dialect/IdentityAttributeType-20080602" /> 
  </PutRequest>
in the second case, the request is empty.
I think that the bug is in RmrequestFactory CreatePutRequest; but why that worck with static value and not with dynamic value??? 
Coordinator
May 23, 2011 at 11:52 AM

Hammou,

do you validate the inputs from the web application?

What does "userDescription.Text" property (which apparently makes things go wrong) contain? Have you tried for example something like

string description = userDescription.Text.Trim();
if (!string.IsNullOrEmpty(description)) {
    person.Description = description;
}

Cheers,
Paolo


May 24, 2011 at 10:04 AM

Hi Poaolo

the problem is that the onclick event of button change is treated after calling the method page-load (...).
So the fields are réinisialise, and I made ​​no changes, this causes the error!

for this in protected void Page_Load(object sender, EventArgs e) I initialize the values of controls if the Display name=="".

thnks

Coordinator
May 24, 2011 at 10:51 AM

Hi Hammou,

I think that you should rather check the IsPostback property of the Page, which tells you if the page is being accessed for the first time or not.

However, I'm glad you made it work somehow.

Cheers,
Paolo