Opening or Navigating to a .aspx page from SilverLight application
-
Hi, I am currently working on a SilverLight application that uses a WCF service to create and populate an Excel file and return the Result as the path on the server where the excel file is saved. This returned path will be used by the user to download/save the file. I initially tried using the 'HypeLinkButton' and assigning the returned URL to the 'NavigateUri' property of the hyperlink. It did not work as when I clicked the URL, the page got navigated to a blank page and the error on the page was the following: Error: ManagedRuntimeError error #4004. UnauthorisedAccessException Access is denied Once I faced this issue as an alternative I tried navigating to a aspx page by opening a new window and specifying the window's URL as the returned file path. I couldnot find much on this online as well. Any suggestions?
-
Hi, I am currently working on a SilverLight application that uses a WCF service to create and populate an Excel file and return the Result as the path on the server where the excel file is saved. This returned path will be used by the user to download/save the file. I initially tried using the 'HypeLinkButton' and assigning the returned URL to the 'NavigateUri' property of the hyperlink. It did not work as when I clicked the URL, the page got navigated to a blank page and the error on the page was the following: Error: ManagedRuntimeError error #4004. UnauthorisedAccessException Access is denied Once I faced this issue as an alternative I tried navigating to a aspx page by opening a new window and specifying the window's URL as the returned file path. I couldnot find much on this online as well. Any suggestions?
I do something like this to open a browser window when clicking on something. May not be exactly what you need, but perhaps can get you headed in right direction. string redirectLink = "http://www.somedomain.com/some.xls" string browserWindowOptions = "resizable=1|scrollbars=1|menubar=1|status=1|toolbar=1|titlebar=1|width=1000|height=725|left=5|top=5" HtmlPage.Window.Navigate(new Uri(redirectLink), "_blank", browserWindowOptions)
Troy Johnson www.anothercodesite.com/blog