Error with standard when adding pages.

Topics: Themes
Apr 15, 2009 at 5:03 AM
I added a link from the link page to a create user page I created and I get an error page "http://www.adisaonu.com/error404.aspx?aspxerrorpath=/join.aspx"  I even tried to adding a blank page with the same error.  Both pages had the site.master from the standard theme.  I've tried this with other themes and it works fine.  Any ideas?
Coordinator
Apr 15, 2009 at 6:26 AM
An unhandled error is occurring, and it's setup to redirect you to error404.aspx when an unhandled error occurs.  In your web.config file, there's a <customErrors> tag.  If you change it to the one below, then you'll see the actual error without being redirected to error404.aspx.

<customErrors mode="Off">
Apr 15, 2009 at 12:32 PM
Thanks that worked.  The error message misled me a little with the"page not found".  The error was from "using System Linq". The page didn't have any Linq in it but I don't remember pages ever producing an error with extra stuff.  When I removed that line it worked.  I am a little puzzled to why it errored on Linq.  Anybody know?
 

Server Error in '/' Application.

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: CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

Source Error:

Line 1:  using System;
Line 2:  using System.Collections.Generic;
Line 3: using System.Linq;Line 4:  using System.Web;
Line 5:  using System.Web.UI;

Source File: c:\Inetpub\wwwroot\adisaonu\photos.aspx.cs    Line: 3
Coordinator
Apr 15, 2009 at 8:07 PM
The default BE installation is using the .NET 2.0 libraries.  Linq is not in those libraries -- it's in the .NET 3.5 libraries.  You could modify/upgrade your web.config file to use the .NET 3.5 libraries -- then you wouldn't get this error.

If you're using VS 2008, you can right-click on the website project, and on one of the tabs, there's a dropdown list for Target Framework.  Changing it to 3.5 should make the necessary upgrades to your web.config file.
Apr 15, 2009 at 8:20 PM
Yes, I am using VS2008 with SP1.  Thanks for making sense of my error.