Web.config error IIS 7.5 .NET 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
nopCommerce 1.80 unchanged
Windows Server 2008
SQL Server 2008 R2
IIS 7.5
.NET 4.0

HTTP Error 500.19 - Internal Server Error
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".  

Config Source:
129:
130:     <handlers>
131:       <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

This is a hosted server but I also tested this locally on a Windows 7 machine running SQL Server 2008 R2, IIS 7.5 and got the same results.

Can someone please share a functional web.config that works on IIS 7.5 .NET 4.0? If not, tell me what they did to make it work?

Thank you
13 years ago
Hi Chuck,

If you uploaded nopCommerce to your host then I would say this might be a problem with the location of your files.  The error suggests that you have your files not in the root virtual directory set up by your host.  Some hosts will setup your directories in strange ways.  Example:

www.yourdomain.com/ -- This would be a logic root domain to install nopCommerce into.
www.yourdomain.com/webfiles/ -- I have seen this before.  Sometimes this means the root is webfiles sometimes it does not.

Find out from your host where your root directory is.

If this is not the case then I would double check the permissions on your root directory.

Try these and see if this helps.
13 years ago
Thanks Trevor.

On the hosting server the app folders and files are in the root. On my local machine I have purposely placed them in a sub-folder called store. Accessing it with http://medomain.com/store should work.

I've checked permissions on both machines and do not see an issue.

The perplexing thing is, it runs fine from within Visual Web Developer. I'm missing something but I have no idea what it is...that's why I'm missing it.

When I attempt to open the modules editor in IIS Manager I get the same error.

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Have you installed 1.8 on a similar configuration?
13 years ago
I don't usually use subfolders.  Some of this may be obvious but let's eliminate some things.

Let's work with your local installation and I don't mean the VS cassini service.

Typically all of the virtual web folders are located @ C:\inetpub\wwwroot\.  Everything that you place in this folder would be part of http://localhost

If you wanted to create a virtual directory called 'store'. Then you would create a folder in wwwroot and place all of your nopCommerce files in this folder.   In IIS you would see this folder as a folder icon.  Right click the folder and select 'convert to application'.

When you type in http://localhost/store you should get your site or the installation screen if your site isn't set up.

If you create a folder in wwwroot called 'nopCommerce' and then created a subfolder called 'store' and placed your nopCommerce files in the 'store' folder you are going to have problems.  So when you say 'Accessing it with http://medomain.com/store should work.', that is not necessarily true.

I don't want to mix up the 2 different scenarios but they are essentially the same.  http://mydomain.com is the same thing as http://localhost.  IIS needs to have the web.config stored in the root location in both of these examples.  What it appears you are doing is adding a subfolder called 'store' and placing everything in this folder.  IIS is confused because it expects to find the web.config file in the parent of 'store'.  

What you are trying to do is possible  but you would need to setup IIS to point to your sub folder as the root folder.  I'm guessing you are just trying to do some testing on a subdomain and not expose your main address to the testing you are conducting.  Trust me, do all your testing on localhost.  Everything will work when you are ready to go live.  It just all needs to go into the root folder.

Confirm these steps I listed and if you still have problems then we can at least eliminate this part.
13 years ago
I had set up "store" as an application in IIS but to be sure it wasn't something else, I've moved all of application folders and files to wwwroot. I removed "store" from IIS. When I use http://localhost I get the same error as before.

Chuck
13 years ago
These forums are always hard to get the root of the problem.  Let's try this.

1. In wwwroot create a new folder called 'nop'.
2. Place or publish a clean version of nopCommerce into the 'nop' folder.
3. Double check your permissions for this folder.(It appears you have a good understanding of how to do this).
4. In IIS open your default web site from the tree folder and then on the 'nop' folder, right click and select 'convert to application'.
5. Make sure that your application pool is set to something equaled to asp.net 4.0 (let me know if you get stuck here).

In your browser type in http://localhost/nop

You should get the installation page.

Let me know how it goes.  I am watching college football and knocking a few back so I'm not going anywhere.
13 years ago
Hope your team wins, you deserve it for helping.

I very carefully went through each step, verifying along the way.

Same result.

By the way, when I installed this locally on a Win XP Pro machine -IIS 5.5 it worked fine with no change. That's why I've stressed the versions of OS and IIS I'm running.


Chuck
13 years ago
hmmm.

Let me look at your error a bit more.  Personally I have never seen this type of error.

Give me a few minutes.
13 years ago
Hey Chuck,

Do me a favor while I'm poking around.  Goto control panel click on add/remove programs-->Windows features(I forget what it's called).  Under IIS AND ASP.net make sure that every feature is checked (you have to open them up and check each one individually).  

I haven't done a one-to-one error test for each of the features in this section but I have found that if you don't have everything enabled, weird errors start popping up.

t
13 years ago
No problem. Take your time.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.