Configuration Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I have installed nopCommerce 1.90 on my test server, a Windows 2008 Web server running IIS 7. I have configured the application as an Net 4.0 application. When I try to run the application in a web browser i receive the following error:

----------------------------------
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: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 34:       </assemblies>
Line 35:     </compilation>
Line 36:     <authentication mode="Forms">
Line 37:       <forms name="NOPCOMMERCE.AUTH" loginUrl="~/login.aspx" protection="All" timeout="43200" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="~/default.aspx" enableCrossAppRedirects="false" />
Line 38:     </authentication>


Source File: D:\inetpub\wwwroot\nopCommerce 1.90\nopcommercestore\web.config    Line: 36

----------------------------------
This topic/error have been discussed in a number of postings. I think I have read then all and carefully followed all instructions and tips. However, I still receive the Configuration Error.

I have a number of applications running on the same test server. All in Net 4.0 without any problem.

I have apparently missed something critical about installing nopCommerce 1.90

I can open my test server for anyone with knowledge on how yo correct the problem.

Looking forward for some help.

Lennart Hoglund
13 years ago
Hi Lennart,

This error can occur (one of the reasons! ) if you have a duplicate web.config file in one of your folders - can you have a look to see if this is the case

if you can't get to the bottom of it  quickly,  it might also be worth trying a fresh instal
13 years ago
Hi Haydie,

Thanks for your tips. Yes, I had multiple web.config files in my nopCommerce folders.

I installed nopCommerce by adding a virtual directory to my Default Web Site (IIS 7.5), with a physical path pointing to a folder containing all nopCommerce files and folders. I then converted the virtual directory to an application. When I tried to browse the application (right clicking the application in IIS, clicking on Manage Application and then clicking on Browse)  I received a message telling me that there was no Default Document and the directory could not be browsed. I added a Default Document by using IIS tools. This action created a new web.config file in the physical paths root folder. The web.config file in the NopCommerceStore folder was not affected.

I usally test new applications by adding a virtual directory to my Default Web Site allowing me to opening them in a browser using for example the following address: www.lewab.com/nopCommerce.

I removed the "extra" web.config file and added manually the nessesary lines for the default document in the web.config file in the NopCommerceStore folder. I tried to browse the application but the result was the same as before:

"Configuration Error - Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS"

I will now try your recommendation by using a "clean" new installation. This time I will add a new Web Site to my server. I am hoping this will work. Maybe nopCommerce can not run in a virtual directory/application in a Web site?

Thanks,
Lennart Hoglund
13 years ago
Eureka!

Installing nopCommerce in/using ISS 7.5 works fine (at least in my case) if it is done the following way:

1. Download the complete nopCommerce package in a folder anyware on your server and run the installation.
2. Open the IIS Manager.
3. Add a new Application pool  and be sure to select  .NET Framework version v.4 and Pipeline mode Integrated.
4. Add a new Web site. Select the Application pool you created. Select the Physical path where you downloaded the   complete nopCommerce package.
5. Click to expand the newly created Web site.
6. Right click on the NopCommerceStore folder and click on Convert to Application.
7. Right click on the newly created application (NopCommerceStore) and select Browse!
8. The nopCommerce application opens smootly (at least on my server).

Im am sure there a more ways to install the nopCommerce application. Anyway, this worked for me. The key thing is to convert the NopCommerceStore folder to an application.

Good luck,
Lennart Hoglund
13 years ago
glad you got there Lennart !
13 years ago
I have exactly the same error when I attempt to run nopCommerce 1.9 from Webmatrix, but not from VS2010.  

Here is what I did:

I opened the complete nopCommerce 1.9 solution in Visual Studio (VS)2010 and then ran the debugger.  The first time I did this nopCommerce ran the setup program.  I went through the installation and nopCommerce runs fine if I debug through VS2010.  I can also rebuild and extend it fine through VS2010.  

When I open and attempt to run nopCommerce in WebMatrix though,  I get the identical error to Lenart.   The default.aspx is in the nopCommerceStore folder and there are no duplicate default folders.  Is there a way to fix this so nopCommerce 1.9 will run in both VS2010 and WebMatrix.  Does anyone have an idea what the problem is?  

If anyone has any advice, it would be appreciated.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.