+ //
+ // If the specified uri starts with the application name,
+ // RemoveAppNameFromUri returns the uri w/out the leading
+ // application name, otherwise it returns null.
+ //
+ // Assumes that the uri is not normalized.
+ //
+ static string RemoveAppNameFromUri (string uri)
+ {
+ string name = RemotingConfiguration.ApplicationName;
+ if (name == null) return null;
+ name = "/" + name + "/";
+ if (uri.StartsWith (name))
+ return uri.Substring (name.Length);
+ else
+ return null;
+ }
+