sharepoint webpart开发中遇到的问题 This type of page is not served.

本文解决了在wpresources文件夹下的ASPX页面加载时出现的ServerError问题,通过修改web.config文件中的httpHandlers配置来允许ASPX页面的正常加载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  在做webpart,开发的页面放在wpresources文件夹下,当打开后缀aspx页面时,当时就是这样的:

Server Error in '/' Application.

This type of page is not served.

Description: The type of page you have requested is not served because it has been explicitly forbidden.  The extension '.aspx' may be incorrect.   Please review the URL below and make sure that it is spelled correctly.



苦闷了一天,在web.config文件里辗转了差不多一天。
也不扯蛋了。发现原因在wpresources里面的web.config文件。
<httpHandlers>

            
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            
<add verb="*" path="*.ashx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            
<add verb="*" path="*.asmx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            
<add verb="*" path="*.aspx" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />          
        
</httpHandlers>

最后还是把wpresources文件夹下的web.config干掉了。

转载于:https://www.cnblogs.com/denglinhai/archive/2008/03/11/1100233.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值