|
 |
access_asp thread: Response.redirect problem!!!
Message #1 by "Vandael Tim" <vandael_tim@h...> on Thu, 25 Apr 2002 10:55:48
|
|
Hey,
i am trying to response.redirect to file on the netwrok.
But it wont work.
The browser is redirecting to :
http://acblopstag/shopfloor/app/
\\acbbopbdc\public\Apps\Common\q_doc\doc\PS_20004569_EXTI001S.snp
And ik should have been :
\\acbbopbdc\public\Apps\Common\q_doc\doc\PS_20004569_EXTI001S.snp
Does anyone know a solution???
thnx
Vandael Tim
<!-- #include file="config.asp" -->
<head>
<%
dim ID
ID = request.form ("ID")
user = session("user")
datum = now()
'response.write ID
dim sql
sql = "SELECT insFileNaam FROM instructies WHERE instrID LIKE '"&ID&"';"
dim rs
set rs = server.CreateObject("ADODB.RecordSet")
rs.open sql, cnn1, 1,3
file = "\\acbbopbdc\public\Apps\Common\q_doc\doc\" + rs("insFilenaam")
set rs = nothing
dim sq2
sq2 = "SELECT * FROM geraadpleegd"
dim rs2
set rs2 = server.CreateObject("ADODB.RecordSet")
rs2.open sq2, cnn1, 1,3
rs2.addnew
rs2("instrID") = request.form("id")
rs2("gebruiker") = session("user")
rs2("datum") = now()
rs2.update
set cnn1 = nothing
set rs2 = nothing
response.redirect (file)
%>
</head>
Message #2 by lingasamyk@h... on Thu, 25 Apr 2002 13:04:52
|
|
Hi Vandael
You cannot you response.redirect to a file that is in remote machine. The
which you are trying to redirect should resides under the folder which you
set as a virtual folder. Save the file from the remote machine and save it
under the virtual folder and try it.
Regards,
Lingasamy K
Message #3 by "Vandael Tim" <vandael_tim@h...> on Thu, 25 Apr 2002 13:15:24
|
|
Thnx for the reply, but that is not possible.
It is here at work, and the files should always be located on the server.
There are several applications here, that are using the files, so ...
Is there no other way, to my make him open the file (PDF) on the server???
regards
Tim
> Hi Vandael
> You cannot you response.redirect to a file that is in remote machine.
The
w> hich you are trying to redirect should resides under the folder which
you
s> et as a virtual folder. Save the file from the remote machine and save
it
u> nder the virtual folder and try it.
> Regards,
L> ingasamy K
Message #4 by lingasamyk@h... on Thu, 25 Apr 2002 14:49:25
|
|
Hi Tim
You can do it in round about way as follows
[1] Go to IIS Explorer there select the default web site under that you
can see your virtual directory.
[2] Right click the mouse on your virtual directory go to new there you
can see virtual directory sub menu, click the same.
[3] Give an alise name, and on clicking the next you will be asked for the
directory, before this map the network drive in which the files reside,
click the next button you will be asked for the user name and password,
enter the same.
[4] And then give the relevent privilages and finish it.
[5] Now try to redirect the file as follows
../ to move to the previous directory
test is the virtual directory created under the working virtual
directory
ActualEffortsSpentforthemonthofDecember2001.doc is the actual file name
"../test/ActualEffortsSpentforthemonthofDecember2001.doc"
Try the above and get back to me
Regards,
Lingasamy K
Message #5 by "Vandael Tim" <vandael_tim@h...> on Thu, 25 Apr 2002 15:01:58
|
|
Hey, thnx for the reply, but i sorted that out on my own.
Just the exact way as your saying!! :-)
thnx for the effort :)
Tim
> Hi Tim
> You can do it in round about way as follows
> [1] Go to IIS Explorer there select the default web site under that you
c> an see your virtual directory.
[> 2] Right click the mouse on your virtual directory go to new there you
c> an see virtual directory sub menu, click the same.
[> 3] Give an alise name, and on clicking the next you will be asked for
the
d> irectory, before this map the network drive in which the files reside,
c> lick the next button you will be asked for the user name and password,
e> nter the same.
[> 4] And then give the relevent privilages and finish it.
[> 5] Now try to redirect the file as follows
> ../ to move to the previous directory
> test is the virtual directory created under the working virtual
d> irectory
> ActualEffortsSpentforthemonthofDecember2001.doc is the actual file name
"> ../test/ActualEffortsSpentforthemonthofDecember2001.doc"
> Try the above and get back to me
> Regards,
L> ingasamy K
|
|
 |