Hi.. I am using PollingDuplexBindingElement . From the usage of this class, i am getting three exceptions. Kindly guide me what should i do to run my application. i ma using .Netframework4.0 ==============code behind===================== using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System.ServiceModel.Channels; using System.Configuration; namespace LiveChatService { public class LiveChatServiceHost : ServiceHost { public LiveChatServiceHost(params System.Uri[] addresses) { base.InitializeDescription(typeof(LiveChatService),new UriSchemeKeyedCollection(addresses)); } protected override void InitializeRuntime() { string pollTimeout = ConfigurationManager.AppSettings["PollTimeout"]; string inactivityTimeout = ConfigurationManager.AppSettings["InactivityTimeout"]; PollingDuplexBindingElement pdbe = new PollingDuplexBindingElement() { ClientPollTimeout = TimeSpan.Parse(pollTimeout), InactivityTimeout = TimeSpan.Parse(inactivityTimeout) }; AddServiceEndpoint(typeof(ILiveChatService), new CustomBinding( pdbe, new TextMessageEncodingBindingElement(MessageVersion.Soap11,System.Text.Encoding.UTF8), new HttpsTransportBindingElement()),""); base.InitializeRuntime(); } } } ==========================Exception============================Error 3 Argument 1: cannot convert from 'System.ServiceModel.Channels.PollingDuplexBindingElement' to 'System.ServiceModel.Channels.BindingElement' E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 77 LiveChatService Error 2 The best overloaded method match for 'System.ServiceModel.Channels.CustomBinding.CustomBinding(params System.ServiceModel.Channels.BindingElement[])' has some invalid arguments E:\facebook chat\SilverlightApplication1\LiveChatService\LiveChatServiceHost.cs 31 58 LiveChatService Error 1 The type 'System.ServiceModel.Channels.BindingElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. E:\facebook chat\SilverlightApplication1\LiveChatService\Liv
maifs
Posts
-
PollingDuplexBindingElement -- Exceptions -
getting specific string error? [modified]i want to fetch the characters from file for example : 1st example: // mehmood// hello ,how r u? just within comments and replace it to all caps 2nd example: /* hi mehmood ahmed */ i want to fetch the characters within sigle line comment and multi line comments . just within comments not outside the comment. -------------------------------------------------------------------------------- i am trying this code, kindly correct my code:
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
StreamReader sr = new StreamReader(fs); int countComment=0; while(sr.Peek() >= 0 ) { str =sr.ReadLine(); strTemp = new char\[str.Length\]; #region From String method int count=0; for (int i = 0; i < str.Length; i++) { if (str\[i\] == '/') { ++countComment; count=i; } if (char.IsLetterOrDigit(str,count+1) && countComment==2) { strTemp2 += str.Substring(count+1).ToUpper(); } } #endregion countComment = 0; this.textBox2.Text += strTemp2 + Environment.NewLine; ; this.textBox1.Text += str + Environment.NewLine; } sr.Close(); fs.Close();
it generates an exception : System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index
Maifs
modified on Monday, July 13, 2009 5:08 PM
-
image stroing problem from the class propertythx
Maifs
-
image stroing problem from the class propertyis there no one which can reply me?
Maifs
-
image stroing problem from the class propertyok but if can reply my post then do it.
Maifs
-
image stroing problem from the class propertywhat you mean?
Maifs
-
image stroing problem from the class propertybut i dont have to save in grid view. i want to keep it in separate for single person
Maifs
-
image stroing problem from the class propertyi am trying to store a image in sqlserver database, but doesnt effect. help me. public class Item { private int code; private string name; private float price; private Category category; private byte[] photo; public Item() { } public Item(int code, string name) { this.Code = code; this.Name = name; } public Item(int code, string name, float price) : this(code,name) { this.Price = price; } public int Code { get { return this.code; } set { this.code = value; } } public string Name { get { return this.name; } set { this.name = value; } } public float Price { get { return this.price; } set { this.price = value; } } public Category Category { get { return this.category; } set { this.category = value; } } public byte[] Photo { get { return this.photo; } set { this.photo = value; } } } public class ItemsDAL { private string selectItemByCode = "Select * from ItemsWithCategory where code=@code"; private string selectAllItems = "Select * from ItemWithCategory"; // View private string insertItem = "InsertImage"; public void InserItem(Item pic) { SqlConnection con = new SqlConnection(DALHelper.ConnectionString); SqlCommand cmd = new SqlCommand(this.insertItem,con); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = this.insertItem; cmd.Parameters.Add(new SqlParameter("@photo", pic.Photo)); con.Open(); try { cmd.Parameters["@photo"].Value = pic.Photo; cmd.ExecuteNonQuery(); } finally {
-
printing problem?can you tell me that which type of quesiotns have to be asked here? its a realy so pythetic answer.
Maifs
-
printing problem?i have to Make a GridView with print option (Inherit the GridView control and add a print method). The print button should print all the rows in the gridview. There should an option to print no of rows perpage. . i have to use GDI printing APIs for printing.
Maifs
-
how can i copy a file to somewhere in my hard disk?hi man read first one ansers to search from googles.this is not a place of doing such questions. read that articles in my replies then you can find your anser. thry this one. System.IO.File.Copy("C:\\abc.txt", "D:\\abc.txt"); and make sure the file is exist on c drive, if not then create a text file named abc and save on c drive.
Maifs
-
how can i copy a file to somewhere in my hard disk?thx dear
Maifs
-
how can i copy a file to somewhere in my hard disk?no, i didnt find it, thx
Maifs
-
how can i copy a file to somewhere in my hard disk?thx budy, its working
Maifs
-
how can i copy a file to somewhere in my hard disk?i want to copy a file from a location to some specific location in c#?
-
simple example of asp.net page using controlany understandble thing which is enough for understanding me. in simple words , i want a simple example of asp.net(using c#) with some control. --------------------------------------------------------------------------------
Maifs
-
simple example of asp.net page using controlany understandble thing which is enough for understanding me. in simple words , i want a simple example of asp.net(using c#) with some control. --------------------------------------------------------------------------------
-
how can i make an enterprize application ?thx
Maifs
-
how can i make an enterprize application ?actually i m trying to make such an application which is distributed on different computers over a network, i want that database should be on one computer ,all users can access it from there. but different users have different rights . for exmple : an organizaion having many departments like Accounts, Finance,HR,Sale,IT and so on. now different users are available. like HR manager doing some different task and Accounts manager doing differnt. different departments are join together through networking . how can i doing this?
Maifs
-
Zoom problem with a picture within picturebox.?thx
Maifs