Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

maifs

@maifs
About
Posts
49
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PollingDuplexBindingElement -- Exceptions
    M maifs

    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

    WCF and WF csharp linq regex help tutorial

  • getting specific string error? [modified]
    M maifs

    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

    C# database help tutorial question workspace

  • image stroing problem from the class property
    M maifs

    thx

    Maifs

    C# help database

  • image stroing problem from the class property
    M maifs

    is there no one which can reply me?

    Maifs

    C# help database

  • image stroing problem from the class property
    M maifs

    ok but if can reply my post then do it.

    Maifs

    C# help database

  • image stroing problem from the class property
    M maifs

    what you mean?

    Maifs

    C# help database

  • image stroing problem from the class property
    M maifs

    but i dont have to save in grid view. i want to keep it in separate for single person

    Maifs

    C# help database

  • image stroing problem from the class property
    M maifs

    i 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 {

    C# help database

  • printing problem?
    M maifs

    can you tell me that which type of quesiotns have to be asked here? its a realy so pythetic answer.

    Maifs

    C# graphics help question

  • printing problem?
    M maifs

    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

    C# graphics help question

  • how can i copy a file to somewhere in my hard disk?
    M maifs

    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

    C# question csharp

  • how can i copy a file to somewhere in my hard disk?
    M maifs

    thx dear

    Maifs

    C# question csharp

  • how can i copy a file to somewhere in my hard disk?
    M maifs

    no, i didnt find it, thx

    Maifs

    C# question csharp

  • how can i copy a file to somewhere in my hard disk?
    M maifs

    thx budy, its working

    Maifs

    C# question csharp

  • how can i copy a file to somewhere in my hard disk?
    M maifs

    i want to copy a file from a location to some specific location in c#?

    C# question csharp

  • simple example of asp.net page using control
    M maifs

    any 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

    C# csharp asp-net tutorial

  • simple example of asp.net page using control
    M maifs

    any understandble thing which is enough for understanding me. in simple words , i want a simple example of asp.net(using c#) with some control. --------------------------------------------------------------------------------

    C# csharp asp-net tutorial

  • how can i make an enterprize application ?
    M maifs

    thx

    Maifs

    C# question database sysadmin

  • how can i make an enterprize application ?
    M maifs

    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

    C# question database sysadmin

  • Zoom problem with a picture within picturebox.?
    M maifs

    thx

    Maifs

    C# question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups