R
Raymond Chiu
Dear all,
In the code below, I don't know why the client always show "Process the file
fail!".
But when under developed computer (windows XP client with IIS server, VS
2008), it works and show process the file sucess! for XXXXXXXXX.
Do you know why? One hints: it has Daemon.exe which run
process.MainProcess(args)
Please help, I have searched for one day already!!!
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public void ImportFile()
{
this.upload_file.Visible = true;
Daemon.BLL.DaemonProcess process = new
Daemon.BLL.DaemonProcess();
string mark = drpFileType.SelectedValue;
IList<Daemon.Data.FileTypeNameRuleDto> dto =
Daemon.DAL.FileTypeNameRuleDao.GetFileMark(mark);
if (dto.Count != 0)
{
try {
int returnvalue = 0;
string[] args = { CurrentUser, dto[0].FILE_TYPE_MARK };
returnvalue = process.MainProcess(args); //
returnvalue is always zero and seems that this line not run??
string ReturnValue = process.ReturnValue; //
ReturnValue is always empty and seems that this line no run??
if (returnvalue > 0)
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file
success! for " + ReturnValue + "');</script>", false);
}
else
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file fail! "
+ ReturnValue + "');</script>", false);
}
}
catch (Exception errmsg)
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('" +
errmsg.Message.ToString() + "');</script>", false);
}
}
else
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file fail!
Please check the File Rule Table');</script>", false);
}
}
In the code below, I don't know why the client always show "Process the file
fail!".
But when under developed computer (windows XP client with IIS server, VS
2008), it works and show process the file sucess! for XXXXXXXXX.
Do you know why? One hints: it has Daemon.exe which run
process.MainProcess(args)
Please help, I have searched for one day already!!!
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public void ImportFile()
{
this.upload_file.Visible = true;
Daemon.BLL.DaemonProcess process = new
Daemon.BLL.DaemonProcess();
string mark = drpFileType.SelectedValue;
IList<Daemon.Data.FileTypeNameRuleDto> dto =
Daemon.DAL.FileTypeNameRuleDao.GetFileMark(mark);
if (dto.Count != 0)
{
try {
int returnvalue = 0;
string[] args = { CurrentUser, dto[0].FILE_TYPE_MARK };
returnvalue = process.MainProcess(args); //
returnvalue is always zero and seems that this line not run??
string ReturnValue = process.ReturnValue; //
ReturnValue is always empty and seems that this line no run??
if (returnvalue > 0)
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file
success! for " + ReturnValue + "');</script>", false);
}
else
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file fail! "
+ ReturnValue + "');</script>", false);
}
}
catch (Exception errmsg)
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('" +
errmsg.Message.ToString() + "');</script>", false);
}
}
else
{
ScriptManager.RegisterStartupScript(this.UpdatePanel1,
typeof(UpdatePanel), "CloseWindow", "<script>alert('Process the file fail!
Please check the File Rule Table');</script>", false);
}
}