Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a created a WCF service application, through which i am accesing function of a C++ DLL. The code is given below :
C#
namespace zielhabbegService
{
    [DataContract]
    public class zielhabbegServiceClass : IzielhabbegServiceClass
    {
        [DllImport("FANselect.dll", CallingConvention = CallingConvention.StdCall,
                                       EntryPoint = "ZAJsonRequestA", ExactSpelling = false)]
        private static extern IntPtr ZAJsonRequestA([MarshalAs(UnmanagedType.LPStr)]StringBuilder szReq);

        public string getZAJsonRequestA(string input)
        {
            StringBuilder sbuilder = new StringBuilder();
            sbuilder.Append(input);
            string sResult = Marshal.PtrToStringAnsi(ZAJsonRequestA(sbuilder));
            return sResult;
        }
    }
}


This, web service is working fine.
But, when i try to access this through a web application, i am getting this error :

Quote:
Could not find default endpoint element that references contract 'abc.IzielhabbegServiceClass' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.


I found one strange thing here, first I added a service reference of the above WCF service, and then the proxy class generated is IzielhabbegServiceClassClient instead of zielhabbegServiceClassClient ? May be this is the reason why i am not able to get the output
Any help, would be appreciated

Thanks
Posted
Comments
[no name] 16-Apr-13 12:51pm    
can you please share the config code for endpoint, what kind of hostiong you are using... please give brief info

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