Add service
This commit is contained in:
parent
04d9075351
commit
0e49d0d6ad
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together.
|
||||
[ServiceContract]
|
||||
public interface IService
|
||||
{
|
||||
[OperationContract]
|
||||
void DoWork();
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<%@ ServiceHost Language="C#" Debug="true" Service="Server.Service" CodeBehind="Service.svc.cs" %>
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service" in code, svc and config file together.
|
||||
// NOTE: In order to launch WCF Test Client for testing this service, please select Service.svc or Service.svc.cs at the Solution Explorer and start debugging.
|
||||
public class Service : IService
|
||||
{
|
||||
public void DoWork()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
|
@ -20,4 +20,16 @@
|
|||
</compilers>
|
||||
</system.codedom>
|
||||
|
||||
<system.serviceModel>
|
||||
<behaviors>
|
||||
<serviceBehaviors>
|
||||
<behavior name="">
|
||||
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
|
||||
<serviceDebug includeExceptionDetailInFaults="false" />
|
||||
</behavior>
|
||||
</serviceBehaviors>
|
||||
</behaviors>
|
||||
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
|
||||
multipleSiteBindingsEnabled="true" />
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in New Issue