Full width home advertisement

Post Page Advertisement [Top]




AIF Services In few steps.




Today we learn how to create AIF service

Step 1
Create Table with two fields
Name
Phone

Screenshot reference:





Step 2
Create Two classes
Student Contract & Student Service

Screenshot reference:




Step 3
Open Student Contract  Class Defines Variable and Create Get Set Method

Screenshot reference:







Step 4
Open Student Service Class

Screenshot reference:



Create Two Method
Insert Student

Screenshot reference:



Get Student

Screenshot reference:




Step 5
Set your Student Service Class Run On server

Screenshot reference:




Step 6
Right Click on your project root node and select Service from the Sub menu

Screenshot reference:




Step 7
Set the class reference on service properties

Screenshot reference:




Step 8
Then Expend the Service and right click on operation and select Add Operation

Screenshot reference:


Step 9
A window will appear now select the method you want to expose to client in my case i am going to select both method

Screenshot reference:



Step 10
Right click on your project and Add service group

Screenshot reference:




Step 11
Now drag and drop your service into service group and compile the complete project. after compile right click on service group and deploy the service group. below window will with deploy result

Screenshot reference:





Step 12
System administration/Area page. 

Screenshot reference:



From the below screen you can find the your service External URL

Screenshot reference:





How to Test Service

Step 1
Open Visual Studio
Create a Console application
Step 2
Add Service Reference
Screenshot reference:






Step 3
Add following Code
Screenshot reference:




Step 4
Run Application. Hope application will working fine if you follow every step properly. :)

Screenshot reference:

Please feel free to contact me if you are facing any issue during implementation of this blog.

Tidak ada komentar:

Posting Komentar

Bottom Ad [Post Page]