.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > Serious Remoting Question!! (with code)
 

Serious Remoting Question!! (with code)

Objective: Distributed Data-driven Application based on Remoting

Structure Description:

Server machine:

1. Interface Library Assembly(for client use)

Assembly Name/Friendly name: DataAccessInterface
Interface Name: IDataAccess

2. Data access service component (dll library) built on SQL server 2005, which implements the above interface. Data layeris typed Dataset (.xsd)

Component Asembly Name: ShipQuerySystemDAL
Namespace Name: DataAccess
Class Name: DataAccessModule

3. IIS hosting

server side web.config file as

<?xml version ="1.0" encoding ="utf-8"?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown type ="DataAccess.DataAccessModule, ShipQuerySystemDAL" mode ="SingleCall" objectUri="DataAccessModule.soap" />
</service>
</application>
<customErrors mode ="Off" />
</system.runtime.remoting>
</configuration>
Client Machine

1.Client Program

private void button1_Click(object sender, EventArgs e)
{
String url = "http://192.168.1.88/SQSHost/DataAccessModule.soap";
IDataAccess ida = (IDataAccess)Activator.GetObject(typeof(IDataAccess), url);
dataGridView1.DataSource = ida.QuickShipMatch(Int32.Parse(textBox1.Text), Int32.Parse(textBox2.Text));
}
Note: Copied the Interface assembly DataAccessInterface.dll to client machine. SQSHost is the virtual directory on server machine used by IIS


Error/Problem:

System.Runtime.Remoting.RemotingException: Cannot load type 'DataAccess.DataAccessModule, ShipQuerySystemDAL'.
at System.Runtime.Remoting.RemotingConfigHandler.RemotingConfigInfo.LoadType(String typeName, String assemblyName)
at

Question:

1. Did I miss anything/configuaration leading this runtime error - Cannot Load Type?
2. Did I misunderstandsome concepts or wrongly coded?
3. If an Interface method needs to return a strong typed datatable, it has to create a dataset schema in that interface project, am I right? I dont need to create another same dataset in the component library project, do I? (I didnt actually)

Public Interface IDataAccess
Function QuickShipMatch(ByVal lower As Integer, ByVal upper As Integer) As ShipDataSet.ShipListDataTable
End Interface

I just spent quite a few hours on this, got no clue...

Would you please kindly point out my mistakes and give some advice on the issue?? Thanks a lot.
  • Edited byTP_FAN Thursday, August 20, 2009 4:51 AM
  • Edited byTP_FAN Thursday, August 20, 2009 4:44 AM
  •  
TP_FAN
Problem Solved

Both Interface dll and component dll need to be placed in bin directory of virtual directory.
TP_FAN

You can use google to search for other answers

Custom Search

More Threads

• .Net Serialization
• Remoting remote ip
• Deserialization of Enumerated Member
• Sending and Retrieving Data using TCPClient only..
• Program throws a security exception on network cluster
• .NET Remoting question: SingleCall and static variable
• How to close a socket??
• Genrics list<type> serialization problem.
• remoting exception
• Bug? GetObjectData called multiple times for single reference