Solved

Can this server url convert into client resolved url to access the file on the client side?

Posted on 2016-08-15
1
63 Views
Last Modified: 2016-08-21
as a security reason, can I view the pdf report from this:

Server URL:   sample = String.Format("{0}?t={1}", HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) & ResolveUrl("~/") & "ReportRepository/" &  "/" & filName.pdf, DateTime.Now.Ticks)

Client Physical Path: C:\Users\jmanuel001\AppData\Local\Temp\filName.pdf

then view it in: <embed type="applcation/pdf"> tag in ASP.Net

Note that I can access the created file in the temp folder but the pdf says: "Acrobat Reader, Access Denied".
0
Comment
Question by:akoIT
1 Comment
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 500 total points
ID: 41758168
PDF should resides inside your application/website directory in order to view in browser.
You can use iframe to view the PDF

<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>


Rajar
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Simple Injector with Web Service 4 38
jquery datatables, asp.net MVC 9 38
Two wordpress questions 3 43
Save ms data to server side. 19 42
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now