Locked[FAQ]!! Encounter Error when running the forum the first time

Author
APGvNext Sam
vNext Owner
  • Total Posts : 12845
  • Joined: 2001/05/23 00:00:00
  • Status: offline
2008/07/17 16:06:09 (permalink) 3.x

!! Encounter Error when running the forum the first time

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.
post edited by Samuel - 2011/07/22 11:31:45
#1
Jump to:
© 2014 APG vNext Commercial Version 5.0