托管配置错误 [英] Configuration error in hosting

查看:131
本文介绍了托管配置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用c#编写的服务器,我在这个网站上的主机上传文件:somee.com

现在我收到这个错误,我不知道问题出在哪里和它有什么关系



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 





我尝试了什么:



i检查类似的错误,而非解决方案的工作原理我,有人可以帮我吗?我是新来的



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

推荐答案

看起来您只是创建了一个名为jsonwebservice的文件夹并将您的代码放入其中。很遗憾,你无法嵌套像这样的网站。 jsonwebservice不被视为自己的站点,它被视为父站点内的文件夹,因此当您将web.config放在该文件夹中时,不允许这样做,因为web.config需要位于站点的根目录下。



您需要将jsonwebservice文件夹配置为虚拟目录(可以通过IIS管理工具执行此操作),告诉IIS该文件夹确实是嵌套网站,而不仅仅是主网站的子文件夹。
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.


这篇关于托管配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