web服务器调试中的问题
有哥 2004-06-09 01:01:01 1、做了一个ISAPI的web服务器,编译、连接都正常,但在使用Intrabob.exe调试时,提交了请求后Intrabob.exe一直不响应,跟踪可以发现请求已被执行完,继续跟踪也看不出何以未通知给Intrabob.exe。
2、有几个ISAPI调试正常后,挂到LiteServe(支持ISAPI)服务器上运行,如果指定了路径(pathinfo)就提示URL未找到,使用默认的就可以,不知何故。好象有人在IIS上也遇到了类似的问题。
相关信息如下:
//-----------------------------------------
入口:
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
try
{
Application->Initialize();
if (reason==DLL_PROCESS_ATTACH)
Application->CreateForm(__classid(TWebModule1), &WebModule1);
Application->Run();
}
catch (Exception &exception)
{
}
return 1;
}
//-----------------------------------------
/reg事件响应:
void __fastcall TWebModule1::WebModule1waRegAction(TObject *Sender,
TWebRequest *Request, TWebResponse *Response, bool &Handled)
{
AnsiString RegName="sfdsf";//Request->ContentFields->Values["username"];
bool HadUser=IsHaveName(RegName);
if (HadUser)
{
Response->Content = Response->Content + "<B>用户已经存在。</B>";
}
else
Response->Content = Response->Content + "<B sytle=\"color:#FF0000\">用户尚未注册。</B>";
}
//-----------------------------------------
调用表单:
<FORM action="bin/Project2.dll/reg" method=post name=FORM1 id=FORM1 autocomplete="off"><table><tr><td>请输入用户名:</td><td><INPUT id="username" name="username"> </td><td><INPUT name=submit1 type=submit class="linkbutton" id=submit1 value=下一步></td></tr></table></FORM></BODY></HTML>
请各位帮帮忙