REST Service as a separate layer

Posted by Shanpricol under WCF on 6/7/2011 | Points: 10 | Views : 1250 | Status : [Member] | Replies : 2
Hi,

I am using VS 2008, wcf rest service, jquery.
I am able to access the rest url if I have the svc file in the same project.
If I add the rest service in separate project I am unable to access the rest url in jquery.
Should I configure something in IIS.




Responses

Posted by: Gsolvers on: 6/7/2011 [Member] Starter | Points: 25

Up
0
Down
What is the error you are getting? Can you send the screen shot?

Best Regards,

VG
www.TeacherJi.com

Shanpricol, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanpricol on: 6/8/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

I have attached the sample code.
In the HTMLpage1.htm

In GetDataPoints function,if I call the rest service with this url 'http://localhost:1984/GreenViewService.svc/?callback=';
it is working fine.Here the svc file is in the same project both the port number are same.
Instead if call the rest URL with the different port number where the svc is added as a separate project
'http://localhost:1947/GreenViewService.svc/?callback='; I am unable to call the method written in rest service.

Note:
If I give the URL in browser it is working.




 Download source file

Shanpricol, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response