How To deploy web service?
There is nothing special in deploying web service. We can do the same way as we deploy any website. Just copy the Web Service folder inside inetpub and make it virtual directory. Now you can access this web service from any where. If you don't want to give source code you can publish it as well as we do for Website.
We can call this web service using http://ip address/WebSite1/Service.asmx
How to Access web service?
Right click on solution explorer
Click on Add Web Reference a window will open as below
Paste the URL(sample : http://ip address/Website1/Service.asmx) in URL box.Afterwords click on Go button.
After this next window will open click on Add Reference button. And you have finished. Your web service success fully added in your project now you can use it.
like:
private void button1_Click(object sender, EventArgs e)
{
localhost.Service objWebSrv = new localhost.Service();
MessageBox.Show(objWebSrv.HelloWorld());
}
Subscribe to:
Post Comments (Atom)
Followers
Link
Labels
Agille
(3)
Angular 2
(96)
Architecture
(7)
ASP .Net
(30)
C#/VB .Net
(161)
Entityframework
(11)
General
(33)
Git
(2)
Hosting
(2)
HTML
(4)
Interview
(12)
Interview-Agile
(1)
Interview-Angular
(25)
Interview-ASP .Net
(3)
Interview-C#
(16)
Interview-JavaScript
(1)
Interview-MVC
(30)
Interview-SQL Server
(4)
Interview-WCF
(2)
Islam
(6)
Java Script
(37)
JQuery
(1)
MVC
(53)
NodeJS
(1)
Puzzles
(1)
React-Native
(3)
Security
(1)
Shayri
(10)
SQL Server
(41)
VC++
(5)
WCF
(21)
Web API
(27)
WPF
(21)
No comments:
Post a Comment