Adrienne
Fri Feb 22 15:35:08 CST 2008
Gazing into my crystal ball I observed nbarwig@gmail.com writing in
news:c04b372e-30b6-4d89-82f3-8f27b269b8dd@u10g2000prn.googlegroups.com:
> On Feb 22, 10:53 am, "Anthony Jones" <A...@yadayadayada.com> wrote:
>> <nbar...@gmail.com> wrote in message
>>
>> news:06341392-be1b-478d-92ea-
2cbc73b8e7ef@q78g2000hsh.googlegroups.com
>> ...
>>
>>
>>
>> > Hello, I have an issue I am having difficulty diagnosing..
>>
>> > In short, I have a asp page that generates only xml output for use
>> > with an ajax application. On the last step of my process a simple
>> > xml- word document is generated and displayed in a new window (or
>> > iframe). The asp document is called with several querystring
>> > elements to produce the document.
>>
>> > In IE7, when the document is returned from the server a Open/Save
>> > dialog is presented. Here is where things get weird.. Occasionally
>> > the filename will appear as expected, 'callproc.xml', however the
>> > majority of the time the filename will appear as
>> > '...param1=00000¶m2=abcd'. This causes IE to fail opening or
>> > saving the document.
>>
>> > The XML being generated is valid and when saved will open with Word
>> > as expected without error. I have also defined the content-type as
>> > text/ xml.
>>
>> > Questions:
>> > 1. How can I consistently get the returned xml document to appear
>> > correctly without the querystring as part of the file name?
>>
>> Response.AddHeader "Content-Disposition", "filename=Whatever.xml"
>>
>> > 2. Is there anyway to avoid the Open/Save dialog when requesting an
>> > XML document?
>>
>> You might try a different content type with a view to getting MS Word
>> to accept and handle the stream. Try
>> application/vnd.ms-word.main+xml
>>
>> --
>> Anthony Jones - MVP ASP/ASP.NET
>>
>> --
>> Anthony Jones - MVP ASP/ASP.NET
>
> Thanks for the reply Anthony!
>
> Here is the header I am producing.. I had thought of the content-
> disposition, but it has made no difference.
>
> Response.ContentType = "text/xml"
> Response.Expires = 0
> Response.Expiresabsolute = Now() - 1
> Response.AddHeader "pragma","no-cache"
> Response.AddHeader "cache-control","private"
> Response.CacheControl = "no-cache"
> Response.AddHeader "Content-Disposition", "filename=callproc.xml"
>
>
What about content type?
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share