The StackExchange Opserver Project Page states, “Installation should be a snap, just build this project as-is and deploy it as an IIS website.”
However, I ran into a build exception in StackExchange.Opserver.Current.GetSecurityProvider():
An exception of type 'System.TypeInitializationException' occurred in StackExchange.Opserver.dll but was not handled in user code.
It turns out this is a minor issue where my computer was outside the generous defaults.
Opserver assumes you want to allow open access for a local 10.x.x.x network using Active Directory, which is a safe default guess. But if you’re outside of that range, you will need to update Opserver/Config/SecuritySettings.config with your own IP range and subnet mask if you want to use this auth method.
<SecuritySettings provider="AD"> <!-- Optional, these networks can see the overview dashboard without authentication --> <InternalNetworks> <Network name="SE Internal" cidr="10.0.0.0/8" /> </InternalNetworks> </SecuritySettings>
Here is an example that would work for a computer at 192.168.0.10 in the other private range:
... <InternalNetworks> <Network name="Main Office" cidr="192.168.0.0/24" /> </InternalNetworks> ...
Then save the config file with out the .example suffix and rebuild the project. At that point the build worked for me.
Since I left the default Active Directory (AD) security provider, a valid AD Login is required to continue. If you prefer no password, then you should replace “AD” with “alladmin” in SecuritySettings.config, then you can enter anything into the username / password box.
It works, so installation is a “snap”. But until we adjust the configuration files all we will see is a blank white screen.
So in the next post, I will look at adding a SQL server to the monitoring configuration.
Note for those new to building ASP.NET MVC projects
As the application targets ASP.NET 4.5, I recommend Visual Studio 2012 or 2013 Professional to open the Opserver ‘solution project’. VS 2010 Web Express does not appear to be compatible with the project, I have not tested 2012 Express.
The project should build and run locally on your workstation with no issues. Deploying the project an IIS web server the first time can be tricky as you need to ensure the right dependencies are deployed onto IIS. That is beyond the scope of this post.