İlker Eroğlu
ViewData["Title"] = "hmm...";

BlogEngine IIS 7.0 üzerinde çalışmıyorsa

Yeni sunucumuzu aldik ve Windows 2008 'i hemen kurdum. Tabii icinde IIS 7.0'da geldi. Blogumu iis6'dan iis 7'ye tasimak sandigimdan fazla zamanımı aldı.
Eğer sizde bu problemle karşılaşırsanız düzeltmeniz gereken tek dosya web.config 'dir.

</system.web> satirindan sonra asagida verdigim kodu eklemelisiniz.

<system.webServer>
<modules>
<add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite" preCondition="managedHandler" />
<add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule" preCondition="managedHandler" />
<add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule" preCondition="managedHandler" />
<add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule" preCondition="managedHandler" />
<!--The CleanPageModule below removes whitespace which makes the page load faster in IE. Enable at own risk -->
<!--<add name="CleanPageModule" type="BlogEngine.Core.Web.HttpModules.CleanPageModule, BlogEngine.Core"/>-->

<!--Remove the default ASP.NET modules we don't need-->
<remove name="Profile" />
<remove name="AnonymousIdentification" />
</modules>

<handlers>
<add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" />
<add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core"/>
<add name="SyndicationHandler" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core"/>
<add name="SiteMap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" />
<add name="TrackbackHandler" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" />
<add name="PingbackHandler" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" />
<add name="OpenSearchHandler" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" />
<add name="MetaWeblogHandler" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" />
<add name="RsdHandler" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" />
<add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" />
<add name="JavaScriptHandler" verb="*" path="js.axd" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" />
<add name="RatingHandler" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" />
<add name="OpmlHandler" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" />
<add name="MonsterHandler" verb="*" path="monster.axd" type="BlogEngine.Core.Web.HttpHandlers.MonsterHandler, BlogEngine.Core" />
<add name="BlogMLExportHandler" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" />
</handlers>
</system.webServer>

Bu sekilde web.config dosyanizi duzenledikten sonra asagidaki satirida command prompt'da calistirdiginizda hic bir sorununuz kalmayacaktir.

%systemroot%\system32\inetsrv\APPCMD.EXE migrate config "BlogSiteName/"


Çarşamba, 13 Mayıs 2009 19:24

VB.Net ve C# Farkları

Guzel bir calisma sizinle paylasmak istedim.
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html


Pazartesi, 23 Şubat 2009 19:20
Etiketler:   ,
Kategori:   .NET Framework | ASP.NET | C#
Fasiliti:   E-mail | del.icio.us | Permalink | Yorumlar (296) | Yorum RSSRSS comment feed

Web'deki Resmi Programatik Sunucuya Kaydetme

WebClient iRes= new WebClient();
string ResimYol = "http://www.google.com/intl/en_com/images/logo_plain.png";
iRes.DownloadFile(ResimYol , "d:\\resim.jpg");

Pazartesi, 23 Şubat 2009 19:17
Etiketler:  
Kategori:   .NET Framework | ASP.NET | Genel
Fasiliti:   E-mail | del.icio.us | Permalink | Yorumlar (290) | Yorum RSSRSS comment feed

GridView ile Sayfalama

GridView nesnesinde sayfalamak yapmak istiyorsanız, PageIndexChanging
olayına aşağıdaki kodu yazmalısınız.

protected void Page_Load(object sender, EventArgs e)
 {
  DropDownList1.Items.Insert(0, new ListItem("Seçiniz...", "0"));
}

Pazartesi, 23 Şubat 2009 18:32

.NET Yeni LOGO

Aşağıda gördüğünüz koyu ve açık zemin üzerinde ki .NET 'in yeni logosu.
8 yıl sonra yenilenen logo benim hoşuma gitti :)


Pazartesi, 23 Şubat 2009 18:28

Linq ile Rastgele Kayıt(lar) Çekmek

Linq ile rastgele kayit cekmek icin yapmaniz gereken cok basit.

[Function(Name="NEWID", IsComposable=true)]
public Guid Random()
{
return Guid.NewGuid();
}

....
ctx.Log = Console.Out;
var query = from x in ctx.Suppliers
orderby ctx.Random()
select x;
var results = query.ToArray();

....

Olusan Select cumlesi asagidaki gibi olacaktir.

SELECT [t0].[SupplierID], [t0].[CompanyName], [t0].[ContactName],
[t0].[ContactTitle], [t0].[Address], [t0].[City], [t0].[Region],
[t0].[PostalCode], [t0].[Country], [t0].[Phone], [t0].[Fax], [t0].[HomePage]
FROM [dbo].[Suppliers] AS [t0]
ORDER BY NEWID()

Cumartesi, 21 Şubat 2009 22:13
Etiketler:   ,
Kategori:   .NET Framework | Linq
Fasiliti:   E-mail | del.icio.us | Permalink | Yorumlar (317) | Yorum RSSRSS comment feed