Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
GeneralListbox in C# with XML Pin
bertcox25-Mar-04 2:32
bertcox25-Mar-04 2:32 
GeneralRe: Listbox in C# with XML Pin
Heath Stewart25-Mar-04 4:49
protectorHeath Stewart25-Mar-04 4:49 
GeneralProcess.GetProcesses(string computerName) Pin
nilhz25-Mar-04 2:16
nilhz25-Mar-04 2:16 
GeneralRe: Process.GetProcesses(string computerName) Pin
Heath Stewart25-Mar-04 4:43
protectorHeath Stewart25-Mar-04 4:43 
GeneralError message that doesn't go away Pin
profoundwhispers24-Mar-04 23:38
profoundwhispers24-Mar-04 23:38 
GeneralRe: Error message that doesn't go away Pin
Dave Kreskowiak25-Mar-04 1:15
mveDave Kreskowiak25-Mar-04 1:15 
GeneralRe: Error message that doesn't go away Pin
Heath Stewart25-Mar-04 4:38
protectorHeath Stewart25-Mar-04 4:38 
GeneralUrgent :remoting callbacks Pin
rana7424-Mar-04 22:06
rana7424-Mar-04 22:06 
I am getting a runtime exception when i register a remote client for receving events from the server.
I have 3 main components in my solution
an interface to be shared between client and server

using System;
namespace ItfDelegate
{
public delegate void RemoteCall(string p);

public interface IDelegateHandler
{
void HandleRemote(string p);
event RemoteCall GetStock;

}
}

The server (registered as single call)

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using ItfDelegate;

namespace cbConsoleServer
{

class ClsServer:MarshalByRefObject,IDelegateHandler
{

public event RemoteCall GetStock;

public void HandleRemote(string p)
{
GetStock(p);
}


[STAThread]
static void Main(string[] args)
{

......standard single call registration code

}

}
}


And the remote client that registers for callbacks

using ItfDelegate;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

namespace RemoteDelegateClient
{
[Serializable]
class ClsClientHandler
{
string strinit;
public void Getmystats(string s)
{
strinit=s;
}

[STAThread]
static void Main(string[] args)
{

..gettting server proxy through activator.getobject

ClsClientHandler cs = new ClsClientHandler();
IDelegateHandler svr=(IDelegateHandler)o;
svr.GetStock += new RemoteCall(cs.Getmystats);
svr.HandleRemote(cs.ToString());
Console.WriteLine(cs.strinit);
}
}
}

I get an exception while registering the client with the event.What do i need to do?THe stack trace is as follows
Unhandled Exception:

System.Runtime.Serialization.SerializationException: Parse
Error, no assembly associated with Xml key a2:http://schemas.microsoft.com/clr/n
sassem/RemoteDelegateClient/RemoteDelegateClient%2C%20Version%3D1.0.1545.32282%2
C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull ClsClientHandler

Server stack trace:
at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessGetType(St
ring value, String xmlKey, String& assemblyString)
at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessType(Parse
Record pr, ParseRecord objectPr)
at System.Runtime.Serialization.Formatters.Soap.SoapHandler.ProcessAttributes
(ParseRecord pr, ParseRecord objectPr)
at System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(Head
erHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Str
eam serializationStream, HeaderHandler handler)
at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IS
erverChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestH
eaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& response
Headers, Stream& responseStream)

Exception rethrown at [0]:

GeneralRe: Urgent :remoting callbacks Pin
Heath Stewart25-Mar-04 4:21
protectorHeath Stewart25-Mar-04 4:21 
GeneralAsynchronous Network Transfer Pin
sibish n b24-Mar-04 22:04
sibish n b24-Mar-04 22:04 
GeneralGenerate a Diagram from a Database, algorithms, approaches, tips... Pin
Braulio Dez24-Mar-04 21:12
Braulio Dez24-Mar-04 21:12 
Generalc# forms Pin
DougW4824-Mar-04 18:56
DougW4824-Mar-04 18:56 
GeneralRe: c# forms Pin
Heath Stewart24-Mar-04 20:16
protectorHeath Stewart24-Mar-04 20:16 
GeneralRe: c# forms Pin
DougW4825-Mar-04 0:02
DougW4825-Mar-04 0:02 
GeneralRe: c# forms Pin
Heath Stewart25-Mar-04 3:56
protectorHeath Stewart25-Mar-04 3:56 
GeneralRich Text Box (Visual c#.net) Pin
naresh_pandey1324-Mar-04 18:53
naresh_pandey1324-Mar-04 18:53 
GeneralRe: Rich Text Box (Visual c#.net) Pin
OmegaSupreme25-Mar-04 5:24
OmegaSupreme25-Mar-04 5:24 
GeneralRe: Rich Text Box (Visual c#.net) Pin
naresh_pandey1326-Mar-04 1:59
naresh_pandey1326-Mar-04 1:59 
GeneralRich Text Box Pin
naresh_pandey1324-Mar-04 18:51
naresh_pandey1324-Mar-04 18:51 
GeneralSmart Build Pin
blackthunder00124-Mar-04 18:09
blackthunder00124-Mar-04 18:09 
GeneralRe: Smart Build Pin
Heath Stewart24-Mar-04 20:11
protectorHeath Stewart24-Mar-04 20:11 
GeneralRe: Smart Build Pin
blackthunder00124-Mar-04 23:42
blackthunder00124-Mar-04 23:42 
GeneralRe: Smart Build Pin
Heath Stewart25-Mar-04 4:02
protectorHeath Stewart25-Mar-04 4:02 
GeneralDataGrid Control Question Pin
DougW4824-Mar-04 16:54
DougW4824-Mar-04 16:54 
GeneralRe: DataGrid Control Question Pin
ian mariano24-Mar-04 17:28
ian mariano24-Mar-04 17:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.