3299
Technical User
- May 24, 2008
- 3
Hellow everyone Im reeeally new in programming (actually I finnaly decided to understand it after this problem ) which means I know very little about it . Some time ago a friend helped me to make a login page for a section of a website I use to orgnize part of my work, It used to work really well on ASP Baby Server but now I need to use IIS on my machine and it has given me the following error eversince:
Active Server Pages error 'ASP 0245'
---------------------------------------------------------
Mixed usage of Code Page values
/scripts/logon.asp, line 1
The @CODEPAGE value specified differs from that of the including file's CODEPAGE or the file's saved format.
---------------------------------------------------------Like I said I have no idea what he is talking about I`ve post the code of the logon script, if theres sum1 out there that can help me id be so immenselly grateful
Ps.: I tried to take off the 1st line with no sucess the erro message was:
---------------------------------------------------------
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/scripts/logon.asp, line 1
The Include file '../Connections/AKPI.asp' cannot contain '..' to indicate the parent directory
----------------------------------------------------------
Here is the logon script:
********************************************************************************
************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/AKPI.asp" -->
<%
Dim rs_Login__MMColParam
rs_Login__MMColParam = "0"
If (Request.Form("user") <> "") Then
rs_Login__MMColParam = Request.Form("user")
End If
%>
<%
Dim rs_Login__MMColParam2
rs_Login__MMColParam2 = "0"
If (Request.Form("password") <> "") Then
rs_Login__MMColParam2 = Request.Form("password")
End If
%>
<%
Dim rs_Login
Dim rs_Login_numRows
sql = "SELECT u.UserID, u.SurName, u.Name, t.Team, u.NameCountry, u.Group, c.ImgName, u.active, u.language_id, u.CodTeam "&_
"FROM Tb_User u, Tb_Team t, Tb_Country c WHERE u.CodTeam = t.CodTeam AND u.NameCountry = c.NameCountry "&_
" AND u.UserID = '" + Replace(rs_Login__MMColParam, "'", "''") + "' AND u.Password = '" + Replace(rs_Login__MMColParam2, "'", "''") + "' and active = true"
Set rs_Login = Server.CreateObject("ADODB.Recordset")
rs_Login.ActiveConnection = MM_AKPI_STRING
rs_Login.Source = sql
rs_Login.CursorType = 0
rs_Login.CursorLocation = 2
rs_Login.LockType = 1
rs_Login.Open()
rs_Login_numRows = 0
%>
<% 'if (rs_Login.Fields.Item("UserID").Value = rs_Login__MMColParam) then
if (NOT rs_Login.EOF) then
Session("login_ok") = True
Session("UserID") = rs_Login.Fields.Item("UserID").Value
Session("fullName") = rs_Login.Fields.Item("SurName").Value & ", " & rs_Login.Fields.Item("Name").Value
Session("Country") = rs_Login.Fields.Item("NameCountry").Value
Session("Group") = rs_Login.Fields.Item("Group").Value
Session("Team") = rs_Login.Fields.Item("Team").Value
Session("CodTeam") = rs_Login.Fields.Item("CodTeam").Value
Session("ImgName") = rs_Login.Fields.Item("ImgName").Value
session("language") = rs_Login.Fields.Item("language_id").Value
'Response.Write(Session("Team"))
Response.Redirect("../default.asp") %>
<% Else %>
<% Response.Redirect("../wronglogin.asp") %>
<% End If %>
<%
rs_Login.Close()
Set rs_Login = Nothing
%>
Active Server Pages error 'ASP 0245'
---------------------------------------------------------
Mixed usage of Code Page values
/scripts/logon.asp, line 1
The @CODEPAGE value specified differs from that of the including file's CODEPAGE or the file's saved format.
---------------------------------------------------------Like I said I have no idea what he is talking about I`ve post the code of the logon script, if theres sum1 out there that can help me id be so immenselly grateful
Ps.: I tried to take off the 1st line with no sucess the erro message was:
---------------------------------------------------------
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/scripts/logon.asp, line 1
The Include file '../Connections/AKPI.asp' cannot contain '..' to indicate the parent directory
----------------------------------------------------------
Here is the logon script:
********************************************************************************
************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/AKPI.asp" -->
<%
Dim rs_Login__MMColParam
rs_Login__MMColParam = "0"
If (Request.Form("user") <> "") Then
rs_Login__MMColParam = Request.Form("user")
End If
%>
<%
Dim rs_Login__MMColParam2
rs_Login__MMColParam2 = "0"
If (Request.Form("password") <> "") Then
rs_Login__MMColParam2 = Request.Form("password")
End If
%>
<%
Dim rs_Login
Dim rs_Login_numRows
sql = "SELECT u.UserID, u.SurName, u.Name, t.Team, u.NameCountry, u.Group, c.ImgName, u.active, u.language_id, u.CodTeam "&_
"FROM Tb_User u, Tb_Team t, Tb_Country c WHERE u.CodTeam = t.CodTeam AND u.NameCountry = c.NameCountry "&_
" AND u.UserID = '" + Replace(rs_Login__MMColParam, "'", "''") + "' AND u.Password = '" + Replace(rs_Login__MMColParam2, "'", "''") + "' and active = true"
Set rs_Login = Server.CreateObject("ADODB.Recordset")
rs_Login.ActiveConnection = MM_AKPI_STRING
rs_Login.Source = sql
rs_Login.CursorType = 0
rs_Login.CursorLocation = 2
rs_Login.LockType = 1
rs_Login.Open()
rs_Login_numRows = 0
%>
<% 'if (rs_Login.Fields.Item("UserID").Value = rs_Login__MMColParam) then
if (NOT rs_Login.EOF) then
Session("login_ok") = True
Session("UserID") = rs_Login.Fields.Item("UserID").Value
Session("fullName") = rs_Login.Fields.Item("SurName").Value & ", " & rs_Login.Fields.Item("Name").Value
Session("Country") = rs_Login.Fields.Item("NameCountry").Value
Session("Group") = rs_Login.Fields.Item("Group").Value
Session("Team") = rs_Login.Fields.Item("Team").Value
Session("CodTeam") = rs_Login.Fields.Item("CodTeam").Value
Session("ImgName") = rs_Login.Fields.Item("ImgName").Value
session("language") = rs_Login.Fields.Item("language_id").Value
'Response.Write(Session("Team"))
Response.Redirect("../default.asp") %>
<% Else %>
<% Response.Redirect("../wronglogin.asp") %>
<% End If %>
<%
rs_Login.Close()
Set rs_Login = Nothing
%>