471,354 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Problem With Remoting Help ME

I have write a DLL server
I have this problem : when I call one specific function to the inside Class
i have this error :

"Impossible to find the constructor demanded for deserialize a object of
type DllServer.NetApi+cColl

This is my Class, I have only specified the interested part

Public Class NetApi

Inherits MarshalByRefObject

Implements IDisposable

Private mColl As cColl

Public ReadOnly Property PropertyColl As cColl
Get
Return mUsersAndGroups
End Get
End Property

Public Function PopulateColl () As Integer
mcoll.add ....
mcoll.add ....
end function

Public Sub Dispose() Implements System.IDisposable.Dispose
mcoll = Nothing
End Sub

<Serializable()> _
Public Class cColl
Inherits NameObjectCollectionBase

Sub Add(ByVal Group As CGroup)
Me.BaseAdd(Group.Name, Group)
End Sub

Sub Add(ByVal User As cUser)
Me.BaseAdd(User.Name, User)
End Sub

Public Property Items(ByVal index As Integer) As Object
Get
Return Me.BaseGet(index)
End Get
Set(ByVal value)
Me.BaseSet(index, value)
End Set
End Property
End Class

End Class

excused for my English, i'm italian!!

Jul 21 '05 #1
2 964
Gigi,

you should add a default constructor to your cCol class. Then it should
work.

Regards,
Michael

"Gigi" <g@msn.com> schrieb im Newsbeitrag
news:u8**************@TK2MSFTNGP12.phx.gbl...
I have write a DLL server
I have this problem : when I call one specific function to the inside Class i have this error :

"Impossible to find the constructor demanded for deserialize a object of
type DllServer.NetApi+cColl

This is my Class, I have only specified the interested part

Public Class NetApi

Inherits MarshalByRefObject

Implements IDisposable

Private mColl As cColl

Public ReadOnly Property PropertyColl As cColl
Get
Return mUsersAndGroups
End Get
End Property

Public Function PopulateColl () As Integer
mcoll.add ....
mcoll.add ....
end function

Public Sub Dispose() Implements System.IDisposable.Dispose
mcoll = Nothing
End Sub

<Serializable()> _
Public Class cColl
Inherits NameObjectCollectionBase

Sub Add(ByVal Group As CGroup)
Me.BaseAdd(Group.Name, Group)
End Sub

Sub Add(ByVal User As cUser)
Me.BaseAdd(User.Name, User)
End Sub

Public Property Items(ByVal index As Integer) As Object
Get
Return Me.BaseGet(index)
End Get
Set(ByVal value)
Me.BaseSet(index, value)
End Set
End Property
End Class

End Class

excused for my English, i'm italian!!

Jul 21 '05 #2
Thank You
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Linesh Gajera | last post: by
9 posts views Thread by Sudesh Sawant | last post: by
1 post views Thread by David Krmpotic | last post: by
12 posts views Thread by Steven Berkovitz | last post: by
1 post views Thread by Thomee Wright | last post: by
reply views Thread by Kristian Reukauff | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.