HighTechTalks DotNet Forums  

Config file is found and loaded fine but no remote object.

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss Config file is found and loaded fine but no remote object. in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
CodeHulk
 
Posts: n/a

Default Config file is found and loaded fine but no remote object. - 04-12-2007 , 11:28 AM






I'm running a windows service as a server. Installing the service
succeeds the service is up and running. The client gets the old
"target machine actively refused it error". I through in some tracing
code and no exceptions are being thrown. It finds and loads the
config file. I ran netstat -a and did not see the my port on the list
however. It makes me wonder if a syntax error is found on a config
file when does it get thrown or doesn't it? Anyway, here is the
code.

// Service OnStart Method
protected override void OnStart(string[] args)
{
cServiceLog.LogEvent("Service start", "RemoteServer.OnStart");

new Thread(delegate()
{
try
{
RemotingConfiguration.Configure(Globals.ConfigFile ,
false);
}
catch (Exception ex)
{
// Log to file
}
}).Start();
}

// Config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="SingleCall"
type="MAXIS.DocumentControl.Remoting.RemoteDocumen tControl,
MAXIS.DocumentControl.Remoting"
objectUri="RDC"
/>
</service>
<channel>
<channel
ref="tcp"
port="3333"
/>
</channel>
</application>
</system.runtime.remoting>
<appSettings>
<!-- Additional Application Settings -->
</appSettings>
</configuration>


I've taken out some of the white space to make things easier to read.
Hope this helps. Any info people have would be much appreciated.

Thanks,

~Justin


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.