.net网站上传后打开出现错误

来源:百度知道 编辑:UC知道 时间:2024/05/22 20:14:58
Server Error in '/' 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: 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: 以标识传入的用户。
Line 35: -->
Line 36: <authentication mode="Passport">
Line 37:
Line 38: </authentication>

Source File: e:\net\web912199\wwwroot\tm.web\web.config Line: 36

-----------------------------------------------

在服务器发布需要对上传目录相应的读写权限,在web.config文件节点<system.web>中添加:
<system.web>
...
<identity impersonate="true" userName="administrator" password="123456"/>
...
<system.web>
即可。

把你这句
<authentication mode="Passport">
改成这样,或许能吧!
<authentication mode="Windows"/>