IIS de bir ASP.NET hatası

1 Eki 2013 In: .net, ipucu

 

 Hata bu:

The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

 

Çözüm : 

Sunucuda çalışan Asp.Net versiyonuna ait klasörde  Ör : C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

 aspnet_regiis -ga "NT Authority\Network Service"

veya

 aspnet_regiis -ga IUSR_<machinename>

 

Bitti gitti... 

Türkçe Karakter Temizle

3 Oca 2013 In: ipucu

Turkce karakter temizle

depublic string toTRK(string text)

        {

            text = text.Replace("İ", "\u0130");

            text = text.Replace("ı", "\u0131");

            text = text.Replace("Ş", "\u015e");

            text = text.Replace("ş", "\u015f");

            text = text.Replace("Ğ", "\u011e");

            text = text.Replace("ğ", "\u011f");

            text = text.Replace("Ö", "\u00d6");

            text = text.Replace("ö", "\u00f6");

            text = text.Replace("ç", "\u00e7");

            text = text.Replace("Ç", "\u00c7");

            text = text.Replace("ü", "\u00fc");

            text = text.Replace("Ü", "\u00dc");

            return text;

        }

 

        public string toTRK2(string text)

        {

            text = text.Replace("İ", "I");

            text = text.Replace("ı", "i");

            text = text.Replace("Ş", "S");

            text = text.Replace("ş", "s");

            text = text.Replace("Ğ", "G");

            text = text.Replace("ğ", "g");

            text = text.Replace("Ö", "O");

            text = text.Replace("ö", "o");

            text = text.Replace("ç", "c");

            text = text.Replace("Ç", "C");

            text = text.Replace("ü", "u");

            text = text.Replace("Ü", "U");

            return text;

        }

    }

 

 

public string toURLReq(string text)
{
text = text.Replace("İ", "I");
text = text.Replace("ı", "i");
text = text.Replace("Ş", "S");
text = text.Replace("ş", "s");
text = text.Replace("Ğ", "G");
text = text.Replace("ğ", "g");
text = text.Replace("Ö", "O");
text = text.Replace("ö", "o");
text = text.Replace("ç", "c");
text = text.Replace("Ç", "C");
text = text.Replace("ü", "u");
text = text.Replace("Ü", "U");
Regex rgx = new Regex("[^a-zA-Z0-9 -]");
text = rgx.Replace(text, "");
text = System.Web.HttpUtility.UrlEncode(text);
return text;
}

PC'nizde MPI ile Paralel Programlama

23 Ara 2012 In: ipucu

Kuracaklarımız sırasıyla : 

 1. VS2008 veya VS2010, Visual C++ modülü kurulu olmalı, yoksa yeniden VS kurulum setup'anı çalıştırp ekleye bilirsiniz.

 2. HPC Pack 2008 R2 Client Utilities Redis Package with SP4  indirip kurun

 3. HPC Pack 2008 R2 SDK with SP4 indirip kurunuz 

 4. HPC Pack 2008 R2 MS-MPI Redist Pack with SP4 kuruyoruz aynen 

 5. VS2010 için MPI Project Template ihtiyaç duraysanız eger (ben VS2008 kullanıdıgm için kurmadım)

 6. VS2008 veya VS2010 u açıyoruz  New Project >  Visual C++ > Win32 > Win32 Console Application > Proje_adiyaz

 7. "Console Application" > "Pre Comp. Head"=kaldırıyoruz > "Finish"

 8. Projeye sağ tıkla "Property Pages"
"Conf Prop" > "C/C++" > "Additional Include Directories" = "C:\Program Files\Microsoft HPC Pack 2008 R2\Inc"
"Conf Prop" > "Linker" > "Additional Library Directories" = "C:\Program Files\Microsoft HPC Pack 2008 R2\Lib\i386"
"Conf Prop" > "Linker" > "Input" > "Additional Dependencies"= "msmpi.lib" 
Detay burada var 

 9. Kod blogunu şu şekilde değiştirin : 

#include<iostream>
#include<mpi.h>

using namespace std;

int main(int argc, char** argv){

    int mynode, totalnodes;

    MPI_Init(&argc, &argv); 
    MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);
    MPI_Comm_rank(MPI_COMM_WORLD, &mynode);

    //buda olur
    //printf("Hello world from process %d of %d ", mynode, totalnodes);
    cout << "Hello world from process " << mynode;
    cout << " of " << totalnodes << endl;

    MPI_Finalize();
    //ekran beklesin diye, programı sonlandırmak için VS de DEBUG da STOP diyoruz
    cin.get();
    return 0;
}

