Hi Robert,
you are right, the application name should be removed from the object
uri not during parse of the channel url.
It should be removed when the remoting server searches or inserts the
object's identity in the uri table.
The change should be in the RemotingServices class.
I cancel my previous patch and send new one.
P.S.
The problem is not only for IIS hosting and HttpChannel. It is also
relevant for the TcpChannel.
Thanks,
Svetlana.
-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Robert
Jordan
Sent: Monday, October 31, 2005 12:49 AM
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Patch for System.Runtime.Remoting: remove
applicationname while extracting object uri from url
Hi Svetlana,
> In .NET the url to the remote object can contain the application name.
> In the IIS hosted applications it is mandatory.
> This application name should be removed during parsing of the url to
> extract object uri.
> I prepared patch to handle urls which contain application name.
I cannot reproduce that parsing behavior on .NET. If you run the
following test on .NET, you'll see that the application name doesn't get
removed from the channel url.
The problem with mono's channels & IIS must be somewhere else.
Since only HttpChannel can be hosted, the problem might be in
System.Runtime.Remoting.Channels.Http.HttpRemotingHandler.
Robert
using System;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels.Http;
class Test
{
static void Main ()
{
RemotingConfiguration.ApplicationName = "foo";
TcpChannel tc = new TcpChannel (0);
HttpChannel hc = new HttpChannel (0);
TestParse (tc, "tcp://localhost:1234/foo/object.rem");
TestParse (tc, "tcp://localhost:1234/object.rem");
TestParse (tc, "tcp://localhost:1234/foo/");
TestParse (tc, "tcp://localhost:1234/foo");
TestParse (tc, "tcp://localhost:1234");
TestParse (hc, "http://localhost:1234/foo/object.rem");
TestParse (hc, "http://localhost:1234/object.rem");
TestParse (hc, "http://localhost:1234/foo/");
TestParse (hc, "http://localhost:1234/foo");
TestParse (hc, "http://localhost:1234");
}
static void TestParse (IChannel chan, string url)
{
string objectUri;
string channelUrl = chan.Parse (url, out objectUri);
if (channelUrl != null)
Console.WriteLine ("{0} {1}", channelUrl,
objectUri == null ? "null" : objectUri);
}
}
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RemotingServices.diff
Type: application/octet-stream
Size: 1184 bytes
Desc: RemotingServices.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051031/ee8e0d9c/attachment.obj