Forum Themes:
Welcome !

 !! Encounter Error when running the forum the first time

Author Message
Samuel

  • Total Posts : 11786
  • Reward points : 168350
  • Joined: May 23 '01
  • Status: offline
!! Encounter Error when running the forum the first time Thu. Jul 17, '08 4:06 PM (permalink)
Q1: _I am getting an error while loading the forum after performing the setup procedure. The error shows the following:

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.


OR

Cannot find table 0.

Description: Anunhandledexception occurred during the execution of the current webrequest.Please review the stack trace for more information about theerror andwhere it originated in the code.

Exception Details: System.IndexOutOfRangeException: Cannot find table 0.



A1: FIRST OF ALL, please make sure you have run the setup program (http://<forum-URL>/setup/). If you haven't, you will see this error by accessing the forum directory directly.

If you have run the setup program successfully and still see this error, try setting the DBOwnerPrefix to "" (blank) in your web.config file, like this:

<add key="DBOwnerPrefix" value="" />

And try browsing to the forum URL again.

Also, you should be able to find an error log under ~/upfiles/logs/ that contains a line similar to this:
System.Data.SqlClient.SqlException: Could not find stored procedure 'xxxx.spFetchConfig'.

This tells you that you set the DBOwnerPrefix wrong. "xxxx."is your current value, and you should change it to the correct schema (from SQL Management Studio) or just leave it blank.
 
However, if there is no log showing up, try creating a folder under ~/upfiles/ and then delete it, and load the forum again. See if it brings the forum back to life.
 


Q2: _ It seems that my root site's web.config file has conflicts with the forum's web.config file. What should I do?

A2: When running a .net web application as the root of a website conflicts may occur in child web.config's. In order to prevent the forum from inheriting the web.config settings of the root site, insert these tags around the system.web tag (of the root site's web.config):
     
 <location path="." inheritInChildApplications="false">     
     <system.web>     
     ...     
     </system.web>     
 </location>
 <!-- if you are on IIS 7 Integrated pipeline mode -->
 <location path="." inheritInChildApplications="false">     
     <system.webServer>     
     ...     
     </system.webServer>     
 </location>

The system.web tag is the existing tag in your site's web.config file, not something you need to add. All you add is the "location" begin and end tags to surround the existing system.web tags.

Make sure you apply the above fix to "all" web.config files that are at parent levels to the forum directory. There could be more than 1 web.config files.
<message edited by Samuel on Fri. Jul 22, '11 11:31 AM>
ASPPlayground.NET
~ see our Version 4 plans here

 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9