0% found this document useful (0 votes)
2 views13 pages

MS WS Practical 10

This document outlines a practical exercise for creating a WCF Service Library project named 'SampleCalcSvc' in Microsoft Visual Studio. It provides step-by-step instructions for setting up the service, including creating interfaces and classes, configuring endpoints, and enabling service debugging. The final steps involve saving and running the project to demonstrate the binding attribute of an endpoint element in WCF.

Uploaded by

shijingeorge3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views13 pages

MS WS Practical 10

This document outlines a practical exercise for creating a WCF Service Library project named 'SampleCalcSvc' in Microsoft Visual Studio. It provides step-by-step instructions for setting up the service, including creating interfaces and classes, configuring endpoints, and enabling service debugging. The final steps involve saving and running the project to demonstrate the binding attribute of an endpoint element in WCF.

Uploaded by

shijingeorge3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Computer Science(Web Services) 2024-25

Practical 10
Aim:-Demonstrates using the binding attribute of an endpoint element in WCF.

Step 1:-
Open Microsoft visual studio → select create a new project

Step 2:-
Select WCF Service Library → click on Next.

Mansi Singh(Roll no.76)


1
Computer Science(Web Services) 2024-25

Step 3:-
Give the project name ‘SampleCalcSvc’ → click on create.

Step 4:-
Delete IService1.cs and Service.svc from solution explorer.

Mansi Singh(Roll no.76)


2
Computer Science(Web Services) 2024-25

Step 5:-

Go to app.config (from solution explorer)and delete the selected code.

Mansi Singh(Roll no.76)


3
Computer Science(Web Services) 2024-25

Step 6:-

Right click on SampleCalcSvc from solution explorer →add →new item →interface
→give name ICalcService.cs

Step 7:-
write code in ICalcService.cs

Mansi Singh(Roll no.76)


4
Computer Science(Web Services) 2024-25

Step 8:-

Right click on SampleCalcSvc from solution explorer →add →new item →class
→give name CalcService.cs

Step 9:-
write code CalcService.cs

Mansi Singh(Roll no.76)


5
Computer Science(Web Services) 2024-25

Step 10:-
Right click on SampleCalcSvc from solution explorer →build

Step 11:-

Right click on App.config from solution explorer →Edit Wcf Configuration

Step 12:-

select create new service select Browse →bin →debug →SampleCalcSvc.dll


→SampleCalcSvc. CalcService

Mansi Singh(Roll no.76)


6
Computer Science(Web Services) 2024-25

Step 13:-

Select Browse.

Step 14:-

Bin →Debug →SampleCalcSvc.dll →SampleCalcSvc. CalcService → Click next

Mansi Singh(Roll no.76)


7
Computer Science(Web Services) 2024-25

Step 15:-

Select TCP

Step 16:-

Empty the text box----click Next → click Yes

Mansi Singh(Roll no.76)


8
Computer Science(Web Services) 2024-25

Step 17:-

Click on Finish

Step 18:-

Give name as SampleCalcSvcNetTcpEndpoint

Mansi Singh(Roll no.76)


9
Computer Science(Web Services) 2024-25

Step 19:-

Right click on Endpoints→select New Service Endpoints → give name as shown


below.

Step 20:-

Select host →new button → enter base address net.tcp://localhost:8080/SampleSvc


→ ok.

Mansi Singh(Roll no.76)


10
Computer Science(Web Services) 2024-25

Step 21:-

Click advanced →right click service behaviour →new service behaviour configuration

Step 22:-

Click add button → Select the shown option and Click add

Mansi Singh(Roll no.76)


11
Computer Science(Web Services) 2024-25

Step 23:-

Select service debug → make the selected option from false to true.

Mansi Singh(Roll no.76)


12
Computer Science(Web Services) 2024-25

Step 24:-

Click on SampleCalcSvc.CalcService and select the option as shown below.

Step 25:-

Save the file→Save the project and run

Mansi Singh(Roll no.76)


13

You might also like