Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.NET .DLL error with VFP
Message
From
05/02/2015 04:18:29
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COMCodebook
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01614786
Message ID:
01614907
Views:
36
>>Hi All,
>>
>>I read Rick Strahl's article at Codemag:
>>
>>http://www.codemag.com/Article/0703062
>>
>>I developed hello world .DLL with .NET and it worked well with VFP. After that I developed a web service client .DLL and it gave an error me:
>>
>>OLE IDispatch exception code 0 from System.ServiceModel: ServiceModel (after this point error message in turkish and I translated to english, might translate errors) client contruction section "Sorgula.KPSPublicSoap" contract default ending point cannot be found. Reason might be, there is no construction point or there is no ending point with this contract at client...
>>
>>I converted my web service client .DLL to a .NET forms .EXE and it worked very well...
>>
>>Any idea?
>
>If you're using WCF the connection information gets stored into a .config file. The name of the .config is based on the executing app. When you call this component from the VFP dev. environment, it will attempt to load this information from vfp.exe.config. If you attempt to call this component from your own EXE it will look for a file YourAppName.exe.config. So more than likely it's not finding this .config file so the endpoint (URL) isn't getting set.
>
>If you create a .config file with the correct name, it should work. An alternative is to create the binding and configure this in your .NET code instead of loading it. Something like this:
>
>
>var binding = new BasicHttpBinding();
>binding.MaxBufferSize = 214783600;
>// Configure other properties here
>var client = new NameOfServiceReference(binding, new EndpointAddress("http://www.nameofthewebsitehere.com"));
>
Your first solution "vfp9.app.config" worked, thank you... :)

but I couldn't use binding way. My service references name is Sorgula, I put Sorgula ;

var client = Sorgula(binding, new EndpointAddress("http://www.nameofthewebsitehere.com"));

gives error: 'TCKimlik.Sorgula' is a 'namespace' but is used like a 'variable'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform