I'm a little confused. We downloaded the WSDL file from Salesforce and created a web reference to it using a file path as suggested. It created what I understood to be the proxy classes, but not the SforceService class.
Someone else suggested that you have to use the WSDL.exe to generate the class file which I did and it now works.
What I don't understand is why?
Didn't the process of created a web reference configure the proxies as needed? Why the extra step?
Any advice?
The SforceService class is only generated if you do add web reference (from the advanced button on add service reference dialog) if you do add service reference, you get a different set of objects, and a different programming model.
All the .NET samples on the salesforce site use the add web reference style proxies, but if you'd rather use the WCF (aka service reference) style stuff instead, that's fine too.
Ok, now I rememmbered why its difficult to use service reference instead of web reference. WCF does not support WSDL defined SOAP headers which salesforce API uses for carrying session identifier. For every application you have to integrate special processing like described here, having to itterate over all operations and modify their endpoint behavior. Ugly at best. Web reference on the other hand supports soap headers directly.
First of all, you should use "Add Service Reference" instead of "Add Web Reference" unless you have no choice.
Second, "Add Web Reference" generally produces the same code as wsdl.exe. In your case, the only reason that I would run wsdl.exe would be to better see any error messages.
I suggest that you use Object Browser to look at the types in your service reference - maybe SforceService is simply in a namespace you don't expect.