开发者

Wcf ajax in n-tier ajax website

开发者 https://www.devze.com 2023-02-18 15:57 出处:网络
I am working on an n-tier web project, The data access layer is in a project, and the website is in another separate project with reference to the data access layer project.

I am working on an n-tier web project, The data access layer is in a project, and the website is in another separate project with reference to the data access layer project.

Now I want to create a wcf service to be able to transfer data from the data access layer to the website.

I added the wcf service in the data access layer.

And addedd a web service reference to the wcf service in the website.

Note: I need to access these wcf services using ajax/jquery from my website.

Now how my jquery code will access this service to get and post data from/to this service? should I put the .svc file in the website an开发者_StackOverflowd use ajax script manager?

Are there any tutorials tells how to use wcf in n-tier ajax websites?


There is another post on same topic: How Do I call A WCF Web Service from jQuery?

One suggestion I would like to give here is that don't add wcf service in the data access layer instead create a seperate project for WCF service and add the reference to Data Access Layer in there. You Web application will not access or referene the Data Access Directly. All the calls will be through the WCF Service.

0

精彩评论

暂无评论...
验证码 换一张
取 消