NHibernate.MappingException: Unknown entity class

If you get MappingException error, there are two things you should check out:

  • Make sure the name of the *.hbm.xml is spelled correctly — not *.hmb.xml nor *.mbh.xml
  • Make sure the Build Action property is set to “Embeded Resource.”

I learned this the hard way. First, I wrongly spelled hbm.xml and I had its Buld Action property set to “Content”. The above 2 points fixed the problem.

Credit: VerySimple, Inc


IIS7 – Cannot read configuration file due to insufficient permissions

The last time I intensively used IIS (Internet Information Services) was back in the year 2000 when I hosted a ASP site on the local Windows 2000 server. Since then, Apache has become my only friend in the web server world.

Fast forward to present day with the current job where Microsoft technology is heavily based on, it’s time for me to get back on track with “almost-everything” Microsoft.

Today, I tried to set up an Asp.net site on my local machine with IIS7, and I got the following error:

Config Error: Cannot read configuration file due to insufficient permissions
Config File: C:\Users\me\Documents\wwwroot\httpdocs\web.config

To fix this problem, we need to grant the read permission to IIS_IUSRS on ‘httdocs’ folder.

Credit: forums.asp.net