10. F5 deyin her şey yolunda ise  "cmd" yapıp "mpiexec –n 10 Test01.exe" deneyebilirsiniz.

Resimli anlatım lazım derseniz burada bir tane buldum, bir tanede bu var.

Kolay gelsin size MPI ile paralel programlamada, Vi editor ve hiç baglanamadıgım VPN le ugrasmaktan iyidir.

 Not : Her seferinde CMD ile oynamayayım dersen :

Yine projeye sag tıklıyoruz "Properties" > "Debugging" > Command"="C:\Program Files\Microsoft HPC Pack 2008 R2\Bin\mpiexec.exe"
"Command Argument" > "-n 4 "$(TargetPath)""

 Silent repair on 64 bit computer with .Net Framework version 4.0.30319 :

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –i
 
 
 
 

Eger distinct ile aldıgınız bir kolon var ve siz bunu aynı tabloda diger başka bir kolona göre sıralı yani order by şeklinde almak istiyorsanız gereken sorgu bu

 

SELECT DISTINCT HesapKodu, MAX(FisNo) AS FisNosu
FROM            GunSonu
GROUP BY HesapKodu
ORDER BY  FisNosu , HesapKodu

HTC HD2 ye Android 4 kurulumu

18 Ağu 2012 In: ipucu

Aşagıdaki aşama aşama anlatımla sıfırdan kurabilirsiniz. Yani Windows Mobile dan bile kolayca kurabilirsiniz. Oldukca sade ve denenmiş bir yöntemdir. Benim ROM olarak tercihim ICE CREAM SANDWICH yani 4.0.4 oldu (NexusHD2-ICS-4.0.4-CM9-HWA V2.6 (Kernel: tytung_HWA_r3.4))

 

Kurulum;

NOT : ROM kurmak tehlikeli bir iştir. Yeterli bilgi sahibi olmadan denemeyiniz! Aksi taktirde telefonunuz kullanım dışı kalabilir. 

Gerekli Programlar,

1. Radio ROM 2.15.50.14;

Radio_Leo_2.15.50.14.rar indirin ve masaüstünde bir klasöre açın.

2. HD2 Toolkit 4.2.0.1;

HD2 Toolkit 4.2.0.1 indirin ve bilgisayarınıza kurun.

3. Kurulacak ROMu indirim

[12 Ağustos 2012] NexusHD2-ICS-4.0.4-CM9-HWA V2.6 (Kernel: tytung_HWA_r3.4)

 

Anlatım (Aşama aşama eksiksiz yaparsanız hiç bir sıkıntı ile karşılaşmadan kurulum tamamlanacak),

* Bootloader ekranından(4 Renkli ekran) 2.08.HSPL olduğunu kontrol ediniz. Değilse HD2 Toolkit'i çalıştırarak HSPL butonu yardımı ile telefonunuzu 2.08.HSPL yapın.

* İsteğinize göre Rehber, SMS, Program vs. yedeklemenizi yapın (ancak windows 6.5 ile yedeklediğiniz sms, rehber veya programlarınızı android altında kullanamazsınız).

 

Bootlader(ses kısma ve power tuşuna birlikte basıp açtıgınız ekran) ekranında iken ;

1. HD2 Toolkit ile Wipe (Task29) işlemini uygulayın (%100 tamamlandığı anda ses kısma tuşuna renkli ekran gelene kadar basılı tutun),

2. İndirdiğiniz Radio ROM 2.15.50.14 romu yükleyin (%100 tamamlandığı anda ses kısma tuşuna renkli ekran gelene kadar basılı tutun),

3. HD2 Toolkit ile MAGLDR 1.13 kurun, telefon MAGLDR menüsü ile açılınca 5. USB Flasher seçeneğini seçin,

4. Nexus ICS ROM Recovery için 5/170/5 recovery gereklidir. "Recovery(repartition) yüklemesi" yapın(aşağıdaki gibi),

Recovery (repartition yaparken) yüklerken ;
HD2 Toolkit üzerinden,
"Choose system partition size (MAGLDR)" = "Custom" olarak seçin.
Altında bulunan "cache size (in MB)" = 5 olarak seçin.
"Repartition" butonunu tıkladıktan sonra gelen ekrana 170 yazın ve recovery'i bu yöntemle yüklemiş olacaksınız. (5 ve 170 sadece Nexus ICS android rom için geçerlidir) 

