Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF DLL REST website
I have a created a WCF service application, through which i am accesing function of a C++ DLL. The code is given below :
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 16-Apr-13 2:08am
Comments
babu saravanan at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 16 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100