我的服务中的 websync 工作正常,但经过一些更改后它停止工作,它没有给我任何错误消息,对我来说一切都很好。但一定有一些问题。我在我的网站上创建了测试页面,但也没有在其中工作。我在这里发布该代码,请查看并提出建议。
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Publisher publisher = new Publisher(new PublisherArgs() { RequestUrl = "http://www.ffrsdevserver.com/request.ashx" });
Data entity = new Data();
entity.DeptID = 1.ToString();
entity.StationId = "108";
entity.Text = "UpdateAll";
publisher.Publish(new Publication()
{
Channel = "/3db165bf2f25",
DataJson = JSON.Serialize(entity)
});
}
}
[DataContract]
public class Data
{
private string text = string.Empty;
private string deptId = string.Empty;
private string dataType = string.Empty;
private string stationId = string.Empty;
[DataMember(Name = "text")]
public string Text
{
get { return text; }
set { text = value; }
}
[DataMember(Name = "deptId")]
public string DeptID
{
get { return deptId; }
set { deptId = value; }
}
[DataMember(Name = "stationId")]
public string StationId
{
get { return stationId; }
set { stationId = value; }
}
}