Author: Sweeperq | Posted on: 1/14/2010 4:26:47 PM | Views : 461

I'm trying to create a web app using .Net + NHibernate in a medium trust environment.  Everything is working well in VWD Express (aside from lazy loading), but when I access from IIS I am getting FileIOPermission errors when I add the App_Code directory to the nHibernate configuration.  I downloaded the source for the nHibernate configuration class to look at what is going on internally when I add the App_Code directory; all it is doing is attempting to loop through the App_Code folders to find the class mappings (<className>.hbm.xml) and read those [using the DirectoryInfo and FileInfo classes].
I've given full control of my application directory and all subdirectories [and files] to the "IIS AppPool\DefaultAppPool" identity, but it still does not work.  When I change the identity for the app pool to "Network Service" and grant that identity full control, it works perfectly fine.
While th ...

Go to the complete details ...