Here is the scenario that this post is about. You have an existing DotNetNuke (DNN). Now you have to configure a new ASP.Net web application under this site as virtual directory. So you follow the standard procedure of creating a new virtual directory under your parent DNN site and point it to the location where the new web application's files are. Try to access this site and you will run into the following error.
Server Error in '/DNN53/ProductsSearch' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: The code subdirectory '/DNN53/ProductsSearch/App_Code/IFrame/'
does not exist.
Source Error:
Line 168: -->
Line 169: <codeSubDirectories>
Line 170: <add directoryName="IFrame" />
Line 171: <add directoryName="Survey" />
Line 172: <add directoryName="XML" />
Source File: C:\Projects\DNN\DNN_V531\Install\web.config Line: 170
Now you are wondering what does these folders and files have to do anything with your web application that is hosted under DNN site. The thing that you need to understand is that when you are hosting a child application under parent ASP.Net application, it inherits web.config settings from all the parents as well. So in this case your application is inheriting DNN related settings as well. I have some one suggesting to add these missing folders in your new application as well. Next thing you will run into is that your site is complaining about missing DNN related assemblies.
The solution to this problem is not copy DNN assemblies or mimic the folder structure in your application as well. Because now you have added a very strong dependency on parent application. There is a very simple and elegant solution to this problem.
<location path="" inheritInChildApplications="false">
<system.web>
..
..
</system.web>
</location>
You can use this technique to restrict propagation on page by page or by folders etc.
How to plan CCSP Exam preparation
Develop a MongoDB pipeline to transform data into time buckets
Alert and Confirm pop up using BootBox in AngularJS
AngularJS Grouped Bar Chart and Line Chart using D3
How to lock and unlock account in Asp.Net Identity provider
2024 © Byteblocks, ALL Rights Reserved. Privacy Policy | Terms of Use