0
     <?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="rde_410978ConnectionString" connectionString="Data Source=SQL2008.net.dcs.hull.ac.uk;Initial Catalog=rde_410978;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
  </system.web>
</configuration>

これが私の設定ファイルです。ウェブサイトを構築>公開することでサーバーに公開しています。

大学がサーバーをセットアップし、他の人のために正しく機能しているため、エラーはサーバーに起因するものではありません。

エラー:

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error: 


Line 16: 
Line 17:   <system.web>
Line 18:     <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Line 19: 
Line 20:     <authentication mode="Forms">


Source File: C:\RDEUsers\NET\410978\web.config    Line: 18 
4

2 に答える 2

3

IISを確認しましたか?

IISが別のフレームワークに設定されている場合があります。

http://technet.microsoft.com/en-us/library/cc754523(v=ws.10).aspx

同様の問題と解決策は次のとおりです。

http://forums.asp.net/t/1491204.aspx/1

于 2012-05-17T11:46:51.770 に答える
1

これは、Deployment Environment の .net バージョンが原因だと思いますが、これは 4.0 ではないと思います。

同じターゲット フレームワーク、つまり 4.0 がリストされている場合は、他のユーザーと確認してください。

于 2012-05-17T11:49:54.480 に答える