Hello Rhyeca,
The first snippet won't work because your
web.config doesn't provide an endpoint address for your WCF service.
I'm not exactly sure why the second snippet won't work, although in general it's not a good idea to access a WCF service using
WebClient. Instead, for a declarative approach use a service reference in your client project (this is likely what you already did to make your first snippet work), or for a programmatic approach use
ChannelFactory or for RESTful web services use
HttpClient.
First make sure the service is running by browsing to
http://localhost/Service1.svc. This should give you a basic WCF page that links to service descriptors. If it is running, add the endpoint to your
web.config:
Let us know if this solves your problem. If not, remove all configuration related to the web service from your client project, and try to add a new service reference through Visual Studio's service reference wizard.