Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Server Error...

Server Error...

Scheduled Pinned Locked Moved ASP.NET
sysadmindata-structuresdebugginghelp
10 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RajpootRohan
    wrote on last edited by
    #1

    Hi to all, Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:

    Server Error in '/VICTORIAIN' Application.
    Invalid object name 'STATIC'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlException (0x80131904): Invalid object name 'STATIC'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
    System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
    System.Data.SqlClient.SqlDataReader.get_MetaData() +62
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
    System.Data.SqlClient.SqlCommand.ExecuteReader() +84
    _Default.BenefitsData() +125
    _Default.Page_Load(Object sender, EventArgs e) +10
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,

    C D V R 4 Replies Last reply
    0
    • R RajpootRohan

      Hi to all, Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:

      Server Error in '/VICTORIAIN' Application.
      Invalid object name 'STATIC'.
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

      Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.

      Source Error:

      An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

      Stack Trace:

      [SqlException (0x80131904): Invalid object name 'STATIC'.]
      System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
      System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
      System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
      System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
      System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
      System.Data.SqlClient.SqlDataReader.get_MetaData() +62
      System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
      System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
      System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
      System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
      System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
      System.Data.SqlClient.SqlCommand.ExecuteReader() +84
      _Default.BenefitsData() +125
      _Default.Page_Load(Object sender, EventArgs e) +10
      System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
      System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I would guess that you've created an object in your DB called 'static', and that this name is not valid. Do you have any objects called that, in your code or your DB ?

      Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

      R 1 Reply Last reply
      0
      • C Christian Graus

        I would guess that you've created an object in your DB called 'static', and that this name is not valid. Do you have any objects called that, in your code or your DB ?

        Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

        R Offline
        R Offline
        RajpootRohan
        wrote on last edited by
        #3

        Hi, Thank you for replying. Actually there is a table named "STATIC" from which the home page data is coming. Does the problem is with the name "STATIC". As I said that earlier it was working fine except the one page I added. On that page the data was coming from the table named "STATIC" and the column name was "Career". That time the error on that page was similar to the present error except the heading "Invalid column name "Career"" instead of "Invalid object name "STATIC""

        cheers, sneha

        C 1 Reply Last reply
        0
        • R RajpootRohan

          Hi to all, Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:

          Server Error in '/VICTORIAIN' Application.
          Invalid object name 'STATIC'.
          Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

          Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.

          Source Error:

          An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

          Stack Trace:

          [SqlException (0x80131904): Invalid object name 'STATIC'.]
          System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
          System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
          System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
          System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
          System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
          System.Data.SqlClient.SqlDataReader.get_MetaData() +62
          System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
          System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
          System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
          System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
          System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
          System.Data.SqlClient.SqlCommand.ExecuteReader() +84
          _Default.BenefitsData() +125
          _Default.Page_Load(Object sender, EventArgs e) +10
          System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
          System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          sneha Choudhary wrote:

          I googled and found that I should set up the database again.

          I am really curious to know what did you googled. Show some code how you are trying to access the table. That would help.

          R 1 Reply Last reply
          0
          • R RajpootRohan

            Hi, Thank you for replying. Actually there is a table named "STATIC" from which the home page data is coming. Does the problem is with the name "STATIC". As I said that earlier it was working fine except the one page I added. On that page the data was coming from the table named "STATIC" and the column name was "Career". That time the error on that page was similar to the present error except the heading "Invalid column name "Career"" instead of "Invalid object name "STATIC""

            cheers, sneha

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Well, that seems to clear up the mystery. Either it's an invalid name, or you're somehow failing to scope it properly.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            1 Reply Last reply
            0
            • D dan sh

              sneha Choudhary wrote:

              I googled and found that I should set up the database again.

              I am really curious to know what did you googled. Show some code how you are trying to access the table. That would help.

              R Offline
              R Offline
              RajpootRohan
              wrote on last edited by
              #6

              d@nish wrote:

              Show some code how you are trying to access the table. That would help.

              I changed the table name "STATIC" to "STATICDATA" and the code is:

              using System;
              using System.Collections;
              using System.Configuration;
              using System.Data;
              using System.Data.SqlClient;
              using System.Linq;
              using System.Web;
              using System.Web.Security;
              using System.Web.UI;
              using System.Web.UI.HtmlControls;
              using System.Web.UI.WebControls;
              using System.Web.UI.WebControls.WebParts;
              using System.Xml.Linq;

              public partial class _Default : System.Web.UI.Page
              {
              protected void Page_Load(object sender, EventArgs e)
              {
              if(!Page.IsPostBack)
              {
              BenefitsData();
              WelcomeData();
              list_of_courses();
              Latest_News();
              }
              }
              public void WelcomeData()
              {
              SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
              SqlCommand cmd = new SqlCommand();
              cmd.Connection = con;
              cmd.CommandText = "select Welcome from dbo.STATICDATA";
              cmd.Connection.Open();
              SqlDataReader rdr = cmd.ExecuteReader();
              while (rdr.Read())
              {
              string welcome_text = rdr["welcome"].ToString();
              LblWelcomeText.Text = welcome_text;
              }
              cmd.Connection.Close();
              }

              public void BenefitsData()
              {
                  SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                  SqlCommand cmd = new SqlCommand();
                  cmd.Connection = con;
                  cmd.CommandText = "select Benefits from dbo.STATICDATA";
                  cmd.Connection.Open();
                  SqlDataReader rdr = cmd.ExecuteReader();
                  while (rdr.Read())
                  {
                      string benefits\_text = rdr\["Benefits"\].ToString();
                      LblBenefits.Text = benefits\_text;
                  }
                  cmd.Connection.Close();
              }
              
              public void Latest\_News()
              {
                  SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                  SqlCommand cmd = new SqlCommand();
                  cmd.Connection = con;
                  cmd.CommandText = "select top 1 headline,submit\_time from dbo.NEWS order by submit\_time desc";
                  cmd.Connection.Open();
                  SqlDataReader rdr = cmd.ExecuteReader();
                  while (rdr.Read())
                  {
                      string head = rdr\["headline"\].ToString();
                      LblMainHeadline.Text = hea
              
              C R 2 Replies Last reply
              0
              • R RajpootRohan

                d@nish wrote:

                Show some code how you are trying to access the table. That would help.

                I changed the table name "STATIC" to "STATICDATA" and the code is:

                using System;
                using System.Collections;
                using System.Configuration;
                using System.Data;
                using System.Data.SqlClient;
                using System.Linq;
                using System.Web;
                using System.Web.Security;
                using System.Web.UI;
                using System.Web.UI.HtmlControls;
                using System.Web.UI.WebControls;
                using System.Web.UI.WebControls.WebParts;
                using System.Xml.Linq;

                public partial class _Default : System.Web.UI.Page
                {
                protected void Page_Load(object sender, EventArgs e)
                {
                if(!Page.IsPostBack)
                {
                BenefitsData();
                WelcomeData();
                list_of_courses();
                Latest_News();
                }
                }
                public void WelcomeData()
                {
                SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = con;
                cmd.CommandText = "select Welcome from dbo.STATICDATA";
                cmd.Connection.Open();
                SqlDataReader rdr = cmd.ExecuteReader();
                while (rdr.Read())
                {
                string welcome_text = rdr["welcome"].ToString();
                LblWelcomeText.Text = welcome_text;
                }
                cmd.Connection.Close();
                }

                public void BenefitsData()
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                    SqlCommand cmd = new SqlCommand();
                    cmd.Connection = con;
                    cmd.CommandText = "select Benefits from dbo.STATICDATA";
                    cmd.Connection.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        string benefits\_text = rdr\["Benefits"\].ToString();
                        LblBenefits.Text = benefits\_text;
                    }
                    cmd.Connection.Close();
                }
                
                public void Latest\_News()
                {
                    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                    SqlCommand cmd = new SqlCommand();
                    cmd.Connection = con;
                    cmd.CommandText = "select top 1 headline,submit\_time from dbo.NEWS order by submit\_time desc";
                    cmd.Connection.Open();
                    SqlDataReader rdr = cmd.ExecuteReader();
                    while (rdr.Read())
                    {
                        string head = rdr\["headline"\].ToString();
                        LblMainHeadline.Text = hea
                
                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                Have you ever thought about structuring your code ? For example, having a data layer, and perhaps even a shared connection ?

                Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

                1 Reply Last reply
                0
                • R RajpootRohan

                  d@nish wrote:

                  Show some code how you are trying to access the table. That would help.

                  I changed the table name "STATIC" to "STATICDATA" and the code is:

                  using System;
                  using System.Collections;
                  using System.Configuration;
                  using System.Data;
                  using System.Data.SqlClient;
                  using System.Linq;
                  using System.Web;
                  using System.Web.Security;
                  using System.Web.UI;
                  using System.Web.UI.HtmlControls;
                  using System.Web.UI.WebControls;
                  using System.Web.UI.WebControls.WebParts;
                  using System.Xml.Linq;

                  public partial class _Default : System.Web.UI.Page
                  {
                  protected void Page_Load(object sender, EventArgs e)
                  {
                  if(!Page.IsPostBack)
                  {
                  BenefitsData();
                  WelcomeData();
                  list_of_courses();
                  Latest_News();
                  }
                  }
                  public void WelcomeData()
                  {
                  SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
                  SqlCommand cmd = new SqlCommand();
                  cmd.Connection = con;
                  cmd.CommandText = "select Welcome from dbo.STATICDATA";
                  cmd.Connection.Open();
                  SqlDataReader rdr = cmd.ExecuteReader();
                  while (rdr.Read())
                  {
                  string welcome_text = rdr["welcome"].ToString();
                  LblWelcomeText.Text = welcome_text;
                  }
                  cmd.Connection.Close();
                  }

                  public void BenefitsData()
                  {
                      SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                      SqlCommand cmd = new SqlCommand();
                      cmd.Connection = con;
                      cmd.CommandText = "select Benefits from dbo.STATICDATA";
                      cmd.Connection.Open();
                      SqlDataReader rdr = cmd.ExecuteReader();
                      while (rdr.Read())
                      {
                          string benefits\_text = rdr\["Benefits"\].ToString();
                          LblBenefits.Text = benefits\_text;
                      }
                      cmd.Connection.Close();
                  }
                  
                  public void Latest\_News()
                  {
                      SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings\["newcon"\].ConnectionString);
                      SqlCommand cmd = new SqlCommand();
                      cmd.Connection = con;
                      cmd.CommandText = "select top 1 headline,submit\_time from dbo.NEWS order by submit\_time desc";
                      cmd.Connection.Open();
                      SqlDataReader rdr = cmd.ExecuteReader();
                      while (rdr.Read())
                      {
                          string head = rdr\["headline"\].ToString();
                          LblMainHeadline.Text = hea
                  
                  R Offline
                  R Offline
                  r a m e s h
                  wrote on last edited by
                  #8

                  1. Check whether the table exists in the database which is pointed by the connection string 'newcon'. 2. If table exists, check whether the table is created with the schema dbo. i.e., your table name must be created by dbo.STATICDATA. Because you are selecting records using syntax schemaname.TABLENAME. If the table is created with different schema, then you will get this error.

                  1 Reply Last reply
                  0
                  • R RajpootRohan

                    Hi to all, Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:

                    Server Error in '/VICTORIAIN' Application.
                    Invalid object name 'STATIC'.
                    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

                    Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.

                    Source Error:

                    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

                    Stack Trace:

                    [SqlException (0x80131904): Invalid object name 'STATIC'.]
                    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
                    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
                    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
                    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
                    System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
                    System.Data.SqlClient.SqlDataReader.get_MetaData() +62
                    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
                    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
                    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
                    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
                    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
                    System.Data.SqlClient.SqlCommand.ExecuteReader() +84
                    _Default.BenefitsData() +125
                    _Default.Page_Load(Object sender, EventArgs e) +10
                    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
                    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,

                    V Offline
                    V Offline
                    Vimalsoft Pty Ltd
                    wrote on last edited by
                    #9

                    Can you show us in your code where you use the Word Static ? Try to pout a break point on that page and show us where you get an error

                    Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                    1 Reply Last reply
                    0
                    • R RajpootRohan

                      Hi to all, Sorry to disturb you again. I am developing a website and after making it 70% I published it and made it online. It was working fine. Now I added a new page today and published it. Now that page is giving this error:

                      Server Error in '/VICTORIAIN' Application.
                      Invalid object name 'STATIC'.
                      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

                      Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'STATIC'.

                      Source Error:

                      An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

                      Stack Trace:

                      [SqlException (0x80131904): Invalid object name 'STATIC'.]
                      System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
                      System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
                      System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
                      System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
                      System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
                      System.Data.SqlClient.SqlDataReader.get_MetaData() +62
                      System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
                      System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
                      System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
                      System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
                      System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
                      System.Data.SqlClient.SqlCommand.ExecuteReader() +84
                      _Default.BenefitsData() +125
                      _Default.Page_Load(Object sender, EventArgs e) +10
                      System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
                      System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,

                      R Offline
                      R Offline
                      RajpootRohan
                      wrote on last edited by
                      #10

                      Hi to all, Thank you all of you for replying me and giving me the way, how to code in a better way. My problem is solved. Found two mistakes in my code. 1. There was no closing semi bracket in one of the page. But it didn't gave any error on localhost. I don't know why. 2.There was a lot of commented code on the pages. I removed all of that.And I coded by giving a shared connection and used regions in my code. I don't know it could be a reason or not. Then I again published and uploaded. And it worked. Thank you for guiding me on the path of being good developer. :)

                      cheers, sneha

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups