470,620 Members | 1,399 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,620 developers. It's quick & easy.

Setting the ContentType for content published using a VirtualPathProvider

Jan
Is it possible to set the ContentType for the VirtualFile-descendant that a
custom virtual path provider returns in response to a call to its GetFile
method? Right now, web browsers tend to misinterpret the XML-data I return,
because I cannot specify that the content type is text/xml.

Feb 8 '08 #1
2 1548
see iis mime mapping in the vdir

-- bruce (sqlwork.com)
"Jan" wrote:
Is it possible to set the ContentType for the VirtualFile-descendant that a
custom virtual path provider returns in response to a call to its GetFile
method? Right now, web browsers tend to misinterpret the XML-data I return,
because I cannot specify that the content type is text/xml.

Feb 8 '08 #2
Jan
Thanks, Bruce!

Perhaps I misunderstood your reply - if I'm running my code directly from
Visual Studio 2005, using the built-in development web server, where can I
set MIME mappings?

"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:3E**********************************@microsof t.com...
see iis mime mapping in the vdir

-- bruce (sqlwork.com)
"Jan" wrote:
>Is it possible to set the ContentType for the VirtualFile-descendant that
a
custom virtual path provider returns in response to a call to its GetFile
method? Right now, web browsers tend to misinterpret the XML-data I
return,
because I cannot specify that the content type is text/xml.

Feb 15 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Epetruk | last post: by
2 posts views Thread by Jonathan Trevor | last post: by
reply views Thread by Pavel Kocar | last post: by
5 posts views Thread by David Thielen | last post: by
4 posts views Thread by Bjorn Sagbakken | last post: by
5 posts views Thread by Charles Zhang | last post: by
reply views Thread by Nathan Sokalski | last post: by
2 posts views Thread by helveticus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.