Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok this is my first look and WCF so I am hoping this is a simple fix. This is my code
C#
namespace Bibliotheca.InstallMon 
{
  class InstallMonService : IInstallMon

 public void WriteXMLdata(String p_name, String appv, String date_time, String u_name, String IPAddress, String m_name)
        {

           SomeCode;
           
        }

}


And this is my service

C#
namespace Bibliotheca.InstallMon
{
    [XmlSerializerFormat]

    [ServiceContract]
    public interface IInstallMon
    {

        [OperationContract]

       void WriteXMLdata(String p_name, String appv, String date_time, String u_name, String IPAddress, String m_name);


    }

I then call it from a client app like so.
C#
InstallMonClient client = new InstallMonClient(); 

client.IInstallMon.WriteXMLdata("string", "string", "string", "string", "string", "string");


But unfortunately I get the above error where am I going wrong :(.

Thanks for your help.
Posted
Updated 22-Jan-15 7:13am
v2

InstallMonClient client = new InstallMonClient(); 

client .WriteXMLdata("string", "string", "string", "string", "string", "string");.WriteXMLdata("string", "string", "string", "string", "string", "string");


When you are calling from the client, you are not using the client instance you are creating.
 
Share this answer
 
Comments
Member 11347466 22-Jan-15 13:12pm    
Ok that was a typo on coping the file code over I still have the same problem
Well I replaced the web.config file with a simplified web.config file and everything started to work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900