CS0246: The type or namespace name 'sconnection' could not be found(are you missing a using directiv

Discussion in 'ASP .Net' started by ShailKumar, Sep 10, 2011.

  1. ShailKumar

    ShailKumar Guest

    I have a website in asp.net with c#. It works fine
    on the Visual Studio but when I run on Windows 7 Local then i get

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

    Line 15: public partial class _Default : System.Web.UI.Page
    Line 16: {
    Line 17: sconnection c = new sconnection();
    Line 18: protected void Page_Load(object sender, EventArgs e)
    Line 19: {

    sconnection is my sconnection.cs file. i create this for sql
    connection in App_code folder.

    Please help me.
    Thanks o
    Shailendra Kumar
    ShailKumar, Sep 10, 2011
    1. Advertisements

  2. ShailKumar

    Brian Cryer Guest

    How did you deploy this site to the Windows 7 box? It sounds to me like you
    have n't copied everything.

    Assuming Visual Studio 2010 then right click on your website project and
    select "Publish Web Site", and then once complete, copy EVERYTHING including
    sub-folders from the target folder to the Windows 7 box.

    Hope this helps.
    Brian Cryer, Sep 13, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.