Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a server written with c# that I uploaded the files on a host in this website:somee.com
now i'm getting this error that i don't know where the problem is and what is it related to

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: 

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File:d:\DZHosts\LocalUser\atefeh1995\www.JSONWebService.somee.com\jsonwebservice\web.config   Line: 44 


What I have tried:

i check the similar error and non of the solutions worked for me,could anybody help me with it? i'm new at this
Posted
Updated 6-Jul-17 1:24am

1 solution

It looks like you have simply created a folder called jsonwebservice and put your code inside it. Unfortunately you can't nest websites like this. jsonwebservice is not seen as its own site, it is seen as a folder inside the parent site, so when you put your web.config in that folder it isn't allowed as the web.config needs to be at the root of the site.

You need to configure your jsonwebservice folder as being a Virtual Directory (you can do this via the IIS admin tool), that tells IIS that the folder is indeed a nested site and not just a sub-folder of the main site.
 
Share this answer
 
Comments
Richard Deeming 6-Jul-17 8:48am    
You'd need to configure it as an application; a virtual directory won't do it.
F-ES Sitecore 6-Jul-17 9:23am    
I meant if you wanted to keep it as a sub item of the main site.
Richard Deeming 6-Jul-17 9:25am    
The error message in the question says the section can't be used beyond the application level. It even goes so far as to say:
"This error can be caused by a virtual directory not being configured as an application in IIS."

Moving the folder out of the site and adding a virtual directory for it won't fix that.

The solution is to make the folder an application.
F-ES Sitecore 6-Jul-17 9:44am    
It's been a while since I made one, so you could be right.
Atiiiii 6-Jul-17 9:56am    
how should i do that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900