websync in my service was working properly, but after some changes it stop working, its not giving me any error message and all seems fine to me. but there must be some issue. i created the test page on my website but not working in that too. i am posting here that code please look and suggest.
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; }
}
}
I solve the issue. actually websync does not allow publishing from outside the application, so when i call publish method from the window service it does not work, so we need to add this tag in the web config file
this will give permission to website to be published from outside