在3.0中要求在web.config文件中写入这样一段<httpHandlers>
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
</httpHandlers>我的web项目编译,并在本地发布后,测试发现没有问题,但是上穿到服务器后发现不能正确运行,提示freetextbox没有正确安装,FtbWebResource.axd必须写入web.config文件中。但是我的web.config文件中已经添加了这一段,为什么呢?
希望各位达人帮忙
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
</httpHandlers>我的web项目编译,并在本地发布后,测试发现没有问题,但是上穿到服务器后发现不能正确运行,提示freetextbox没有正确安装,FtbWebResource.axd必须写入web.config文件中。但是我的web.config文件中已经添加了这一段,为什么呢?
希望各位达人帮忙
Method Name Description
ProcessRequest Used o call Http Requests.
IsReusable To check the reusability of same instance handler with a new request of same type. Configuring HTTP Handlers
The <httpHandlers> configuration section handler is responsible for mapping incoming URLs to the IHttpHandler or IHttpHandlerFactory class. It can be declared at the computer, site, or application level. Subdirectories inherit these settings.Administrators use the <add> tag directive to configure the <httpHandlers> section. <Add> directives are interpreted and processed in a top-down sequential order. Use the following syntax for the <httpHandler> section handler:<httpHandlers>
<add verb="[verb list]" path="[path/wildcard]" type="[COM+ Class], [Assembly]" validate="[true/false]" />
<remove verb="[verb list]" path="[path/wildcard]" />
<clear />
</httpHandlers> Creating HTTP Handlers
To create an HTTP handler, you must implement the IHttpHandler interface. The IHttpHandler interface has one method and one property with the following signatures:
void ProcessRequest(HttpContext);
bool IsReusable {get;}
我的web.config里面是这么写的————<!-- FreeTextBox设置。 -->
<pages pageBaseType="System.Web.UI.Page" />
<httpModules>
<clear />
</httpModules>
<httpHandlers>
<add verb="GET"
path="FtbWebResource.axd"
type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
</httpHandlers>
webconfig里那么写的原理是,首相iis会把.axd的文件handle,然后就交给FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox这个命名的类来处理而不是让aspnet去处理。但是你的服务器提供商可能为了安全起见,把.axd到aspnet_isapi.dll的映射去掉了,所以你在服务器运行就错误了。你现在唯一能做的就是联系你的服务器提供商,让他们恢复这个映射。
明白你的意思。服务器确实没有这个映射。但是现在加上了还是不行