5. MAGLDR menüsünden "AD Recovery" seçin, Recovery mod açılınca sdcard üzerinde 1GB'lık "EXT3 bölümleme" alanı yaratın(aşağıdaki gibi)

Ext3 bölümleme için(**Uyarı : SDCARD içeriği tamamen silinecektir);
1. Recovery menü içerisinden Advanced seçin.
2. Partitition SD card seçin
3. Önce 1024M seçin ardından gelen menüden 0M seçin ve tamam seçin.
4. Recovery ana ekranda "mounts and storage" ve "mount USB storage" seçip bilgisayarınıza bağlayın.
5. Bilgisayarınız sdcard'ınızı görünce içerisinde boş bir klasör oluşturup indirdiğiniz Nexus ICS android rom .zip dosyasını ve varsa güncelleme .zip (kernel dosyası gibi..) sdcard içerisinde oluşturduğunuz klasöre kopyalayın.
6. Bitince telefondan "Unmount" seçip bilgisayardan ayırın.  

6. Recovery menüsünde ; Sırasıyla, "Wipe Data/factory reset", "wipe cache partition" ve Advanced seçeneği altından "Clear cache/dalvik cache" ve "clear battery status" yapın,

7. Recovery menüsünden, sdcard içerisinde bir folder altına koyduğunuz Android romunuzu "install zip file from sdcard" ile seçin ve yükleyin. Eğer güncelleme mevcut ise (kernel güncellemesi gibi..) Yükleme tamamlanınca yine "install zip file from sdcard" yöntemi ile güncelleme dosyasını seçin ve yükleyin. 

8. Recovery menüsünün ilk ekranından "Reboot system now" seçin. 

 

Artık romunuz kullanıma hazır.

 

**Telefon tamamen açıldıktan sonra, en az 2 defa reboot yapıp telefonu yeniden başlatın.

 

Yazının orjinali : http://www.hetece.org/hd2-android-rom-96/12-agustos-2012-nexushd2-ics-4-0-4-cm9-hwa-v2-6-kernel-tytung_hwa_r3-4-a-4555/

 

 

 

 

Zaman Hatası

13 Ağu 2012 In: .net, ipucu

The security timestamp is invalid because its creation time ('2012-08-13T08:03:31.882Z') is in the future. Current time is '2012-08-13T07:54:50.894Z' and allowed clock skew is '00:05:00'.

 
Eger bu hatayı alıyorsanız büyük olasılık tarih saat ayarlarınızda bir sorun var. Düzeltmek için server in tarih saat ayarlarından internet time e göre senkronize edin ve bir restart sorununuz düzelsin. 
 
Lakin sunucuda Internet Time Tab yoksa missing ile veyahut no internet time tab diyorsanız büyük olasılık cihazınız domainde . Hayırlı olsun o zman yapılması gereken, CMD ye :
 
w32tm /config /syncfromflags:MANUAL /manualpeerlist:time.nist.gov
w32tm /config /update
w32tm /resync 
 
 
hayırlı olsun 1-2 dakika içinde sync olur. Ama servislerinde saglıklı çalışması için ör MSSQLSVR restart şart.
 
 
Eger size
The computer did not resync because no time data was available.
 
hatası alırsanız "Services.msc" den "Windows Time" servisini bir kere durdurup yeniden başlatın ve "w32tm /resync" yeniden çalıştırın.  ve sonuç "The command completed successfully."
 
 
 

Biraz JS

13 Tem 2012 In: ipucu
Javascript daha dogrusu jquery ile dinamik cookie kontrolü ve digerleri
 
<a href="http://www._20122013.jpg" rel="lightbox" alt="Deneme Yap" id="kayit2012"></a>
<script type="text/javascript">
( function($) {
$(document).ready(function () {

if($.cookie("kayit2012") == null) 
{
$('#kayit2012').click();
        var trh= new Date();
        trh.setTime(trh.getTime() + (3 * 60 * 1000));
        $.cookie("kayit2012","1", {expires: trh });
        //$.cookie("kayit2012","1", {expires: 1});
}


}); 
} ) ( jQuery );
</script> 
 
---- 
 
document.forms[0].txt_kullanici.focus();
 
