1

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; }
        }
    }
Vijay Rana
  • 31
  • 2
  • How can we possibly help with this? There's no where near enough information here. Also, if you "changed something and now it doesn't work".. all the more reason to get used to the many MANY free source control options out there now (for ~5 user teams). – Simon Whitehead Jun 19 '13 at 05:40
  • yes but the above code is enough to publish data using websync dll's. – Vijay Rana Jun 19 '13 at 05:44

1 Answers1

1

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

<configuration>
  <WebSync>
    <server httpDirectPublish="true" timeout="25000" reconnectInterval="250" distributeInterval="100" latencyBuffer="7000" heartbeatInterval="30000" />
  </WebSync>
</configuration>

this will give permission to website to be published from outside

Vijay Rana
  • 31
  • 2