Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8222951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:29:42+00:00 2026-06-07T14:29:42+00:00

I am trying to pass the following XML text to RIA services in a

  • 0

I am trying to pass the following XML text to RIA services in a query operation that returns a queryable sequence of entities in response:

<?xml version="1.0" encoding="utf-8"?>
<project>
    <item type="Item" filetype="cabinet" category="EZ Workshop" name="EZW Panel Edge-Banded" height="24.000000" width="36.000000" depth="0.725000" quantity="1">
    </item>
    <item type="Item" filetype="cabinet" category="EZ Furniture" name="Entry Bench" height="19.000000" width="48.000000" depth="17.999999" quantity="1">
    </item>
    <item type="Item" filetype="cabinet" category="EZ Closet Euro Style" name="CSEKD Tall H3R 28-72W 12-24D" height="84.000000" width="54.000000" depth="19.999999" quantity="1">
    </item>
    <item type="Item" filetype="assembly" category="EZ Pro ManCave" name="EZ Corn Hole Game-Set" height="0" width="0" depth="0" quantity="1">
    </item>
    <item type="Item" filetype="assembly" category="EZ Office" name="EZ 30 Printer Stand" height="0" width="0" depth="0" quantity="1">
    </item>
    <item type="Item" filetype="assembly" category="Corporate Culture Pro" name="C-Table" height="0" width="0" depth="0" quantity="1">
    </item>
</project>

This is the query operation:

[Query]
public IQueryable<ProjectItem> GetItemsFromImport(String a_strImportXml)
{
    // Return empty sequence for now as a test.
    return new ProjectItem[0].AsQueryable();
}

When I pass the full XML, I get that annoying “Not Found” exception, and the break-point in my operation is never hit. I’m using Visual Studio 2010’s ASP.NET Development Server. When I get “Not Found” with that it portends bad stuff. The kicker is, when I pass an empty string, I get no exceptions at all, and the break-point is hit.

As you can see its not a tremendously long XML document. Is there some limit to the amount of data sent? Do I have to escape the document?

Thanks.

Edits:

I discovered that I only had to escape the structural characters (‘<‘, ‘>’, and ‘&’) out of the document before I sent it. I’m using String.Replace to do it. Does anyone know if there is a better way to accomplish this. Something similar to Uri.EscapeDataString perhaps?

var strImportXml = a_xImport.ToString();
strImportXml = strImportXml.Replace("&", "&amp;");
strImportXml = strImportXml.Replace("<", "&lt;");
strImportXml = strImportXml.Replace(">", "&gt;");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:29:44+00:00Added an answer on June 7, 2026 at 2:29 pm

    Ok, so I guess this is standing as the answer to my own question. I discovered that I only had to escape the structural characters (‘<‘, ‘>’, and ‘&’) out of the document before I sent it. I’m using String.Replace to do it. Does anyone know if there is a better way to accomplish this. Something similar to Uri.EscapeDataString perhaps?

    var strImportXml = a_xImport.ToString();
    strImportXml = strImportXml.Replace("&", "&amp;");
    strImportXml = strImportXml.Replace("<", "&lt;");
    strImportXml = strImportXml.Replace(">", "&gt;");
    

    NOTE: I’d still like to know if there is a better way to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following and you can see I am trying to pass this
I have the following javascript class which I am trying to pass to an
The following is the custom class, whose object I am trying to pass: package
Good morning, I am trying to pass a string to twitter, using the following
Here is what I am trying to do: @POST @Path(/MyPath) @Produces(text/xml) @RolesAllowed({user}) public Output
I'm trying to validate the following XML against a XSD schema using Ruby. It
I'm trying to define an XML schema that has an optional tag, sort_expression .
I have the following code which turns a string, that I pass into the
I am trying to pass data from the database in XML format to an
I'm trying to pass parameters (through c#) to the following XSLT to build a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.