Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Why the .pdf can not be shown?

Reply
Thread Tools

Why the .pdf can not be shown?

 
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      02-22-2006
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)
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      02-22-2006
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" <> wrote in message
news:79EB9987-9DCA-4C46-9A24-...
> 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)



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      02-22-2006
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" <> wrote in message
> news:79EB9987-9DCA-4C46-9A24-...
> > 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)

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      02-22-2006
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" <> wrote in message
news:4A9ADEDE-0146-42C2-A695-...
> 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" <> wrote in message
>> news:79EB9987-9DCA-4C46-9A24-...
>> > 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)

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?UHJ6ZW1v?=
Guest
Posts: n/a
 
      02-22-2006
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" <> wrote in message
> > news:79EB9987-9DCA-4C46-9A24-...
> > > 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)

> >
> >
> >

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      02-22-2006
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" <> a écrit dans le message de
news:79EB9987-9DCA-4C46-9A24-...
> 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)



 
Reply With Quote
 
Bruce Barker
Guest
Posts: n/a
 
      02-22-2006
because localhost is a trusted domain, and allows access to c:\ thru a url


-- bruce (sqlwork.com)




"Andrew" <> wrote in message
news:4A9ADEDE-0146-42C2-A695-...
> 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" <> wrote in message
>> news:79EB9987-9DCA-4C46-9A24-...
>> > 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)

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why :: ? Why not : ? Why not . ? <- less clutter ?!? Skybuck Flying C++ 16 08-25-2007 09:48 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why why why does function not work Horace Nunley ASP .Net 1 09-27-2006 09:52 PM
Can someone tell me why I can't delete this file? and why it blue screens WinXP Pro on delete? zZz Computer Support 1 01-12-2005 02:37 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57