0
votes

I'm trying to consume WCF service using asp.net2.0

Here are some details:

1) WCF service hosted on different server IIS

URL : http://myserver/Service.svc

2) Web.config

3) asp.net page

4) myjs.js

MYNameSpace.IService.MyMethod();

*** here it throws error that 'MyNameSpace' is not defined.

Everything works fine on my local machine. Problem when I try to consume from asp.net2.0 application

Any inputs will be truly appreciated.

Thanks in advance

1

1 Answers

0
votes

WCF was introduced in .net 3.0.

In order to consume a WCF service in .net 2.0 you need to do the following:

  • Expose the service with basichttpbinding, this is a basic web service
  • Use add web reference from the .net 2.0 application.