DotNetNuke SecurityException AspnetHostingPermission
Yesterday I was setting up DotNetNuke for a designer on a computer at a corporate location so that he could start working on CSS for some of our custom modules. He had an earlier version of DNN installed, so you’d think that it would “just work” but there seems to be a new module or something going on that caused the AspnetHostingPermission exception to get thrown so that we couldn’t even run the web site.
I hate setting up development computers at corporate locations. Everything that works fine for me always seems to take just as long if not longer to set up there (wherever “there” is.)
There is a simple fix to this error. Go into the IIS manager and select the AppPool that your web app is using. Click the “Advanced Settings” link that you’ll find on the right-hand panel.
In the new dialog that shows up, you’ll see “Process Model” > “Identity”. Change that identity to “NetworkService” and OK out.
Everything SHOULD work now. At least it did for me.
Other post in DotNetNuke - Module Development
- Creating DotNetNuke Modules - May 20th, 2008
- Creating DNN Modules - The Tools - May 22nd, 2008
- DotNetNuke Modules - Foundational Concepts - May 26th, 2008
- DotNetNuke Modules - Install DNN into VS 2008 - May 27th, 2008
- DotNetNuke Modules - Creating Base Modules - May 28th, 2008
- DotNetNuke Modules - Registering Your Module - May 29th, 2008
- DotNetNuke Modules - Where Stuff Shows Up - June 3rd, 2008
- DotNetNuke Modules - Benefits of Architecture - June 4th, 2008
- DotNetNuke Modules - Anatomy of the View - June 9th, 2008
- DotNetNuke Modules - Adding Actions - June 11th, 2008
- DotNetNuke Modules - DNN Controls - Label - June 18th, 2008
- DotNetNuke - Internationalization - June 25th, 2008
- DotNetNuke Modules - Internationalization (part 2) - June 30th, 2008
- DotNetNuke Modules - Labels w/ no Help - July 9th, 2008
- DotNetNuke Modules - LinkButtons - July 14th, 2008
- DotNetNuke Modules - Collapsible Panels - July 16th, 2008
- DotNetNuke - The Data Layer - Installing CodeSmith - July 22nd, 2008
- DotNetNuke - Modules - Creating The Tables - July 24th, 2008
- DotNetNuke - Modules - Creating Stored Procs - July 29th, 2008
- DotNetNuke - Modules - Portal Specific Modules - July 31st, 2008
- DotNetNuke Modules - Data Access Layer - August 5th, 2008
- DotNetNuke Modules - Data Access Layer - August 7th, 2008
- DotNetNuke - Data Access Layer Alternative - August 12th, 2008
- DotNetNuke - Modules - Linking within the module - August 14th, 2008
- DotNetNuke - Make Your Module Searchable - August 19th, 2008
- DotNetNuke Modules - Making Content Portable - August 25th, 2008
- DotNetNuke Modules - Exceptions the DNN Way - September 2nd, 2008
- DotNetNuke Modules - PortalModuleBase - September 4th, 2008
- DotNetNuke Modules - Inter Module Communication - September 9th, 2008
- DotNetNuke Modules - Finding The Page a Module is On - September 15th, 2008
- DotNetNuke Modules - Caching - September 17th, 2008
- DotNetNuke Modules - Module Settings - September 22nd, 2008
- DotNetNuke Modules - Retrieving Settings - September 24th, 2008
- DotNetNuke Modules - Advanced Architecture - October 20th, 2008
- DotNetNuke Modules - Creating the PA - October 30th, 2008
- DotNetNuke Modules - Automating the PA - November 5th, 2008
- DotNetNuke - FileUploadControl Danger! - February 26th, 2009
- DotNetNuke SecurityException AspnetHostingPermission - October 14th, 2009
Other Related Items:
Professional DotNetNuke 5: Open Source Web Application Framework for ASP.NET (Wrox Programmer to Programmer)DotNetNuke creator Shaun Walker leads this superlative author team of MVPs while delivering the latest update of a bestseller. They offer complete cov... Read More >
Professional DotNetNuke Module Programming This book was written to provide insight into the development techniques needed (and the options available) to work within the DotNetNuke f... Read More >
DotNetNuke 5 User's Guide: Get Your Website Up and Running (Wrox Programmer to Programmer)An authoritative introduction to implementing DotNetNuke Web sites, by experienced DotNetNuke implementers and trainers
An impressive aut... Read More >










I have ran into this issue a LOT with windows 7 and windows 2008. My fixes for it are basically to ensure that the App Pool user account belongs to IIS_IUSRS group and and to grant the IIS_IUSRS group RWX privileges on the site directory. For DNN, I grant Full privileges.
While it “works”, I wouldn’t do that on a production server. Sounds like a security risk to me.