Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net IIS7 Web服务器linq到sql错误_Asp.net_Linq To Sql_Webserver_Iis 7.5_Windows Server 2008 R2 - Fatal编程技术网

Asp.net IIS7 Web服务器linq到sql错误

Asp.net IIS7 Web服务器linq到sql错误,asp.net,linq-to-sql,webserver,iis-7.5,windows-server-2008-r2,Asp.net,Linq To Sql,Webserver,Iis 7.5,Windows Server 2008 R2,我在IIS7中的Windows Server 2008 R2上配置了一个简单的ASP.NET网站,它运行良好,但现在当我希望它使用数据库显示信息时,我在Internet Explorer中遇到以下错误: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following

我在IIS7中的Windows Server 2008 R2上配置了一个简单的ASP.NET网站,它运行良好,但现在当我希望它使用数据库显示信息时,我在Internet Explorer中遇到以下错误:

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0246: The type or namespace name 'DataClassesDataContext' could not be found (are you missing a using directive or an assembly reference?) Source Error: `Line 10: protected void Page_Load(object sender, EventArgs e)` `Line 11: {` `Line 12: DataClassesDataContext db = new DataClassesDataContext();` `Line 13: var q = from i in db.Table1s` `Line 14: select i;` Source File: c:\inetpub\oranges\sub\Default.aspx.cs Line: 12 有什么问题吗

我怎样才能解决这个问题

DataClassesDataContext db = new DataClassesDataContext();
var q = from i in db.Table1s
        select i;

foreach (var i in q)
    ListBox1.Items.Add(i.data);