Remoting的问题,高手请进
我在为类通过soapsuds工具生成dll时出错:
c:\Documents and Settings\Administrator\Local Settings\Temp\ss12a.tmp\drp.register.cs<68,16>: error CS1031:应输入类型
根据以上的错误,我检查了register.cs的第68行,哪里是一个“{”括号,编译register.cs时没有任何错误。
Register.cs代码如下:
public class Register:System.MarshalByRefObject
{
#region 构造函数
/// <summary>
/// 注册应用程序,验证应用程序的有效性
/// </summary>
/// <param name="pAppID">该ID来自于应用程序的配置文件</param>
public Register()
{
}
#endregion
#region 应用登录
public void Logon()
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select * from application where appserverid='"+strAppID+"'");
if (dt.Rows.Count==1)
{
if (dt.Rows[0]["onlinestate"].ToString().Trim()!="1")
{
db.ExecuteNonQuery("update application set onlinedate='"+ DateTime.Today +"',onlinestate='1' where appserverid='"+strAppID+"'");
}
blnState=true;
}
else
{
blnState=false;
strErrMsg="无效的应用ID。";
}
}
catch (Exception ex)
{
strErrMsg=ex.Message ;
blnState=false;
}
finally
{
db.CloseDB();
}
}
#endregion
#region 应用
private string strAppID;
public string ApplicationID
{
get {return strAppID;}
set {strAppID=value;}
}
private string strAppServer;
public string ApplicationServerName
{
get {return strAppServer;}
set {strAppServer=value;}
}
private string strAppIP;
public string ApplicationServerIP
{
get {return strAppID;}
set {strAppID=value;}
}
private string strAppTitle;
public string ApplicationTitle
{
get {return strAppTitle;}
set {strAppTitle=value;}
}
private string strOnLineTime;
public string OnLineTime
{
get {return strOnLineTime;}
}
private string strOffLineTime;
public string OffLineTime
{
get {return strOffLineTime;}
}
private ApplicationTypeEnum enuAppType;
public ApplicationTypeEnum ApplicationType
{
get {return enuAppType;}
set {enuAppType=value;}
}
private Boolean blnState=false;
public Boolean State
{
get {return blnState;}
}
#endregion
#region 获取空的applicaiton结构
public DataTable GetEmpty()
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select * from application where 1=2");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
#endregion
#region 获取应用节点列表
public DataTable GetApplicationList()
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select * from application order by appserverid");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
#endregion
#region 获取公司
public DataTable GetCompany()
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select corpid,corpname from company order by corpid");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
public DataTable GetCompany(string pCorpID)
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select * from company where corpid='"+pCorpID+"'");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
#endregion
#region 获取部门
public DataTable GetDept(string pCorpID)
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select deptid,deptname from dept where corpid='"+pCorpID+"'");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
public DataTable GetDept(string pCorpID,string pDeptID)
{
DataBase db=new DataBase();
DataTable dt=new DataTable();
try
{
db.Open();
dt=db.Query("select * from dept where corpid='"+pCorpID+"' and deptid='"+pDeptID+"'");
return dt;
}
catch (Exception ex)
{
throw new Exception(ex.Message,ex);
}
finally
{
db.CloseDB();
}
}
#endregion
#region 错误信息
public string GetErrMessage()
{
return strErrMsg;
}
private string strErrMsg;
public string ErrMessage
{
get {return strErrMsg;}
}
#endregion
}