These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Null Reference Error

The server that filevista was hosted on was a domain controller. Yesterday we demoted it and now filevista wont work. I am getting null reference error when I enter the username/password

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.

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: 

[NullReferenceException: Object reference not set to an instance of an object.]
   GleamTech.FileVista.AuthenticationManager.Authenticate(HttpContext context) in E:\Inetpub\wwwroot\FileVista\AuthenticationManager.cs:23
   GleamTech.FileVista.FileVistaGlobalAsax.Application_AcquireRequestState(Object sender, EventArgs e) in E:\Inetpub\wwwroot\FileVista\Global.asax.cs:66
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Arun Nayar 11/12/2010 8:40 AM
I'm guessing the problem is related somehow to the application pool account. As a domain controller, the concept of "Local Accounts" is meaningless (at least, it was back in the NT 4.0 days). All local accounts are domain accounts. Likely your app pool is still configured to use the domain account that either doesn't exist anymore due to the DC being demoted, or isn't valid for for a "member server" app pool. 

Go into the IIS manager tool and check out the account associated with your app pool. Try changing it to ApplicationPoolIdentity (IIS7 default) or Network Service (IIS6 default). This may also have implications for your local file store directory (your app pool account needs modify access to that) and, if you're using SQL, to your authentication mechanism (if you are using Window Authentication instead of SQL Authentication).
NAS 11/12/2010 10:03 AM
The application pool was already set use networkservice account.
Arun Nayar 11/12/2010 10:05 AM
Hmm. Just curious...what OS are you running? And, what are you using for a DB? Access, SQL, or other?
NAS 11/12/2010 10:17 AM
Windows Server 2003

Access Database
Arun Nayar 11/12/2010 10:18 AM
Just curious, have you checked the ACLs on all of the FileVista / IIS directories to make sure that they specify local (not domain) accounts?

I also found this regarding DC promotion in regards to IIS. Possibly, demoting has a similar negative effect on IIS:

One final question... what version of FileVista are you running?
NAS 11/12/2010 10:28 AM
version 3.5

I read that article but dont know if its relevant to the issue. The site loads up fine. Its only when I try to log in. I reset the configuration flag and reran the config to see if it would help but it wont go past the page where the admin user and root folder is entered because those values already exist in the database.
Arun Nayar 11/12/2010 11:58 AM
I'm wondering if the access DB itself is somehow secured using domain credentials...not sure. I'm very new to this product as well. I just setup my first test site two days ago.

Hope fully Cem Alacayir will chime in soon. He seems to be pretty responsive. Sorry I couldn't be more helpful.
NAS 11/12/2010 12:05 PM
This seems to be ASP.NET SessionModule problem, ie. the error occurs because the session state is not available for the application.

1. First make sure that this line is included in application's web.config:

<sessionState mode="InProc"/>

If you are using StateServer or SQLServer mode instead of InProc then please make sure it is accessible (ie. check if supplied ip address or host name is accessible).

2. Please check if the following setting is included in your machine's global web.config (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config) under <httpModules> section:

<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
Cem Alacayir 11/12/2010 5:12 PM
Very nice! In Classic mode (any IIS version), you need this in your web.config or app.config:
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
Brian Pa 12/30/2012 8:25 AM