Click here to Skip to main content
15,920,633 members
Home / Discussions / C#
   

C#

 
GeneralRe: Online Radio Pin
atulonweb@hotmail.com5-Jul-07 23:14
atulonweb@hotmail.com5-Jul-07 23:14 
GeneralRe: Online Radio Pin
atulonweb@hotmail.com22-Jul-07 23:15
atulonweb@hotmail.com22-Jul-07 23:15 
QuestionException :"The configuration section for Logging cannot be found in the configuration source." Pin
rameshbhojan5-Jul-07 0:55
rameshbhojan5-Jul-07 0:55 
AnswerRe: Exception :"The configuration section for Logging cannot be found in the configuration source." Pin
mohamod18-Jun-14 23:44
mohamod18-Jun-14 23:44 
QuestionHow can i make a Project installable ? Pin
fmlove5-Jul-07 0:30
fmlove5-Jul-07 0:30 
AnswerRe: How can i make a Project installable ? Pin
Christian Graus5-Jul-07 1:20
protectorChristian Graus5-Jul-07 1:20 
AnswerRe: How can i make a Project installable ? Pin
kubben5-Jul-07 2:35
kubben5-Jul-07 2:35 
QuestionRemoting: assign a client's handler to a server's event Pin
1242565-Jul-07 0:28
1242565-Jul-07 0:28 
I'm trying to get an event-handler relationship set up over a remote tcp connection. I have set the security level so that I can serialize any object (full). My server has a "game" object which has an event. The client has a user control that responds to the event through an intermediate "remoteReceiver" object that inherits MarshallbyRefObject. I'm getting "An error occurred while processing the request on the server: System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink." at "Game.testEvent += new Game.BlankEventHandler(remoteReceiver.fireTestEven t2);". Can anyone tell me how to fix this.

Server code:
<br />
    [Serializable]<br />
    public class Game : MarshalByRefObject<br />
    {<br />
        public Game()<br />
        {<br />
            // We create our own provider because we need to set the TYpeFilterLevel to full<br />
            // Without this, we can not pass objects to remote procedure calls.<br />
            SoapServerFormatterSinkProvider provider = new SoapServerFormatterSinkProvider();<br />
            provider.TypeFilterLevel = TypeFilterLevel.Full;<br />
            IDictionary props = new Hashtable();<br />
            props["port"] = Properties.Settings.Default.tcp_channel;<br />
            props["name"] = String.Empty;//"game";<br />
            // Register our channel on selected port<br />
            ChannelServices.RegisterChannel(new TcpChannel(props, null, provider), false);<br />
            // Register as an available service with the name <br />
            RemotingServices.Marshal(this, "game");<br />
        }<br />
        [Serializable]<br />
        public delegate void BlankEventHandler();<br />
        public event BlankEventHandler testEvent;<br />
<br />
        public void fireTestEvent()<br />
        {<br />
            testEvent();<br />
        }<br />
    }<br />


Client code:
<br />
    public partial class PlayerRoom : Room<br />
    {<br />
        public PlayerRoom()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        public PlayerRoom(string ip)<br />
        {<br />
            InitializeComponent();<br />
<br />
            // Connect to the game server<br />
            TcpChannel tcpChannel = new TcpChannel();<br />
            ChannelServices.RegisterChannel(tcpChannel, false);<br />
            Type requiredType = typeof(Game);<br />
            string port = Properties.Settings.Default.tcp_channel.ToString();<br />
            game = (Game)Activator.GetObject(requiredType, "tcp://" + ip + ":" + port + "/game");<br />
<br />
            remoteReceiver = new RemoteReceiver();<br />
<br />
            game.testEvent += new Game.BlankEventHandler(remoteReceiver.fireTestEvent2);<br />
            remoteReceiver.testEvent2 += new Game.BlankEventHandler(eventResponder);<br />
            game.fireTestEvent();<br />
        }<br />
<br />
        public Game game;<br />
        public RemoteReceiver remoteReceiver;<br />

QuestionNo Double click event on a list box control - C#.Net(Copmact framework) Pin
Sri harini5-Jul-07 0:25
Sri harini5-Jul-07 0:25 
AnswerRe: No Double click event on a list box control - C#.Net(Copmact framework) Pin
Dave Kreskowiak5-Jul-07 5:06
mveDave Kreskowiak5-Jul-07 5:06 
GeneralRe: No Double click event on a list box control - C#.Net(Copmact framework) Pin
Dan Neely5-Jul-07 5:39
Dan Neely5-Jul-07 5:39 
AnswerRe: No Double click event on a list box control - C#.Net(Copmact framework) Pin
Dan Neely5-Jul-07 5:40
Dan Neely5-Jul-07 5:40 
GeneralRe: No Double click event on a list box control - C#.Net(Copmact framework) Pin
Dave Kreskowiak5-Jul-07 15:30
mveDave Kreskowiak5-Jul-07 15:30 
QuestionmatchIT API Pin
NAND_205-Jul-07 0:21
NAND_205-Jul-07 0:21 
AnswerRe: matchIT API Pin
Christian Graus5-Jul-07 1:20
protectorChristian Graus5-Jul-07 1:20 
GeneralRe: matchIT API Pin
NAND_205-Jul-07 2:24
NAND_205-Jul-07 2:24 
GeneralRe: matchIT API Pin
Christian Graus5-Jul-07 2:55
protectorChristian Graus5-Jul-07 2:55 
JokeRe: matchIT API Pin
Pete O'Hanlon5-Jul-07 4:28
mvePete O'Hanlon5-Jul-07 4:28 
JokeRe: matchIT API Pin
J4amieC5-Jul-07 5:37
J4amieC5-Jul-07 5:37 
JokeRe: matchIT API Pin
Pete O'Hanlon5-Jul-07 9:51
mvePete O'Hanlon5-Jul-07 9:51 
QuestionHaving Multiple Services in a single project Pin
M. J. Jaya Chitra5-Jul-07 0:15
M. J. Jaya Chitra5-Jul-07 0:15 
AnswerRe: Having Multiple Services in a single project Pin
kubben5-Jul-07 2:37
kubben5-Jul-07 2:37 
GeneralRe: Having Multiple Services in a single project Pin
M. J. Jaya Chitra5-Jul-07 2:58
M. J. Jaya Chitra5-Jul-07 2:58 
QuestionDiffrence between NHibernate and LinQ ? Pin
vytheese5-Jul-07 0:11
professionalvytheese5-Jul-07 0:11 
AnswerRe: Diffrence between NHibernate and LinQ ? Pin
Pete O'Hanlon5-Jul-07 0:45
mvePete O'Hanlon5-Jul-07 0:45 

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.