[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Re: Invalid ObjectType after GetRegisteredWellKnownClientTypes() call

Ken Kolda

10/18/2004 3:38:00 PM

When you say it doesn't work, what do you mean? Do you get an exception (if
so, provide the full message/stack trace) or do you just not get the
expected results (e.g. the entr.ObjectType is returning null wven though you
defined the type)?

The first thing I'd verify is that the assembly containing the
BusinessInterface1111.dll assembly is in a place the client can find it.

Ken


"James M via .NET 247" <anonymous@dotnet247.com> wrote in message
news:%239y2yDDtEHA.1452@TK2MSFTNGP11.phx.gbl...
Getting a strange problem, the following works on one machine but not
another, it's as if one machine is capable of using remoting and another is
not.

The Code:

foreach (WellKnownClientTypeEntry entr in
RemotingConfiguration.GetRegisteredWellKnownClientTypes())
{
if (entr.ObjectType == null)
{
//throw new RemotingException("A configured type could not " +
// "be found. Please check spelling");
}
else
{
// Add new entry for this object type
m_wellKnownTypes.Add (entr.ObjectType,entr);
}
}

The Client config file:

<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="true" port="0">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
<client>
<wellknown
type="BusinessInterface.IFooBar, BusinessInterface1111"
url="http://localhost/1111/BusinessObjects/FooBar.soap" />
</client>
</application>
</system.runtime.remoting>
</configuration>


The server config file:

<configuration>

<appSettings>

</appSettings>

<system.runtime.remoting>
<application>
<service>
<wellknown
mode="SingleCall"
type="BusinessObjects.FooBar, BusinessObjects1111, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=15yu3u5y2h9bj8i9"
objectUri="FooBar.soap" />
</service>
<channels>
<channel ref="http" priority="100" name="BusinessHTTPChannel">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</system.runtime.remoting>
</configuration>


I currently have the url for the object setup for the local machine. The
path http://localhost/1111/BusinessObjects is valid and I can browse it, so
the virtual directory in IIS is working. The problem is that
entr.ObjectType is always invalid on this machine, but on another machine it
come up correctly. Is there something special that I need to do to this
machine that the other one maybe has done to it already?

--------------------------------
From: James McClellan

-----------------------
Posted by a user from .NET 247 (http://www.dotn...)

<Id>J8RN9zbyeke7cnQSFbRx6w==</Id>