ReneK :
For the Global.asax error , I think you configure the IIS virtual directory to asp.net1.1 , try to check it and set it to asp.net2 .
-----------
How about this code :
AutoLogin.Aspx?username=hello&password=world
<%@ Page Language="C#" %>
<%@ Import Namespace="CutePortal" %>
<%@ Import Namespace="CutePortal.Model" %>
<%@ Import Namespace="CutePortal.Web" %>
<%@ Import Namespace="CutePortal.Utility" %>
<%@ Import Namespace="CutePortal.SqlScopeDAL.Data" %>
<script runat="server">
override protected void OnLoad(EventArgs args)
{
base.OnLoad(args);
string username = Request.QueryString["username"];
string password = Request.QueryString["password"];
if (string.IsNullOrEmpty(username))
return;
if (string.IsNullOrEmpty(password))
return;
if (!ValidateUser(username, password))
{
return;
}
System.Web.Security.FormsAuthentication.SetAuthCookie(username,false);
int lobbyid = 1;
Response.Redirect("CuteSoft_Client/CuteChat/CH_MainForm.Aspx?Location=Lobby&LocationId="+lobbyid);
}
public bool ValidateUser(string username, string password)
{
CutePortal.Model.Guest g = new CutePortal.Model.Guest();
g.Name = username;
g.Password = password;
CutePortal.Business.Board f = new CutePortal.Business.Board();
CutePortal.Model.User user = f.Login(g);
if (user != null)
return true;
return false;
}
</script>