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 7583769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:45:43+00:00 2026-05-30T18:45:43+00:00

I am getting this error when I try to launch my website using WebMatrix.

  • 0

I am getting this error when I try to launch my website using WebMatrix. I have a .cs file which makes a call var db = Database.Open("dbase");.

I have a database in my project called “dbase”. I have no web.config file and no imports for using WebMatrix packages since I am launching the site using WebMatrix, so I don’t believe I should need them. Do I need to wrap the code in Razor tags, like @{var db = Database.Open("dbase"); } ? This causes an error for me too.

What could be causing this? Does anyone have any solutions for this?

  • 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-30T18:45:45+00:00Added an answer on May 30, 2026 at 6:45 pm

    You need a reference to the WebMatrix.Data.dll assembly (which you probably have) and you also need a using directive for the WebMatrix.Data namespace:

    using WebMatrix.Data;
    

    That will import the Database class so you can use it without fully-qualifying the name.

    It’s not clear why you think you wouldn’t need any “imports” (by which I assume you mean using directives like the one above) but if this is in a plain C# file, then you certainly do need them (or you need to fully-qualify type names, which is ugly).

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

Sidebar

Related Questions

I am getting this error when i try to access an asp website which
I keep getting this error when I try to call Find() public void findTxt(string
I'm getting this error when I try to add jruby as a dependency using
I'm getting this error when I try to mail from CakePHP 2.0 using CakeEmail:
I am getting this error when I try to set a mock to have
Getting this error when try to compile a .net 1.1 website: Visual Studio .NET
I keep getting this error when I try and use an MS Access database
I am getting this error when I try to query the database and write
I keep getting this error when I try to commit a group of executed
I am getting this error when I try to build for the device: Code

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.