----
 
tab = document.getElementById('tbadmin');
tab.className = "redHotWebDealsli";
 
----
 
<asp:TextBox ID="txt_sirano" runat="server" Width="100px"  autocomplete="off" AutoCompleteType="Disabled" ></asp:TextBox>  
 
---------- 
 
function toggle(id) {
           var e = document.getElementById(id);
           if (e.style.display == 'block')
               e.style.display = 'none';
           else
               e.style.display = 'block';
       } 
<a id="myHeader1" href="#" onclick="toggle('yeniekle');" >Yeni Ekle</a>
<div id="yeniekle" style="display:none"></div>
 
---- ajax auto suggest
 
 var v = $("[id$=ddl_r3_BRM_ID] option:selected").val();
  $('[id$=txt_r3_muellif]').autocomplete('Suggest.ashx?t=Muracatlar&k=Muellifi&B='+v+'&s=m');
       
 
 
--------------------------------------------------
 
<script type="text/javascript">
document.getElementById("ctl00_ContentPlaceHolder1_TextBox1").type = "number";
</script>
 
 
---------------------------------------------------
 

ClientScript.RegisterStartupScript(GetType(), "YeniPencere", @"<script language='javascript'>alert(' Yeni sipariş kaydedildi. ');window.location.href = 'inside.aspx';</script>");

Datalist rownumber : <%#Container.ItemIndex+1 %>

JS yanlızca sayı girile bilmesi :  onkeypress="validate(event);" 

    function validate(evt) {

        var theEvent = evt || window.event;
        var key = theEvent.keyCode || theEvent.which;
        key = String.fromCharCode(key);
        var regex = /[0-9]|\,/;
        if (!regex.test(key)) {
            theEvent.returnValue = false;
            if (theEvent.preventDefault) theEvent.preventDefault();
        }
    } 

JS ile textboxun içindekini focus olunca tutma, değişmemisse çıkınca geri atama 

    var eski = ""; 
    function tut(element) {
        eski = element.value;
        element.value = '';
    }
 

   function ver(element) {
        if ('' == element.value) {
            element.value = eski;
            element.style.background = '#FFFFFF';
        }
        else
            element.style.background = '#A9F5BC';
    }

 

 İsk. 1:<asp:TextBox ID="txt_st_i1" runat="server" Width="40px" onfocus="tut(this);" onblur="ver(this);" onkeypress="validate(event);" >0</asp:TextBox> 
 
 
 
-------------------------------------------
 
Postback de divin scroll unu hatırlamak  :
 
  $( document ).ready(function() {     
           document.getElementById('urunlerimiz').scrollTop = document.getElementById('scrollhatirla').value;
}); 
veya 
  <body onload="javascript:document.getElementById('urunlerimiz').scrollTop = document.getElementById('scrollhatirla').value;">
 
yaptıktan sonrada
<input type="hidden" id="scrollhatirla" runat="server" /> 
<div id="urunlerimiz" style="overflow: auto; height: 300px;" onscroll="javascript:document.getElementById('scroll').value = this.scrollTop"> 
 
 
-------------------------------------------
 
<asp:CheckBox ID="chk_sec" ToolTip='<%#Eval("SPD_ID")%>' Visible="<%# ShouldBeVisible %>" runat="server"  />
 
        protected bool ShouldBeVisible
        {
            get
            {
                return !pnl_asama2.Visible;
            }
        } 
 
-------------------------------------------- 
 
  JS ile input temizleme - clear textbox on click
 
 onclick="javascript:this.value='';"
 
 
Close to ColorBox within the iframe
 
<script src="bower_components/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" language="javascript">
        function kapa()
        {
            parent.$.fn.colorbox.close();
        }
    </script> 
 

Ben Kimim ?

Celiker BahceciMerhabalar, ben Çeliker BAHÇECİ. 2004 den beri özel sektörde bilgisayar mühendisligi ve egitmenlik yapıyorum. Yine aynı yılın Ekim ayından beri sitemde .Net ile programlama ve hayat görüşüm ile ilgili makalelerimi yayınlıyorum. Blogum dışında Yazgelistir.com, mobilnedir.com gibi ineta kapsamındaki bir çok siteye Microsoft teknolojileri ile ilgili yazılar yazmaktayım.
Bu site ile sizinde hayatınızı anlamlandırmanızda bir parça katkımın olması dilegiyle...


Arşiv