473,545 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error while registering the events on client side appl.

Hi,

I m getting the following error while registering the events on client
appl.
error:
"An error occurred creating the form. See Exception.Inner Exception for
details. The error is: Exception has been thrown by the target of an
invocation."
'My Coding
'---------client
Dim chan As HttpChannel
Dim serverProv As New BinaryServerFor matterSinkProvi der
Dim clientProv As New BinaryClientFor matterSinkProvi der
Dim props As IDictionary = New Hashtable
serverProv.Type FilterLevel =
System.Runtime. Serialization.F ormatters.TypeF ilterLevel.Full
props("port") = 0
'props("name") = "ChatApplicatio n"
chan = New HttpChannel(pro ps, clientProv, serverProv)
ChannelServices .RegisterChanne l(chan, False)

theManager =
CType(Activator .GetObject(Type .GetType("InBet ween.Manager,In Between"),
"http://localhost:7777/ChatApplication "), InBetween.Manag er)

AddHandler Me.theManager.e vtReceiveText, AddressOf
Me.HandleReceiv edMsg

'-----------------manager
Public Delegate Sub ReceiveText(ByV al username As String, ByVal text
As String)

Public Class Manager
Inherits MarshalByRefObj ect

Public Event evtReceiveText As ReceiveText

'-----------------server
public class Server

Public Shared Sub Main()
Dim server1 As Server
server1 = New Server()
End Sub

Public Sub New()

Dim chan As IChannel
Dim serverProv As New BinaryServerFor matterSinkProvi der
Dim clientProv As New BinaryClientFor matterSinkProvi der
Dim props As IDictionary = New Hashtable
serverProv.Type FilterLevel =
System.Runtime. Serialization.F ormatters.TypeF ilterLevel.Full
props("port") = 7777
'props("name") = "ChatApplicatio n"
chan = New HttpChannel(pro ps, clientProv, serverProv)
ChannelServices .RegisterChanne l(chan, False)

RemotingConfigu ration.Register WellKnownServic eType( _
Type.GetType("I nBetween.Manage r, InBetween"), _
"ChatApplicatio n", WellKnownObject Mode.Singleton)

Dim Manager1 As New Manager()
System.Console. WriteLine("Hit ENTER to exit...")
System.Console. ReadLine()

And one more thing is, I have copied the server.exe in C:\Inetpub
\wwwroot and before running client application, I have to double click
server.exe and run it. how to make it run automatically whenever any
client application starts. And can I use class library instead of
console application.

Thanks,
Shivkumar

Jul 19 '07 #1
0 1201

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3065
by: Vince C. | last post by:
Hi. I'd like to trap ADO Recordset object events in my ASP script (either VBS or JS, no preference). I've tried (in VBS) writing a Sub rs_RecordChangeComplete( adReason, cRecords, pError, adStatus, pRecordset ) - rs being a server-side ADODB.Recordset object - but it doesn't get called whenever rs is moved (I browse it in a loop). Is...
0
1408
by: Efim | last post by:
Hi, I have got some problem with sending of events in .NET. I am using remouting. The client has got 2 objects for receiving different types of events (responses and events) The server has got two objects for sending of these events. The client opens tcp port 0 to receive events: if (ChannelServices.GetChannel("tcp") == null) {
5
2580
by: Mong | last post by:
Hi, I have a webform with various asp controls on it such as textboxes and dropdownlists. I'm fairly new to asp.net coming from VB6 and am wondering when it's best to use client side events and when it's best to use server side events. For example, if a textbox is to contain a date I want to validate the date when that textbox loses the...
2
5975
by: Helen | last post by:
I've got some clientside script that runs when the selected index of a select box changes. Now I need to swap my selectbox with an ASP.NET radiobuttonlist (to solve some layout issues). I still need the clientside script to run when the selected radio button changes, but I'm having trouble registering onclick events with each of the radio...
5
1051
by: Frank | last post by:
Hi, in a .net web appl (codebehind) when I push a button I want to do javascript stuff on the CLIENT side and then go on with the codebehind coding of the button (or maybe another proc) on the SERVER side. Is that possible? I can't get it to work with doPostback Thanks Frank
1
1709
by: DaveS | last post by:
I am trying to capture the mouse click position in a datagrid but I get the following compilation error: Compiler Error Message: BC30002: Type 'System.Windows.Forms.MouseEventArgs' is not defined. Source Error: Line 84: Private myCheckBoxCol As Integer = 0 'my checkbox column Line 85:
1
2173
by: shivkumar2004 | last post by:
Hi!, I am developing a chat system using vb.net in vs 2005. I am getting the following error while registering the events. error details: System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Type System.DelegateSerializationHolder and the...
3
2031
by: Mike | last post by:
Hi, I'm wondering if I can do this with ASP.NET?
9
2070
by: Trapulo | last post by:
Hello, with ASP.NET 2.0 Ajax every unexpected error is managed client-side with a popup that reports the error to the user. In ASP.NET 3.5 this behavor has been changed: how can I have a similar behavor? I'd like that every exception raised from ASP.NET runtime during an asyncpostback is managed in client side with a popup that reports the...
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.