Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

WCF and Http (s) framework

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

New project-other project types-Visual Studio solution-blank solution-named WcfHTTP (S)-identify

Select the solution right-click-add-New Project-WCF---WCF Service Library, and name it WcfLibrary--.

Delete Iservice1.cs and Service1.cs files

Add a LoginService.cs class

Right-click on the selected solution-- add-- create a project-- select the WCF service application-- name it WcfService--.

Delete Iservice.cs and Service1.svc files as well

Add interface ILoginService.cs

Add a reference to WcfService for WcfLibrary. After adding a reference, add using WcfService;, to inherit the ILoginservice interface in the LoginService class and add using WcfService

Select the solution right-click-add-New Project-Windows--- console Application-name WcfForm

Add references to WcfLibrary and WcfService

Add System.ServiceModel and System.ServiceModel.Web and System.Configuration to the assembly-framework, as well as System.Runtime.Serialization references

If it is https, modify the certificate name.

Configure it in the configuration file

Select WcfForm right-click-generate (get the assembly from the Debug folder if it is in Debug mode and from release if it is release)

Select WcfForm right-click-- Open the folder in File Explorer-bin--debug, select all the files inside, copy to the server, double-click to open WcfForm.exe to open the console, and then you can use the

Get data in https://trdy.com/Login/GetData?str=21321 form

If it is http, then get the data in http://123.23.123.167:8085/Login/GetData?str=21321 form.

Documentation links for https referenc

Wcf getting started tutorial

Http://www.cnblogs.com/iamlilinfeng/archive/2012/09/25/2700049.html

Jiang Jinnan

[WCF Security Series] example demonstration: application of TLS/SSL in WCF [HTTPS]

Http://www.cnblogs.com/artech/archive/2011/06/02/Authentication_042.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report