Error executing child request for handler Hatası
 

Asp.Net MVC' de çalisirken  Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper' seklinde hata aliyorsaniz sizlere çözümünü anlatacagim. Ilk olarak bu hatayi nasil nerede aldim anlatayim. Mvc projemde Html.Action sik sik kullaniyordum. Çesitli view sayfalarinda kulaniyordum 1 tanede Shared da bulunan Layout sayfasinda Html.Action kullanmak istedim ve böyle bir hata ile karsilastim.

Hatanin detayli açiklamasinda;

"The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'." yazmaktaydi.

Internette çesitli arastirmalar yaptiktan sonra bu hatanin Layout sayfasinda Html.action kullanarak entity framework araci ile veritabanindan veri çekerken ortaya çiktigini ögrendim. Hatanin çözümü ise web.config dosyasina eklenecek bir satir ile düzeltilebiliyordu.

Web.config dosyanizda  <assemblies> içerisinde "<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />" satirini eklediginizde sorun düzelecektir.

<system.web>

    <compilation debug="true" targetFramework="4.0">

      <assemblies>

        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

        <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

        <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

        <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

      //Eklendi      
      <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

      </assemblies>

    </compilation>

</system.web>

 

Author: Engin ATALAY
Date: 17.05.2014 15:03:12
View Count: 7586
 
 

COMMENTS
 
No comments yet. Be the first to comment who you are.
 
 
 
 
 
 
 
WRITE COMMENT
 
 
Your Name :
 
 
 
E-mail :
 
 
 
Your Message :
 
 
 
 
 
 
 
This project : ASP.NET MVC , RAZOR, Entity Framework , CSS , HTML , JQUERY(2.0.2) , AJAX the C# side-tier architecture was developed with logic.
 
Yukarı Çık