and here is how i did it.
1st make it so that the website will not open up with auth server
in ConquerServer_v2_Auth/program.cs remove
Code:
const int RestartMin = 10;
TIME RestartSQL = TIME.Now.AddMinutes(RestartMin);
string SQLPath = @"C:\Server\ConquerServer_v2_Website\bin\Debug\ConquerServer_v2_Website.exe";
while (true)
{
if (File.Exists(SQLPath))
{
if (TIME.Now.Time >= RestartSQL.Time)
{
try { KillWebsiteServerProcess(); }
catch { }
Process.Start(SQLPath);
RestartSQL = TIME.Now.AddMinutes(RestartMin);
}
}
Thread.Sleep(1000);
}
and
Code:
static void KillWebsiteServerProcess()
{
int count = 0;
foreach (Process p in Process.GetProcesses())
{
string pToString = p.ToString();
if (pToString.Contains("cmd"))
{
if (p.MainWindowTitle.Contains("Conquer Server - Website"))
{
p.Kill();
count++;
}
}
else if (pToString.Contains("ConquerServer_v2_Website"))
{
p.Kill();
count++;
}
if (count == 2)
break;
}
}
then open up ConquerServer_v2_Website project
and open up program.cs and and replace
Code:
#if !DEDICATED
webservice = new Website("http://192.168.1.100:9956/");
#else
webservice = new Website("http://87.106.207.161:9956/");
#endif
with
Code:
webservice = new Website("http://[COLOR="Red"]Your-IP-Here[/COLOR]:9956/");
then go to your
Code:
C:\Server\ConquerServer_v2_Website\bin\Debug\ConquerServer_v2_Website\
and set ConquerServer_v2_Website.exe to run in administrator mode
then open up notepad and inside it write
Code:
<!DOCTYPE html>
<html>
<head>
<title>Registration page</title>
</head>
<body>
<font size="3" face="Arial">
<body bgcolor="#000000" text="#FFFFFF">
<P><center>
<form action="register.cs" method="get">
<P><label for="username">Username:</label>
<input type="text" name="username" id="username" size="16" maxlength="16">
<P><label for="pasword">Password:</label>
<input type="text" name="password" id="password" size="16" maxlength="16">
<P><input type="submit" name="submitbutton" id="submitbutton" value="Register"/></center>
</form>
</font>
</body>
</html>
credits to Kiyono post.
and then save as register.html
and save it to
Code:
C:\Server\Database\public_html\
then open up ConquerServer_v2_Website.exe in administrator mode
and go to http://Your-IP-Here:9956/index.html
and that should get your website working with .cs if there are a way to run a application in administrator mode from the auth server that would be better but as of now i do not no how to do this