Click here to Skip to main content
16,005,178 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Please explain .net compiling Pin
MALDATA2-Jul-05 9:20
MALDATA2-Jul-05 9:20 
GeneralRe: Please explain .net compiling Pin
Colin Angus Mackay3-Jul-05 21:09
Colin Angus Mackay3-Jul-05 21:09 
GeneralRe: Please explain .net compiling Pin
MALDATA5-Jul-05 6:36
MALDATA5-Jul-05 6:36 
GeneralHelp to parse SOAP Pin
satishrg1-Jul-05 6:04
satishrg1-Jul-05 6:04 
GeneralRe: Help to parse SOAP Pin
Steve Maier1-Jul-05 8:46
professionalSteve Maier1-Jul-05 8:46 
GeneralEvent fired on killing an application fromTaskManager Pin
manivannan.p1-Jul-05 1:44
manivannan.p1-Jul-05 1:44 
GeneralAdding an ASP.NET client to an application using .net remoting on TCP. Pin
basbous30-Jun-05 3:08
basbous30-Jun-05 3:08 
GeneralConfiguring the remoting server from code instead of from a config file Pin
bobishkindaguy29-Jun-05 10:52
bobishkindaguy29-Jun-05 10:52 
After researching for some time, including in Ingo's book Advanced Remoting, I have not been able to find code that successfully does the equivalent of this method:

RemotingConfiguration.Configure("someserver.exe.config")

Of course, the configuration info is contained in the config file, and this works! There are lots of examples out there, so that's fine if you want to use config files.

But I don't want to use config files, for the following reason: My produt may be deployed where IT people are NOT available to go in and edit xml files such as the config file.

Therefore, I want to do the equivalent from code, where the paramters that are in the config file are loaded from the registry or a database table.

Here is some code that "should" work , can anyone tell me what I'm doing wrong?

The problem is that although the code here runs fine (and so seems to work), when a client object tries to access a MarshalByRefObject in the server's remotable class, an error says that the object could not be created...

Keep in mind, though, that the very same process works fine when configured from the config file. Therefore, I know that everything is "ok" with the implementation etc. The problem remains, then that I need help configuring the server from code !!


Here's the code that doesn't expose the remotable object properly:

Dim AHashTable As IDictionary
AHashTable = New Hashtable
AHashTable("name") = "MyRemotableObject.soap"
'(MyRemotableObject is an implementation of the IMyRemotableObject interface)
AHashTable("port") = MyTCPPort
'(MyTCPPort is loaded from some database field)
AHashTable("machinename") = "TheServerComputer"

Dim AFormatProvider As New BinaryServerFormatterSinkProvider
AFormatProvider.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full

Dim AChannel As New TcpChannel(AHashTable, Nothing, AFormatProvider)
ChannelServices.RegisterChannel(AChannel)

Dim AnObjectURI As String = "MyRemotableObject.soap"
Dim T As System.Type = GetType(MyRemotingObjectNamespace.IMyRemotableObject)
RemotingConfiguration.RegisterWellKnownServiceType(T, AnObjectURI, WellKnownObjectMode.Singleton)



Bob
QuestionModifying the "Local security settings" programmatically? Pin
François Gasnier29-Jun-05 9:00
François Gasnier29-Jun-05 9:00 
AnswerRe: Modifying the "Local security settings" programmatically? Pin
François Gasnier30-Jun-05 1:17
François Gasnier30-Jun-05 1:17 
QuestionError - proxy name could not be resolved? Pin
Anonymous29-Jun-05 2:03
Anonymous29-Jun-05 2:03 
Generalnamespace help Pin
arun_appu28-Jun-05 19:49
arun_appu28-Jun-05 19:49 
GeneralRe: namespace help Pin
Christian Graus28-Jun-05 20:02
protectorChristian Graus28-Jun-05 20:02 
GeneralRe: namespace help Pin
Dave Kreskowiak29-Jun-05 1:01
mveDave Kreskowiak29-Jun-05 1:01 
GeneralRe: namespace help Pin
Christian Graus29-Jun-05 11:31
protectorChristian Graus29-Jun-05 11:31 
GeneralRemoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 19:23
caoyg28-Jun-05 19:23 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
Christian Graus28-Jun-05 19:36
protectorChristian Graus28-Jun-05 19:36 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 19:54
caoyg28-Jun-05 19:54 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
mav.northwind28-Jun-05 20:09
mav.northwind28-Jun-05 20:09 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 20:19
caoyg28-Jun-05 20:19 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
mav.northwind28-Jun-05 21:03
mav.northwind28-Jun-05 21:03 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 21:21
caoyg28-Jun-05 21:21 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
mav.northwind28-Jun-05 22:42
mav.northwind28-Jun-05 22:42 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 23:00
caoyg28-Jun-05 23:00 
GeneralRe: Remoting that doesn't work on Windows XP SP2 Pin
caoyg28-Jun-05 23:32
caoyg28-Jun-05 23:32 

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.