Click here to Skip to main content
15,898,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a product.pdf in my clientbin(silverlight) folder which contains detail about product on click of button just i want to open that pdf i used following code it's working fine locally after hosting it is giving HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. how can i do that one please help me


** service and calling aspx page in silverlight**
VB
Dim uri As New Uri(HtmlPage.Document.DocumentUri, "/ClientBin/product.pdf")
      'HtmlPage.Window.Navigate(uri, "_blank")
      Dim path As String = uri.AbsoluteUri.ToString()
      ' HtmlPage.Window.Eval("window.open('" & path & "')")
      HtmlPage.Window.Eval("document.location.href='" & path & "';")



** Error code After hosting **
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Posted
Updated 17-Aug-11 20:57pm
v2

1 solution

Well, if it's telling you the file cannot be found, your code to build the Uri path is wrong. I'd look at the very first line of code you posted.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900