-
June 22nd, 2010, 12:40 PM
#1
Problem compileing using linq
Including:
Code:
using System.Linq;
using System.Xml.Linq;
on an *.aspx.cs web page is standard in a C# ASP.NET website page generated by VS 2008. But if I port that page to my server, there occurs a compiler error when I try to access that page via the Internet (IE 8). Once the 'Linq' statements are commented out, the page works just fine.
One thing I notice. The Web.config file on the local VS 2008 generated ASP.NET Website contains the following
Code:
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
whereas my server based Web.config file does not contain the 'System.Xml.Linq' assembly. Could that be the problem?
Last edited by Mike Pliam; June 22nd, 2010 at 02:03 PM.
mpliam
-
June 23rd, 2010, 09:27 AM
#2
Re: Problem compileing using linq
your web.config files should be the same. you should definitely have all of those assemblies in the web.config on the server.
===============================
My Blog
-
June 23rd, 2010, 10:26 AM
#3
Re: Problem compileing using linq
Might want to check out what version of the Framework you have installed on the server too.... making a reference to 3.5 objects (like LINQ) when FW2.0 is the only one installed will cause problems.
-tg
-
June 25th, 2010, 10:50 AM
#4
Re: Problem compileing using linq
Thanks.
mpliam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|