开发者

Issue with File Download Redirect

开发者 https://www.devze.com 2023-04-10 21:52 出处:网络
I have a Silverlight application that generates server-side excel reports. A user can run a query with specified parameters,开发者_如何转开发 click Run, and after generating the result set, the server

I have a Silverlight application that generates server-side excel reports. A user can run a query with specified parameters,开发者_如何转开发 click Run, and after generating the result set, the server saves the excel report in a public temp directory on the web server. On callback, my Silverlight code calls HtmlPage.Window.Navigate() to open a new window with the Uri of the report, where they can open or save it.

My calling code is as follows:

string report = @"Reports/" + reportName;
HtmlPage.Window.Navigate(new Uri(report, UriKind.Relative), "_blank");

This generates a URI along the lines of "~/Reports/35c2954d-afd4-41fd-bd9c-90e7e0c1d0b4-129622200738564032.xlsx"

The problem is, a few users are having an issue where this new window, instead of being able to download the file straight from the web server with the above URI, the window that opens is just the calling window's URL, Default.aspx. This causes just causes the Silverlight app to reload in the new tab.

Has anyone seen this before? I'm told they are using Windows XP SP3 and IE 8.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号