1

I just grabbed the update for nHibernate Profiler 2 for use in development (installed via Nuget), but when ever the NHibernateProfiler.Initialize() method is called by WebActivator I get the error as shown below. Any idea why it's trying to create debugging symbols in the root of the IIS Express folder and how to stop this error from happening?

[InvalidOperationException: Unexpected error creating debug information file 'c:\Program Files (x86)\IIS Express\HibernatingRhinos.Profiler.Appender.NHibernate3Logger.PDB' -- 'c:\Program Files (x86)\IIS Express\HibernatingRhinos.Profiler.Appender.NHibernate3Logger.pdb: Access is denied.]
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.Compile(String fileName, String[] sources, List`1 assembliesToReference) +1139
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.CompileAssembly(IEnumerable`1 sourcesResources, IEnumerable`1 assembliesToReference, String assemblyName) +105
   HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.RegisterAppenderUsingNHibernateLogger() +318
   HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.WrapLogger() +54
   HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.StartNHibernateProfiling() +129
   HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(NHibernateAppenderConfiguration configuration) +45
   HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize() +53
   Data.NHibernateProfilerBootstrapper.PreStart() in c:\Development\[Project]\Data\App_Start\NHibernateProfilerBootstrapper.cs:13
Nick Albrecht
  • 16,607
  • 10
  • 66
  • 101

2 Answers2

1

Looks like v2.0.2072.0 of NHProfiler NuGet was released on Sunday. I have just got that version for one of my projects and am experiencing the same issue.

I am using full IIS 7, though, rather than express, and the directory it is trying to write to is C:/Windows/System32/inetsrv/.

For now, perhaps manually get 1.0.0.955 - it looks like there could be a new requirement for the AppPool Identity to have write privileges to that folder? (total guess).

Gary McLean Hall
  • 984
  • 7
  • 16
  • I tried to rollback to the old Nuget package but the previous version appears to have been removed, which is kind of annoying. For now I've just disabled nHibernate Profiler in my project. But you're right, I'm guessing manually downloading and referencing the last version of 1.0 should work. – Nick Albrecht Dec 04 '12 at 19:55
  • You'll have to do it from the Package Manager Console (under Tools->Library Package Manager in VS). Remove the current version and then do 'Install-Package NHibernateProfiler -version 1.0.0.955'. Just did this and it works. – Gary McLean Hall Dec 04 '12 at 20:03
0

It appears to have been fixed in the most recent version. Update nHibernate Profiler and the problem will be resolved. (at the time of this writing that's 2.0.2077.0)

Nick Albrecht
  • 16,607
  • 10
  • 66
  • 101