19 Kasım 2018 Pazartesi

Visual Studio- Hata : the underlying connection was closed an unexpected error occurred on a send and (407) Proxy Authentication Required.

Güvenli bir ağ üzerinden proxy yetkilendirmeli bir ağdan dış servise bağlanma sırasında alınan hata cözümü :

app.config eklen

<system.net>
    <defaultProxy useDefaultCredentials="true" >
    </defaultProxy>
</system.net>

Clinet Kullanmadan önce aşağıdaki kodu uygun bir yere yerleştirin . TLS 1.2 için 
            System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)3072;

If you are stuck with .Net 4.0 and the target site is using TLS 1.2, you need the following line instead. ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

1 Ekim 2018 Pazartesi

javascript ile dropdown secimine göre alan gösterimi


@Html.DropDownList("optionId", new SelectList(SelectListData), "Select an option")

@Html.TextBox("controlId")
<script>
  $("#optionId").on("change", function () {
    if ($("#optionId option:selected").index() == 0) {
      $("#controlId").hide();
    } else {
      $("#controlId").show();
    }
  });
</script>

25 Temmuz 2018 Çarşamba

Devexpress WPF : loading decorator change content

<dx:LoadingDecorator Name="ld" SplashScreenDataContext="{Binding}">
    <dx:LoadingDecorator.SplashScreenTemplate>
        <DataTemplate>
            <dx:WaitIndicator DeferedVisibility="True" Content="{Binding SomeProperty}"/>
        </DataTemplate>
    </dx:LoadingDecorator.SplashScreenTemplate>
...

28 Mayıs 2018 Pazartesi

Işlem başka bir işlem tarafından kullanıldığından dosyasına erişemiyor Hatası ve Çözümü


using (System.IO.FileStream file = new System.IO.FileStream(path, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite))
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(file))
                    {
                        // Read the stream to a string, and write the string to the console.
                        string not = sr.ReadToEnd();
                    }