Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3434264
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:40:37+00:00 2026-05-18T07:40:37+00:00

Helllo, I get this error: CS0246: The type or namespace name ‘DataClasses1DataContext’ could not

  • 0

Helllo, I get this error:

CS0246: The type or namespace name ‘DataClasses1DataContext’ could not be found (are you missing a using directive or an assembly reference?)

For this .aspx file:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class WebApplication1_admin_Places : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DataClasses1DataContext db = new DataClasses1DataContext();
        var query = (from m in db.Places orderby m.Name select m);
        PlacesList.DataSource = query;
        PlacesList.DataBind();
    }
}

The thing is, on / folder I can access DB, but on /admin folder i get this error.

What am I doing wrong?

EDIT

CS0012: The type ‘System.Data.Linq.DataContext’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.

What does that mean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:40:38+00:00Added an answer on May 18, 2026 at 7:40 am

    A couple of places to start:

    • Where is the dll that contains DataClasses1DataContext? Is there a reason that you can get to it from one folder and not the other
    • Is there a config file in the admin folder that is overriding values set in the root config file?

    Edit

    It looks like this is a configuration problem. The config probably says that the msl (model) file is in the current directory, it is in the root directory. Therefore it works when you are on the root but not when you are in admin.

    see: MetadataException when using Entity Framework Entity Connection for a similar problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i get this error Parser Error Message: Could not create type 'charts.lineChartData'. Source Error:
Hello not sure why Im getting this error. Basically I get it in these
I tried running a python script: print Hello, World! And I get this error:
Hello I get a weird error in this code: function validateForm(aform) { var s=;
I got this code in my submit form <form id=myform action='hello.php' method='GET'> <input type=button
Hello I asked this question to superuser but I did not get a good
In general I know why you get this error, but I'm a little confused
When I try to compile this I get this error. What do I need
Hello i get this error in Android 3.2 and it doesn't point to my
[using Apache Tomcat/7.0.27] It seems I only get this error ( HTTP Status 405

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.