Issues installing HgLab

dave.nay's Avatar


08 Apr, 2013 05:03 PM

I am attempting to install HgLab on a department PC with Win7.

After configuring IIS and attempting to browse to the HgLap site to finish configuration, I receive the following errors:

++++++++++++++++++++++++++++++++++++++++++++++++++++ Server Error in '/HgLab' Application.

Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\rak5c2ns.0.cs' could not be found
error CS2008: No inputs specified

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.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\rak5c2ns.0.cs' could not be found
error CS2008: No inputs specified

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:

[InvalidOperationException: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\Windows\TEMP\rak5c2ns.0.cs' could not be found
error CS2008: No inputs specified
] System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) +1024 System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) +1997 System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace) +149 System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) +549 System.Xml.Serialization.XmlSerializer..ctor(Type type) +6 NHibernate.Cfg.Configuration..cctor() +64

[TypeInitializationException: The type initializer for 'NHibernate.Cfg.Configuration' threw an exception.] NHibernate.Cfg.Configuration.Reset() +336 NHibernate.Cfg.Configuration..ctor(SettingsFactory settingsFactory) +55 NHibernate.Cfg.Configuration..ctor() +22 HgLab.Core.Configuration.Modules.PersistenceModule.Load(ContainerBuilder moduleBuilder) in d:\Projects\hglab\src\HgLab.Core\Configuration\Modules\PersistenceModule.cs:42 Autofac.Module.Configure(IComponentRegistry componentRegistry) +70 Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules) +119 Autofac.ContainerBuilder.Build(ContainerBuildOptions options) +53 octalforty.Structural.ComponentModel.ServiceProviderFactory.BuildServiceProvider() in D:\Projects\octalforty-structural\src\octalforty.Structural\ComponentModel\SerivceProviderFactory.cs:46 octalforty.Structural.Framework.Web.MvcApplication.InitializeApplication() in D:\Projects\octalforty-structural\src\octalforty.Structural\Framework\Web\MvcApplication.cs:90 HgLab.MvcApplication.InitializeApplication() in d:\Projects\hglab\src\HgLab\Global.asax.cs:198 octalforty.Structural.Framework.Web.MvcApplication.Application_Start() in D:\Projects\octalforty-structural\src\octalforty.Structural\Framework\Web\MvcApplication.cs:134

[HttpException (0x80004005): The type initializer for 'NHibernate.Cfg.Configuration' threw an exception.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9171885 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): The type initializer for 'NHibernate.Cfg.Configuration' threw an exception.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090988 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


Any assistance is greatly appreciated (I am not an IIS guru so I am betting I have something configured wrong.)

I initially tried setting HgLab up as a Web Site in IIS and received this error, then I switched to a Virtual Directory and I still ahve the same issues.

Thank you!

  1. Support Staff 1 Posted by Anton Gogolev on 09 Apr, 2013 10:15 AM

    Anton Gogolev's Avatar


    This is a permission issue, when the user account your AppPool is running under doesn't have rights to write to %temp% folder. What you can do is first try consulting Event Viewer to see if it has a username trying to access temp folder. Next you can either grant write permission to that user explicitly or run aspnet_regiis for it to fix everything up.

    If nothing helps, I'm always available for a TeamViewer session to help you out.

  2. Anton Gogolev closed this discussion on 09 Apr, 2013 10:15 AM.

  3. dave.nay re-opened this discussion on 09 Apr, 2013 01:29 PM

  4. 2 Posted by dave.nay on 09 Apr, 2013 01:29 PM

    dave.nay's Avatar

    Thanks Anton,

    That information got me a little further. :-)

    Now I am having troubles accessing the HgLab. I was able to create the administrative user, but when I tr to log in, it constantly redirects me to the signin page.

    The HgLab log file contains the following entry each time I try to log in:

    HgLab.Core.Framework.Security.AuthenticationModule - catching 401 and redirecting to signin url '/signin?to=%252fdashboard'

    Clearly I am not grasping some simple concept here regarding permissions.


  5. Support Staff 3 Posted by Anton Gogolev on 09 Apr, 2013 01:50 PM

    Anton Gogolev's Avatar


    Which version of IIS are you using? What is the exact URL of your
    HgLab instance?

  6. 4 Posted by dave.nay on 09 Apr, 2013 02:00 PM

    dave.nay's Avatar


    I am using IIS7 (Add/Remove Windows components on WIN7 x64)

    I Installed HgLab files to C:\HgLab and configured a virtual directory in IIS (promoted to application).

    The URL is not visible outside our network, but I do have TeamCity available.


  7. Support Staff 5 Posted by Anton Gogolev on 09 Apr, 2013 02:18 PM

    Anton Gogolev's Avatar


    What I'm after is the actual URL of your HgLab installation. There was a bug where if the domain name has less than two dots in it you couldn't sign in to HgLab.

    Try replacing files in c:\hglab\bin with these two to see if you're able to sign in.

  8. 6 Posted by dave.nay on 09 Apr, 2013 02:24 PM

    dave.nay's Avatar


    I am accessing the server via just the host name, so it is not a FQDN, and thus there were no dots in the server URL at all.

    I have copied the two files you provided and I am now into the HgLab application where it is showing me the Healthcheck Errors on the dashboard.


  9. Support Staff 7 Posted by Anton Gogolev on 09 Apr, 2013 02:46 PM

    Anton Gogolev's Avatar


    Well, no dots is less than two dots, hence the bug :)

    Healthcheck errors are fine: you need to go to /administration and tell HgLab where to keep Mercurial repositories (the "Repositories" section). Set Repositories and Index directories to somewhere outside of c:\hglab (and where HgLab has write permissions) and you're good to go.

  10. Anton Gogolev closed this discussion on 26 Apr, 2013 10:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM
21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM


18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM