2012-04-13 7 views
1

asp.net 4を使用してアプリケーションを作成しましたが、ローカルサーバーで正常に動作しますが、外部サーバーに切り替えると、 web.config、私はこのエラーが表示されますWeb.configセクションの「アセンブリ」のコンパイルを読み取ることができません

[500 - Internal server error. 
There is a problem with the resource you are looking for, and it cannot be displayed. 
] 

<compilation>セクションにはいくつか問題があるようです。ちょうど私が<compilation>セクションを削除すると、私のアプリケーションを表示して実行することができますが、データベースにアクセスすることはできません。

web.configファイル


<?xml version="1.0" encoding="utf-8"?> 
<configuration> 

    <configSections></configSections> 
    <appSettings /> 


    <connectionStrings> 
    <add name="ImmoEntities" connectionString="metadata=res://*/Model.ImmoModel.csdl|res://*/Model.ImmoModel.ssdl|res://*/Model.ImmoModel.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=XXXXX;Password=XXXXX;User Id=XXXXX;database=XXXXX&quot;" providerName="System.Data.EntityClient" /> 
    </connectionStrings> 


    <system.web> 

    <globalization culture="auto:fr-FR" uiCulture="auto:fr-FR" /> 
    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> 
     <providers> 
     <clear /> 
     <add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="Web1.siteMap" /> 
     <add name="web1" type="System.Web.XmlSiteMapProvider" siteMapFile="/Web1.sitemap" /> 
     <add name="web" type="System.Web.XmlSiteMapProvider" siteMapFile="/Web.sitemap" /> 
     <add name="web3" type="System.Web.XmlSiteMapProvider" siteMapFile="/Web3.sitemap" /> 
     <add name="web4" type="System.Web.XmlSiteMapProvider" siteMapFile="/Web4.sitemap" /> 
     </providers> 
    </siteMap> 

    <!-- Web.Config Configuration File --> 

    <compilation debug="true" targetFramework="4.0"> 
     <assemblies> 
     <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
     <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
     <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
     </assemblies> 
    </compilation> 



    <!-- 
      Set compilation debug="true" to insert debugging 
      symbols into the compiled page. Because this 
      affects performance, set this value to true only 
      during development. 
     --> 





    <!-- 
      The <authentication> section enables configuration 
      of the security authentication mode used by 
      ASP.NET to identify an incoming user. 
     --> 

    <authentication mode="Windows" /> 
    <httpHandlers> 
     <add path="CaptchaImage.axd" verb="GET" type="MSCaptcha.CaptchaImageHandler, MSCaptcha" /> 
    </httpHandlers> 

    <!-- 
      The <customErrors> section enables configuration 
      of what to do if/when an unhandled error occurs 
      during the execution of a request. Specifically, 
      it enables developers to configure html error pages 
      to be displayed in place of a error stack trace. 

     <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> 
      <error statusCode="403" redirect="NoAccess.htm" /> 
      <error statusCode="404" redirect="FileNotFound.htm" /> 
     </customErrors> 
     --> 

    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> 
     <controls> 
     <add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="ajaxToolkit"/> 

     <add tagPrefix="cc1" assembly="MSCaptcha" namespace="MSCaptcha" /> 

     </controls> 
    </pages> 

    </system.web> 


    <!-- 
     The system.webServer section is required for running ASP.NET AJAX under Internet 
     Information Services 7.0. It is not necessary for previous version of IIS. 
    --> 


    <system.webServer> 
    <httpErrors errorMode="Detailed" /> 
    <asp scriptErrorSentToBrowser="true"/> 
    <validation validateIntegratedModeConfiguration="false" /> 
    </system.webServer> 
    <system.web> 
    <customErrors mode="Off"/> 
    <compilation debug="true"/> 
    </system.web> 




    <system.data> 
    <DbProviderFactories> 
     <remove invariant="MySql.Data.MySqlClient" /> 
     <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> 
    </DbProviderFactories> 
    </system.data> 

</configuration> 

何ができるか任意のアイデア?私は別の方法を試みたが、まだ動作しません。

+0

をしないのですなら、私に教えてください? – Oded

+0

はい私はサーバーのログをチェクしました。それは正常なようです...エラートラッキングはありません。 – GENE

答えて

1

適切なバージョンのすべてのアセンブリがGACにインストールされていること、またはプロジェクトのBinフォルダ内にあることを確認してください。

binから参照されていないアセンブリがGACに存在しない場合は、サーバー上で.NET Framework 4を再度実行する必要があります。

binに何もない場合は、そのアセンブリをプロジェクトに含める際に、Copy to ..プロパティをtrueに設定していることを確認する必要があります。そのアセンブリを直接コピーしてビンに貼り付けることができます。

System.Design, Version=4.0.0.0 
System.Data.Entity, Version=4.0.0.0 
System.Web.Extensions, Version=4.0.0.0 
System.Web.Extensions.Design, Version=4.0.0.0 
System.Windows.Forms, Version=4.0.0.0 
System.Web.DynamicData, Version=4.0.0.0 
System.Core, Version=4.0.0.0 
System.ComponentModel.DataAnnotations, Version=4.0.0.0 
System.Data.Linq, Version=4.0.0.0 
System.Web.Entity, Version=4.0.0.0 
System.Xml.Linq, Version=4.0.0.0 

サーバーのイベントログを見ていました私は何か

+0

プロジェクト内のすべての欠落DLLをbinフォルダにコピーしました!私はまだ同じエラーページ[500内部サーバーエラー]を持っています。 私はホスティング会社に何かをチェックさせるべきですか?それとも他の提案がありますか? – GENE

+0

すべての前提条件がasp.net 4にインストールされていることを確認しましたか? –

+0

afetrがホスティング会社に連絡すると、.NET4用のすべての前提条件DLLがインストールされていると思います!しかし問題は持続する!お返事ありがとうございます。 – GENE

関連する問題