Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.recirect riddle

Status
Not open for further replies.

nivini

Programmer
Mar 24, 2004
64
In the web server there is the root folder, called www.
in this folder i created a folder called SIteAdmin, in siteadmin i have few files, one is uid.asp,(the form file, where the user enters his details), these details are checked/validates in uid1.asp file.
in uid1.asp file theres the code:
Code:
 if username=PassRec("UserName") and Password=PassRec       ("Password") then
   session("sessID")=session.SessionID
   Response.Redirect  "/recCreate2.asp"

else

Response.Write "<html>"
Response.Write "<body>"
Response.Write "<form method=Post action=uid.asp>"

Response.Write "Worng username or Passward"
Response.Write "<input type=submit value=return>"
Response.Write "</form>"
Response.Write "</body>"
Response.Write "</html>"

Response.End 
end if%>
Now to the riddle, the line Response.Redirect "/recCreate2.asp"
yields in the explorer address bar " , well, there is certainlly no such file in the root folder, so i've change it to Response.Redirect "siteAdmin/recCreate2.asp",
thats yields in the explorer address
"well, reccreate2.asp is not there either.

the server supplier support department does not support language and code problems, so I do need your help urgently
nivini
 
i think you can simply say:

Response.Redirect "recCreate2.asp"

-DNG
 
Tony, your suggestion end with " in the addres
bar, and the error :There is a problem with the page you are trying to reach and it cannot be displayed.
and DNG, the same, same address, same error .
WHAT IS WRONG?????
nivini
 
can you make sure that you have spelled everything correctly and the file is indeed in the correct location...

also turn off friendly http error messages (internettools->options) to see the actual error...

-DNG
 
DNG,
It opens a whole new world of errors, let me check and get back to you. many thanks ...so far
nivini
 
yeah i thought so..thats why i asked you to see the actual error...the path suggested by Tony and myself would refer to the correct file...

-DNG
 
Well, it did not end, this the error i get:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xdbc8 Thread 0xe6d8 DBC 0x1617f5c Jet'.

/siteadmin/recCreate2.asp, line 31

in line 31 there is the connction opens
Code:
DSNName = DSNName & Server.MapPath("../db/piku.mdb")
		Con.Open DSNName

So now i have to figure out the right path
a minute before i'll give up, i'll ask for your help again.
many many thanks
nivini
 
no problem...glad to be of help...

i think this error is related to having the workgroup information file(system.mdw) in the correct place...

-DNG
 
If you ever plan on moving the code to another server you might find it easier to use a connection string without an DSN. (see This is especially true if you are using a hosting service where you can't just log into the machine as administrator and create your own DSN. When I have this situation I like to put the connection string into an Applicaiton variable that is set in the Application_OnStart event in the global.asa file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top