goodmorningsky
Centurion
- Joined
- Aug 18, 2003
- Messages
- 172
I got remoting error.
I added one new remoting object called RemotingTaskHandler, but newly added one doesn't work.
I use two class using remote but, one works the other doesn't.
following err occurs while I call method like following..
An unhandled exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
Additional information: Server encountered an internal error. For more information, turn on customErrors in the server's .config file.
The Configuration on client..
<add key="RemotingDBHandler" value="tcp://IT016:8000/ComponentHostServer/RemotingDBHandler" />
<add key="RemotingTaskHandler" value="tcp://IT016:8000/ComponentHostServer/RemotingTaskHandler" />
RemotingTaskHandler is the object doesn't work..
and server side..
<system.runtime.remoting>
<application name="ComponentHostServer">
<service>
<wellknown
mode="SingleCall"
type="ComponentRemoting.RemotingDBHandler, ComponentRemoting"
objectUri="RemotingDBHandler" />
<wellknown
mode="SingleCall"
type="ComponentRemoting.RemotingTaskHandler, ComponentRemoting"
objectUri="RemotingTaskHandler" />
</service>
<channels>
<channel ref="tcp server" port="8000" />
</channels>
</application>
</system.runtime.remoting>
Interfaces are..
I added one new remoting object called RemotingTaskHandler, but newly added one doesn't work.
I use two class using remote but, one works the other doesn't.
following err occurs while I call method like following..
Code:
ComponentInterfaces.IRemotingTaskHandler remoteObj;
remoteObj = (ComponentInterfaces.IRemotingTaskHandler)Activator.GetObject(typeof(ComponentInterfaces.IRemotingTaskHandler),
ConfigurationSettings.AppSettings["RemotingTaskHandler"]);
remoteObj.TransferTable(strSqlSel, "tblDeptList", strSqlDel, tblServerList.Rows[i]["CompanyCode"].ToString(), (string)tblServerList.Rows[i]["DepartmentCode"].ToString(), (byte)1);
Additional information: Server encountered an internal error. For more information, turn on customErrors in the server's .config file.
The Configuration on client..
<add key="RemotingDBHandler" value="tcp://IT016:8000/ComponentHostServer/RemotingDBHandler" />
<add key="RemotingTaskHandler" value="tcp://IT016:8000/ComponentHostServer/RemotingTaskHandler" />
RemotingTaskHandler is the object doesn't work..
and server side..
<system.runtime.remoting>
<application name="ComponentHostServer">
<service>
<wellknown
mode="SingleCall"
type="ComponentRemoting.RemotingDBHandler, ComponentRemoting"
objectUri="RemotingDBHandler" />
<wellknown
mode="SingleCall"
type="ComponentRemoting.RemotingTaskHandler, ComponentRemoting"
objectUri="RemotingTaskHandler" />
</service>
<channels>
<channel ref="tcp server" port="8000" />
</channels>
</application>
</system.runtime.remoting>
Interfaces are..
Code:
public interface IRemotingDBHandler
{
void ExecuteNonQuery(string strSql, string connectionString, bool queueOnFail);
Object ExecuteScalar(string strSql, string connectionString);
DataSet ExecuteDataSet(string strSql, string connectionString);
}
public interface IRemotingTaskHandler
{
void TransferTable(DataTable tbl, string strSqlPrev, string compCode, string deptCode, byte handleSqlErr);
void TransferTable(string strSqlSelectTable, string tableName, string strSqlPrev, string compCode, string deptCode, byte handleSqlErr);
}