0

I have an application I built in c# back in 2011 that has a WCFServer:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace Atlantic_Client
{
    [ServiceContract]
    public interface IDataRequest
    {
        [OperationContract]
        string query(string instr, string attr);
    }

public class DataRequest : IDataRequest
{
    public string query(string symbol, string attr)
    {
                    if (attr == "test")
                    {
                        try
                        {
                            return 55;
                        }
                        catch (Exception) { }

                        return 55;
                    }
                    else
                    {
                        return "Bad Attribute";
                    }

            return "UNKNOWN";
        }
    }
}

class WCFServer
{
    ServiceHost host = null;
    public void open()
    {
        host = new ServiceHost(
                typeof(DataRequest),
                new Uri[]{
                new Uri("net.pipe://localhost")
                });

        host.AddServiceEndpoint(typeof(IDataRequest),
                new NetNamedPipeBinding(),
                "DataRequest");

        try
        {
            host.Open();
        }
        catch (AddressAlreadyInUseException) { }
    }

    public void close()
    {
        try
        {
            host.Close();
        }
        catch (CommunicationObjectFaultedException) { }
    }

}

}

This class is working perfectly on my old computer with Visual Basic 2008 (I just run the program as a Debug each time rather than a standalone app) and Excel 2007.

However, I got a new computer, installed Visual Studio 2008 and Excel 2010, and when I try the same thing, it doesn't work at all.

The excel RTD cells just return #N/A

john
  • 169
  • 12
  • well what does `Doesn't work mean..?` are you getting errors sounds like you may need to drop the References to the Excel 2007 dll and add the one that references 2010 from the GAC.. – MethodMan Oct 23 '16 at 22:28
  • @methodman the cells just return #N/A I'm not sure what you mean by the dlls and gac – john Oct 23 '16 at 22:31

0 Answers0