Remoting的问题,高手请进

liubocs 2004-08-12 03:35:57
我在为类通过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

}
...全文
136 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yegaofei 2004-11-23
  • 打赏
  • 举报
回复
是不是缺少config文件?
liubocs 2004-08-12
  • 打赏
  • 举报
回复
soapsuds的生成命令如下:
soapsuds -types:DRP.Register,DRP.Register -oa:DRP.RegisterInterfact.dll
zhpsam109 2004-08-12
  • 打赏
  • 举报
回复
如果编译没有问题,那么你的.cs应该没有问题!请检查你soapsuds时的命令是否正确~!

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