Click here to Skip to main content
15,886,689 members

Comments by Hasan Habib Surzo (Top 18 by date)

Hasan Habib Surzo 8-Sep-16 6:13am View    
public HttpResponseMessage GetWords()
{
var results = db.Words.ToList();
return Request.CreateResponse(HttpStatusCode.OK, results, new XmlMediaTypeFormatter());
}

still problem.
Please check with google chrome.
should i start any service or register anything in WebApiConfig.cs?

also I update following package:
Microsoft.AspNetCore.Mvc.Formatters.Xml

Error :
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<error>
<message>The request is invalid.


if I try
[Route("api/WordsApi/GetWords")]
public IHttpActionResult GetWords()
{
var results = db.Words.ToList();
return Content(HttpStatusCode.OK, results, Configuration.Formatters.XmlFormatter);
}

Error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<error>
<message>An error has occurred.
Hasan Habib Surzo 8-Sep-16 2:45am View    
public IHttpActionResult GetWords()
{
//Your code to get the result object
IEnumerable<<word>> word = db.Words.ToList();
return Content(HttpStatusCode.OK, word, Configuration.Formatters.XmlFormatter);
}
still not working for Xml but it works for JSON.
Hasan Habib Surzo 28-May-15 6:24am View    
I try this but not get any result. could you please share some real working example. i try many developers c# and vb.net code using google but none of them work properly.
Hasan Habib Surzo 7-Oct-14 2:17am View    
Reason for my vote of 2 \n Nice try!!!
Hasan Habib Surzo 27-Nov-13 8:17am View    
Deleted
CRYSTAL REPORT 2008 WITH SP0 IS WORKING FINE.
YOU CAN DOWNLOAD A TRIAL VERSION OR YOU CAN DOWNLOAD USING TORRENT.