[Mono-list] Remoting under XSP problem

Hendy Sumanto hsumanto at vpac.org
Wed Jan 16 20:39:05 EST 2008


We are having problem getting remoting on mono running under XSP.
This is the way we are starting up the remoting. It works fine not running under XSP.

using System;
using System.Text;
using System.Globalization;
using System.Reflection;
using System.IO;
using System.Collections;
using System.Text.RegularExpressions;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.ServiceProcess;

using ExcelInterface;


namespace bridge_service
{
    class Program
    {
        static void Main(string[] args)
        {
            TcpChannel channel = new TcpChannel(8081);
            ChannelServices.RegisterChannel(channel);

            RemotingConfiguration.RegisterWellKnownServiceType(typeof(ExcelApplication), "ExcelHelper",
                WellKnownObjectMode.Singleton);
            System.Console.WriteLine("Press the enter key to exit excel server.");
            System.Console.ReadLine();
        }
    }
}


And in the client we are using this to try to access the remote service but it always failed. 

                // Create the application
                ExcelApplication xl = (ExcelApplication)Activator.GetObject(
                        typeof(ExcelApplication),
                        "tcp://localhost:8081/ExcelHelper");
                xl.Visible = false;

The error message we got:

Server Error in '/ETS' Application

--------------------------------------------------------------------------------

Failed to create shadow copy (CopyFile).
Description: Error processing request.

Error Message: HTTP 500. System.ExecutionEngineException: Failed to create shadow copy (CopyFile). 

Stack Trace: 

System.ExecutionEngineException: Failed to create shadow copy (CopyFile).  at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)  at System.Type.GetType (System.String typeName) [0x00000]   at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannelConfig (System.Runtime.Remoting.ChannelData channel) [0x00000]   at System.Runtime.Remoting.RemotingConfiguration.RegisterChannels (System.Collections.ArrayList channels, Boolean onlyDelayed) [0x00000]   at System.Runtime.Remoting.ConfigHandler.OnEndParsing (Mono.Xml.SmallXmlParser parser) [0x00000]   at Mono.Xml.SmallXmlParser.Parse (System.IO.TextReader input, IContentHandler handler) [0x00000]   at System.Runtime.Remoting.RemotingConfiguration.LoadDefaultDelayedChannels () [0x00000]   at System.Runtime.Remoting.Channels.ChannelServices.CreateClientChannelSinkChain (System.String url, System.Object remoteChannelData, System.String& objectUri) [0x00000]   at System.Runtime.Remoting.RemotingServices.GetClientChannelSinkChain (System.String url, System.Object channelData, System.String& objectUri) [0x00000]   at System.Runtime.Remoting.RemotingServices.GetOrCreateClientIdentity (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType, System.Object& clientProxy) [0x00000]   at System.Runtime.Remoting.RemotingServices.GetRemoteObject (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType) [0x00000]   at System.Runtime.Remoting.RemotingServices.Connect (System.Type classToProxy, System.String url) [0x00000]   at System.Activator.GetObject (System.Type type, System.String url) [0x00000]   at org.vpac.cfcp.emissions.control.TestRequestTemplateManager.populateTemplateFile (System.IO.FileInfo template, System.IO.FileInfo fileToPopulate, org.vpac.cfcp.emissions.entities.TestType testType, org.vpac.cfcp.emissions.entities.Employee user, System.String strRequestedOn) [0x00000]   at org.vpac.cfcp.emissions.control.TestRequestTemplateManager.downloadPopulatedFile (org.vpac.cfcp.emissions.entities.TestType testType, org.vpac.cfcp.emissions.entities.Employee user, System.String strRequestedOn) [0x00000]   at wfTestRequest_NewRequest.ctlDownloadTemplate_Click (System.Object sender, System.Web.UI.ImageClickEventArgs e) [0x00000]   at System.Web.UI.WebControls.ImageButton.OnClick (System.Web.UI.ImageClickEventArgs e) [0x00000]   at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent (System.String eventArgument) [0x00000]   at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000]   at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000]   at System.Web.UI.Page.RaisePostBackEvents () [0x00000]   at System.Web.UI.Page.InternalProcessRequest () [0x00000]   at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] 

--------------------------------------------------------------------------------

I tried to disable shadow copying through Web.Config by adding
<hostingEnvironment shadowCopyBinAssemblies="false" /> 
but still getting the same error message as above.

Any idea about this?

Thank you.

Hendy


More information about the Mono-list mailing list