473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why the .pdf can not be shown?

Hello, friends,

I developed a web page with the following statement as part of it:

<td width="80%" height="800" valign="top">
<iframe width="100%" height="100%"
src="c:\DeptFiles\shs_test.pdf"></iframe>
</td>

It worked fine in dev machine (in a local network).

However, after deploying it to the server and running it on server IE, to my
surprise, this <td></td> cell was blank!

I then run it through internet, I got a message saying "Action Cancelled:
Internet Explorer was unable to link to the Web page you requested. The page
might be temporarily unavailable.", I could not even see the rest of the web
page.

Any ideas? Help please! Thanks a lot.

(I thought it could be IE security setting issue, but not sure and not to
know how/why)
Feb 22 '06 #1
6 2267
The problem is :

src="c:\DeptFiles\shs_test.pdf"></iframe>

Try using a valid virtual path for the file.

i.e., for example :

src="/somevirtualdirectory/shs_test.pdf"></iframe>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Hello, friends,

I developed a web page with the following statement as part of it:

<td width="80%" height="800" valign="top">
<iframe width="100%" height="100%"
src="c:\DeptFiles\shs_test.pdf"></iframe>
</td>

It worked fine in dev machine (in a local network).

However, after deploying it to the server and running it on server IE, to my
surprise, this <td></td> cell was blank!

I then run it through internet, I got a message saying "Action Cancelled:
Internet Explorer was unable to link to the Web page you requested. The page
might be temporarily unavailable.", I could not even see the rest of the web
page.

Any ideas? Help please! Thanks a lot.

(I thought it could be IE security setting issue, but not sure and not to
know how/why)

Feb 22 '06 #2
But, why it worked in my dev machine?

Also, since we have a lot of files (GBs), it is not good to put all of them
under c:\inetpub\wwwroot\. Rather, we want to put them in a separate
directory, or another drive, or even another file server in a local network.
Then, what is the best way to specify virtual path? Noramlly, how people
handle such kinds of questions? Thanks.

"Juan T. Llibre" wrote:
The problem is :

src="c:\DeptFiles\shs_test.pdf"></iframe>

Try using a valid virtual path for the file.

i.e., for example :

src="/somevirtualdirectory/shs_test.pdf"></iframe>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Hello, friends,

I developed a web page with the following statement as part of it:

<td width="80%" height="800" valign="top">
<iframe width="100%" height="100%"
src="c:\DeptFiles\shs_test.pdf"></iframe>
</td>

It worked fine in dev machine (in a local network).

However, after deploying it to the server and running it on server IE, to my
surprise, this <td></td> cell was blank!

I then run it through internet, I got a message saying "Action Cancelled:
Internet Explorer was unable to link to the Web page you requested. The page
might be temporarily unavailable.", I could not even see the rest of the web
page.

Any ideas? Help please! Thanks a lot.

(I thought it could be IE security setting issue, but not sure and not to
know how/why)


Feb 22 '06 #3
re:
But, why it worked in my dev machine?
Because local paths work in a local dev machine.

If the local path is in the same machine as the server, that works.
If the file is in a different machine than the server, it fails.

A client will look in its own file system
for the file if you specify a local path.

re: Also, since we have a lot of files (GBs), it is not good to put all of them
under c:\inetpub\wwwroot\. Rather, we want to put them in a separate
directory
You could put them all in a shared virtual directory, or even under one virtual
directory with subdirectories below it, to classify the files by subject/issue.

re: or another drive, or even another file server in a local network
You can do that, as long as they're accessible via a standard URL.

re: Then, what is the best way to specify virtual path?
A relative URL, i.e. :

"/somedirectory/somefile.ext"

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:4A**********************************@microsof t.com... But, why it worked in my dev machine?

Also, since we have a lot of files (GBs), it is not good to put all of them
under c:\inetpub\wwwroot\. Rather, we want to put them in a separate
directory, or another drive, or even another file server in a local network.
Then, what is the best way to specify virtual path? Noramlly, how people
handle such kinds of questions? Thanks.

"Juan T. Llibre" wrote:
The problem is :

src="c:\DeptFiles\shs_test.pdf"></iframe>

Try using a valid virtual path for the file.

i.e., for example :

src="/somevirtualdirectory/shs_test.pdf"></iframe>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
> Hello, friends,
>
> I developed a web page with the following statement as part of it:
>
> <td width="80%" height="800" valign="top">
> <iframe width="100%" height="100%"
> src="c:\DeptFiles\shs_test.pdf"></iframe>
> </td>
>
> It worked fine in dev machine (in a local network).
>
> However, after deploying it to the server and running it on server IE, to my
> surprise, this <td></td> cell was blank!
>
> I then run it through internet, I got a message saying "Action Cancelled:
> Internet Explorer was unable to link to the Web page you requested. The page
> might be temporarily unavailable.", I could not even see the rest of the web
> page.
>
> Any ideas? Help please! Thanks a lot.
>
> (I thought it could be IE security setting issue, but not sure and not to
> know how/why)


Feb 22 '06 #4
Because your IE was able to find that PDF file using local path
"c:\DeptFiles\shs_test.pdf", was (finding a file) is imposible when server is
on different machine.
Try creating a wirtual directory under catalog of your application in IIS
management console. This virtual directory can point to a catalog on
different drive.

Przemo

"Andrew" wrote:
But, why it worked in my dev machine?

Also, since we have a lot of files (GBs), it is not good to put all of them
under c:\inetpub\wwwroot\. Rather, we want to put them in a separate
directory, or another drive, or even another file server in a local network.
Then, what is the best way to specify virtual path? Noramlly, how people
handle such kinds of questions? Thanks.

