Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Facing Issue (Invalid URI: The Uri string is too long) while posting data in GP 2013 using eConnect version 12.0.0.0

(0) ShareShare
ReportReport
Posted on by 30

I have setup my Web Service using the new eConnect dll’s (version 12.0.0.0) with my application and try to send the Accounts to GP 2013, but I am getting below error message.

"System.UriFormatException: Invalid URI: The Uri string is too long."

Below is the request I am sending to GP 2013 using Microsoft.Dynamics.GP.eConnect.dll (version 12.0.0.0)

<soap:Body><eConnectPost xmlns="RCWebService"><strRequest>VB6|JS82K424J52I78GDS8732BCX09493TYAS63J7H5F|[eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes"][GLAccountType][taUpdateCreateAccountRcd][ACTNUMST]000-2100-00[/ACTNUMST][ACCTTYPE]1[/ACCTTYPE][ACTDESCR]Accounts Payable[/ACTDESCR][PSTNGTYP]0[/PSTNGTYP][CATEGORY]Accounts Payable[/CATEGORY][ACTIVE]1[/ACTIVE][TPCLBLNC]0[/TPCLBLNC][DECPLACS]0[/DECPLACS][FXDORVAR]0[/FXDORVAR][PostSlsIn]1[/PostSlsIn][PostIvIn]1[/PostIvIn][PostPurchIn]1[/PostPurchIn][PostPRIn]1[/PostPRIn][ACCTENTR]1[/ACCTENTR][UpdateIfExists]0[/UpdateIfExists][RequesterTrx]0[/RequesterTrx][/taUpdateCreateAccountRcd][/GLAccountType][/eConnect]</strRequest></eConnectPost></soap:Body>

Below is the Response I get from Microsoft.Dynamics.GP.eConnect.dll (version 12.0.0.0)

eConnectPostResponse xmlns="RCWebService"><eConnectPostResult>System.UriFormatException: Invalid URI: The Uri string is too long.   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)

at System.Uri..ctor(String uriString, UriKind uriKind)

at System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri)

at System.Xml.XmlUrlResolver.ResolveUri(Uri baseUri, String relativeUri)

at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)

at Microsoft.Dynamics.GP.eConnect.EntityMessageContainer.ValidateMessageUsingXsd(String xsdSchemaFile, String xml)

at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_EntryPoint(String connectionString, ConnectionStringType ConnectionType, String sXML, SchemaValidationType

Can anyone look into this and help me out.

Regards,

Geetanjali Agarwal

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Facing Issue (Invalid URI: The Uri string is too long) while posting data in GP 2013 using eConnect version 12.0.0.0

    Geetanjali      

    Were you able to resolve this issue. I am stucked into the same. Can you help.

    Regards

    Humayun

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Facing Issue (Invalid URI: The Uri string is too long) while posting data in GP 2013 using eConnect version 12.0.0.0

    Hi Geetanjali,

    Load the Xml into a StringReader and then read it into the DataSet.

    for eg:-

    DataSet ds = new DataSet();

    StringReader stringReader = new StringReader(xml);

    ds.ReadXml(stringReader );

    stringReader.Dispose();

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans