Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:19:54+00:00 2026-06-11T22:19:54+00:00

I have a wcf service with the following web.config in the server. <?xml version=1.0

  • 0

I have a wcf service with the following web.config in the server.

    <?xml version="1.0" encoding="utf-8"?>   
    <configuration>
    <connectionStrings>
    <add name="myconnection" connectionString="myconnectionstr"/>
   </connectionStrings>
    <system.serviceModel>
          <services>
             <service behaviorConfiguration="PSWebServis.PServisBehavior" name="PSWebServis.PServis">
                     <endpoint address="" binding="wsHttpBinding" contract="PSWebServis.IPServis" />  
                 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
                 <host>
                      <baseAddresses>
                           <add baseAddress="http://localhost:8000/" />  
                </baseAddresses>  
            </host>  
        </service> 
    </services>  
       <behaviors>
           <serviceBehaviors>       
               <behavior name="PSWebServis.PServisBehavior">
                       <serviceMetadata httpGetEnabled="true" /> 
                   <serviceDebug includeExceptionDetailInFaults="false" /> 
            </behavior>  
        </serviceBehaviors> 
    </behaviors>
</system.serviceModel>

and this is related part in web.config in client.

  <system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_IPServis" />
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="http://sunucu:8000/PServis.svc" binding="wsHttpBinding"
    bindingConfiguration="WSHttpBinding_IPServis" contract="PSWebServis.IPServis"
    name="WSHttpBinding_IPServis">
    <identity>
      <servicePrincipalName value="host/SUNUCU" />
    </identity>
  </endpoint>
</client>

Here is a part of my interface in the service

[ServiceContract]
public interface IPServis
{
    [OperationContract]
    string InsertMusteri(MusterilerModel musteri);
}

and related part in service class.

public class PServis : IPServis
{
    public string InsertMusteri(MusterilerModel musteri)
    {
        if (musteri != null)
        {

            DataTable dtSonuc = new DataTable();
            SqlCommand command = new SqlCommand("InsertMusteriModel", connection);
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.AddWithValue("@musteriTablo", musteri.KayitTablosu);
            command.Parameters.AddWithValue("@telefonTablo", musteri.TelefonKayit);
            command.Parameters.AddWithValue("@adresTablo", musteri.AdresKayit);
            connection.Open();
            command.ExecuteNonQuery();
            SqlDataAdapter adapter = new SqlDataAdapter(command);

            adapter.Fill(dtSonuc);
            connection.Close();

            return dtSonuc.Rows[0]["IslemDurum"].ToString();
        }

        return "Başarısız";
    }
 }

My MusterilerModel class:

[DataContract]
public class MusterilerModel
{
    [DataMember(Order=0)]
    public int MusteriID { set; get; }

    [DataMember(Order = 1)]
    public string Ad { set; get; }

    [DataMember(Order = 2)]
    public string Soyad { set; get; }

    [DataMember(Order=3)]
    public string KullaniciAdi { set; get; }

    [DataMember(Order = 4)]
    public string Email { set; get; }

    [DataMember(Order = 5)]
    public DateTime DogumTarihi { set; get; }

    [DataMember(Order=6)]
    public string GrupAdi { set; get; }

    [DataMember(Order=7)]
    public int Renk { set; get; }

    [DataMember(Order=8)]
    public decimal Bakiye { set; get; }

    [DataMember(Order=9)]
    public string Adres { set; get; }

    [DataMember(Order=10)]
    public string AdresAciklamasi { set; get; }

    [DataMember(Order=11)]
    public string Firma { set; get; }

    [DataMember(Order=12)]
    public string VergiDairesi { set; get; }

    [DataMember(Order=13)]
    public string VergiNo { set; get; }

    [DataMember(Order=14)]
    public int BayiID { set; get; }

    [DataMember(Order=15)]
    public string Il { set; get; }

    [DataMember(Order = 16)]
    public string Ilce { set; get; }

    [DataMember(Order = 17)]
    public decimal YemekPara { get; set; }

    [DataMember(Order=18)]
    public string Sifre { set; get; }

    [DataMember(Order=19)]
    public int GrupID { set; get; }

    [DataMember(Order=20)]
    public string BayiAdi { set; get; }

    [DataMember(Order=21)]
    public int SehirID { set; get; }

    [DataMember(Order=22)]
    public int IlceID { set; get; }

    [DataMember(Order=23)]
    public DateTime EvlilikYilDonumu { set; get; }

    [DataMember(Order=24)]
    public DateTime KayitTarihi { set; get; }

    [DataMember(Order=25)]
    public string KayitEdenPersonel { set; get; }

    [DataMember(Order=26)]
    public int KayitEdenPersonelID { set; get; }

    [DataMember(Order=27)]
    public bool AktifMi { set; get; }

    [DataMember(Order=28)]
    public string Aciklama { set; get; }

    [DataMember(Order=29)]
    public string OzelKod { set; get; }

    [DataMember(Order=30)]
    public int SatisID { set; get; }

    [DataMember(Order=31)]
    public DataTable KayitTablosu { set; get; }
    [DataMember(Order=32)]
    public DataTable TelefonKayit { set; get; }
    [DataMember(Order=33)]
    public DataTable AdresKayit { set; get; }
 }

When i try to use InsertMusteri method, there are 2 records in the database. As you see, i put my information into datatable and send it to the service. I checked, if datatable has more than 1 value but that was not the problem. I don’t know where is the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:19:56+00:00Added an answer on June 11, 2026 at 10:19 pm

    Comment this line

    command.ExecuteNonQuery();
    

    And check if it’s work properly.
    I think “Fill” command executs your command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a the following server side app.config for a WCF service: <system.serviceModel> <bindings>
I have a WCF service hooked up with a UserNamePasswordValidator through my web.config, no
I have the following web service created and using the latest version of jquery
I have been following a couple of articles regarding RESTful web services with WCF
I have a WCF Service with the following requirements: a) The client requests a
Given that I have the following WCF service: class LookUpService { public List<County> GetCounties(string
I have a WCF service, hosted in IIS returning the following error (when trying
Greetings, I have to following problem. I have a WCF Service which runs under
I have the following data model: I am writing a WCF service that needs
I have following method in wcf webenabled service Public Person AddPerson(Person p); As of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.