"Juan T. Llibre" wrote:
The problem is :

src="c:\DeptFiles\shs_test.pdf"></iframe>

Try using a valid virtual path for the file.

i.e., for example :

src="/somevirtualdirectory/shs_test.pdf"></iframe>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
Hello, friends,

I developed a web page with the following statement as part of it:

<td width="80%" height="800" valign="top">
<iframe width="100%" height="100%"
src="c:\DeptFiles\shs_test.pdf"></iframe>
</td>

It worked fine in dev machine (in a local network).

However, after deploying it to the server and running it on server IE, to my
surprise, this <td></td> cell was blank!

I then run it through internet, I got a message saying "Action Cancelled:
Internet Explorer was unable to link to the Web page you requested. The page
might be temporarily unavailable.", I could not even see the rest of the web
page.

Any ideas? Help please! Thanks a lot.

(I thought it could be IE security setting issue, but not sure and not to
know how/why)


Feb 22 '06 #5
Is this file placed on all machines and you wan't to access the local copy
from the web site ?

AFAIK it's likely no more allowed with the default settings for safety
reasons (a web site can't reference local content any more with SP2).

--
Patrice

"Andrew" <An****@discussions.microsoft.com> a écrit dans le message de
news:79**********************************@microsof t.com...
Hello, friends,

I developed a web page with the following statement as part of it:

<td width="80%" height="800" valign="top">
<iframe width="100%" height="100%"
src="c:\DeptFiles\shs_test.pdf"></iframe>
</td>

It worked fine in dev machine (in a local network).

However, after deploying it to the server and running it on server IE, to my surprise, this <td></td> cell was blank!

I then run it through internet, I got a message saying "Action Cancelled:
Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable.", I could not even see the rest of the web page.

Any ideas? Help please! Thanks a lot.

(I thought it could be IE security setting issue, but not sure and not to
know how/why)

Feb 22 '06 #6
because localhost is a trusted domain, and allows access to c:\ thru a url
-- bruce (sqlwork.com)


"Andrew" <An****@discussions.microsoft.com> wrote in message
news:4A**********************************@microsof t.com...
But, why it worked in my dev machine?

Also, since we have a lot of files (GBs), it is not good to put all of
them
under c:\inetpub\wwwroot\. Rather, we want to put them in a separate
directory, or another drive, or even another file server in a local
network.
Then, what is the best way to specify virtual path? Noramlly, how people
handle such kinds of questions? Thanks.

"Juan T. Llibre" wrote:
The problem is :

src="c:\DeptFiles\shs_test.pdf"></iframe>

Try using a valid virtual path for the file.

i.e., for example :

src="/somevirtualdirectory/shs_test.pdf"></iframe>

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
> Hello, friends,
>
> I developed a web page with the following statement as part of it:
>
> <td width="80%" height="800" valign="top">
> <iframe width="100%" height="100%"
> src="c:\DeptFiles\shs_test.pdf"></iframe>
> </td>
>
> It worked fine in dev machine (in a local network).
>
> However, after deploying it to the server and running it on server IE,
> to my
> surprise, this <td></td> cell was blank!
>
> I then run it through internet, I got a message saying "Action
> Cancelled:
> Internet Explorer was unable to link to the Web page you requested. The
> page
> might be temporarily unavailable.", I could not even see the rest of
> the web
> page.
>
> Any ideas? Help please! Thanks a lot.
>
> (I thought it could be IE security setting issue, but not sure and not
> to
> know how/why)


Feb 22 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hugo Fjelsted Alrøe | last post by:
I am fairly new at MySQL, so please excuse any ignorance. We are using MySQL (version 3.23.48) in connection with an Eprints = archive. We have non-english deposits in the archive, and...
1
by: A-PK | last post by:
Hi I wanna shown all my Data from SQL server to Visual Basic.net. could someone guide me on that ? is there any object enable to do that. SQL Server 2000 Database - contacts 2 tables - supplies...
1
by: celeluck | last post by:
Is there any way to make them always shown? The VScroll and HScroll seem not working at all. Any one knows why?
7
by: tfsmag | last post by:
Okay, i have a datagrid that I want to populate with invoices that are due on the month shown on the calendar, so what i need to do is retrieve the current 'shown' month and create a couple of...
8
by: tfsmag | last post by:
i need to create a date range based on the current "shown" month on a calendar control to query a database and populate a datagrid based on that date range. how can i retrieve the "shown" month...
3
by: MilanB | last post by:
Hello I have C# code that normaly throw exception and error message is shown. It's works fine. Separatlely I have ATL Component. When ATL Componenet fires event, and later C# code is called,...
5
by: Michael.Suarez | last post by:
Suppose I have a button on a form that opens up another form. the code in the buttons click event is: frmMyCustomForm frm = new frmMyCustomForm (); frm.ShowDialog(); frm.Dispose(); The...
1
by: Victory | last post by:
i am using the Shown event for a form. It is in .NET 2.0. It is an event that occurs when a form is displayed. I wanted to use this event since i needed the processing of data to occur after the...
2
by: colinzhu | last post by:
I want to have the print dialog shown automatically after the the page is loaded, but when I try to call window.print() BEFORE the iframe, the print dialog is not shown at all. Anyone can help? ...
1
oranoos3000
by: oranoos3000 | last post by:
hi i'd like to set background-image of submit button to a picture with gif extension i set style="background-color:url(images/back.gif)" in input tag with this work this button in firefox is shown...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.