hosting external file in xmlformview control

F

Fred

I know that xmlformview can render a xml file in the sharepoint site,
but can I use the control to render a xml file which is not in the
same site. for example

<cc1:XmlFormView ID="formViewer" runat="server" Height="250px"
Width="100%"
XmlLocation="http://localsite/getfile.aspx" />

I can return an instance of xml file in the http://localsite/getfile.aspx,
but the control can not render the xml file. Is there anyone who have
this experience?

Thanks
 
G

Greg Collins

In your ASPX page do you set the content type?

<%@ Page . . . . ResponseEncoding="UTF-8" ContentType="text/xml" %>
<%@ Outputcache Location="None"%>
 
F

Fred

Yes, when I use IE to browse the page(http://localsite/getfile.aspx),
IE display it in styled xml format, this prove that the return ouput
is valid. But the page with form viewer shows "The form has been
closed".

Maybe the from service does not support this? I guest form service is
not retrieving the file content by http call to the url, but translate
the url into object model call.

Thanks
 
G

Greg Collins

Don't trust just browsing to the page... make sure the actual page itself
has the content type set to XML.

Outside that I can't help any more here... someone else will have to jump in
if they have ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top