【发布时间】:2018-08-23 03:13:29
【问题描述】:
我是网络服务领域的新手。我只是在使用教程编写一个简单的服务。 MyService.cs 的代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestService
{
class MyService : IMyService
{
public string GetData()
{
return "iamchiragsharma.website2.me";
}
}
}
对于 IMyService.cs 是:
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace TestService
{
[ServiceContract]
interface IMyService
{
[OperationContract]
string GetData();
}
}
我尝试过使用HTTP注册检查方法,甚至删除并重新创建了端口,但没有任何帮助。
我想知道这个错误的原因和解决方法? 任何形式的帮助将不胜感激。谢谢。
【问题讨论】:
标签: asp.net web-services wcf ssl