ajaxpro ajaxMethod Error:
今天项目开发过程中,偶然发现了ajaxpro报错 This method is either not marked with an AjaxMethod or is not availab
在google了半天后,终于发现一个解决方案
How to prevent System.NotSupportedException: This method is either not marked with an AjaxMethod or is not available
在曾在谷歌有关System.NotSupportedException一批又改变App_Code文件夹中的文件进行讨论。 The was a discussion at the Google group about the System.NotSupportedException after changing files in App_Code folder. 由于没有固定的App_Code文件夹,将在每一个“重建”一个新名称,将看起来很奇怪的生成assmebly名称。 As there is no static assmebly name for the App_Code folder it will generated on each "rebuild" a new name that will look like very strange. 该程序集的名称是用于任何AjaxPro的呼吁,这将是一个问题,在不久之后的JavaScript包装发送给客户端的名称更改。 The name of the assembly is used for any AjaxPro call and this will be a problem when the name changes after sending the JavaScript wrapper to the client.
为了避免这种情况有一个Web.config中指定类型映射选项。 To prevent this there is an option in web.config to specify type mappings. 见下面的例子: See the example below:
<ajaxNet> <ajaxNet>
<ajaxSettings> <ajaxSettings>
<urlNamespaceMappings> <urlNamespaceMappings>
<添加type=" Namespace.Classname,AssemblyName“path=" mypath中 "/> <add type=" Namespace.Classname,AssemblyName " path=" mypath "/>
“/ urlNamespaceMappings” </urlNamespaceMappings>
“/ ajaxSettings” </ajaxSettings>
“/ ajaxNet” </ajaxNet>
如果你现在使用的App_Code文件夹中,您可以使用您的程序集名称App_Code文件的方法: If you are now using methods in your App_Code folder you can use App_Code as your assembly name:
<ajaxNet> <ajaxNet>
<ajaxSettings> <ajaxSettings>
<urlNamespaceMappings> <urlNamespaceMappings>
<添加type=" Namespace.Classname,App_Code“path=" mypath中 "/> <add type=" Namespace.Classname,App_Code " path=" mypath "/>
“/ urlNamespaceMappings” </urlNamespaceMappings>
“/ ajaxSettings” </ajaxSettings>
“/ ajaxNet” </ajaxNet>
这将迫使AjaxPro使用短名称每次而不是默认的程序集名称的变化。 This will force AjaxPro to use the short name everytime instead of the changing assembly name by default.
转载于:https://www.cnblogs.com/underwing/archive/2009/12/16/1625578.html
ajaxpro ajaxMethod Error:相关推荐
- ASP.Net中实现Ajax的几种实现方法之AjaxPro的使用(一) [AjaxPro.AjaxMethod]
原文地址 1.什么是Ajax Ajax是异步Javascript和XML(Asynchronous JavaScript and XML)的英文缩写."Ajax"这个名词的发明人是 ...
- 如何在AjaxPro.net的AjaxMethod中使用session和cookie
添加一个AjaxPro.HttpSessionStateRequirement 枚举的值到你的AjaxPro.AjaxMethodAttribute中. 例如: [AjaxPro.AjaxMethod ...
- 有关ajaxpro中的AjaxMethod
这是个后台的方法: [AjaxPro.AjaxMethod] public string Fun(string str) { retu ...
- AjaxPro.Utility.RegisterTypeForAjax()的作用 AjaxPro第三方控件
语句的作用:页面注册方法的作用. AjaxPro.Utility.RegisterTypeForAjax(typeof(命名空间.类名)); RegisterTypeForAjax代码应用演示: De ...
- AjaxPro的AJAX示例
前几天突然发觉项目中的一些功能用AJAX来实现会提升运行速度和稳定性,因此了解了一下AJAX,从网络上找了一个例子,形成了我的一个Project,并且调试通过,现共享给大家,由于对AJAX不怎么了解, ...
- AJAX使用总结(Ajaxpro框架)
AJAX使用总结(Ajaxpro框架) 1.AJAX的异步调用产生的强烈UI体验,是否也曾令你惊叹,我也是用的不亦乐乎.AJAX调用经常会用在客户端前台从服务器端得到信息的一种手段,常常我们会连续多次 ...
- Vs.net2008 下 Ajaxpro 使用
简单介绍下它的用法: 一.AjaxPro的使用 1.在项目中添加引用,浏览找到AjaxPro.2.dll文件 2.在Web.config中的system.web里面写入以下代码 </config ...
- AjaxPro组件的应用(实现Ajax)
1.首先在页面初始化事件Page_Load(object sender, EventArgs e)中注册编写的类 protected void Page_Load(object sender, Eve ...
- AjaxPro.2.dll在VS2005使用中的基本使用
个人常用的东西收集起来,也给大家一起分享哈.AjaxPro.2.dll在VS2005使用中的基本使用,下面介绍了基本的配置和最简单的使用方法 AJAX不用说大家都明白,不明白的请百度或Google一下 ...
最新文章
- 《预训练周刊》第34期:使用图像级监督检测两万个类别、BigScience寻求建立强大的开放语言模型...
- 【Rollo的Python之路】Scrapy Selector选择器的学习
- python术语中英对照栈图_Python常用技术栈总结
- VTK:图片之ImageImport
- 那个学完这个小程序创业课程的小白现在月入17万
- 安装指定版本pytorch_Ubuntu16.04安装pytorch(七)
- 现代软件工程讲义 3 代码规范与代码复审
- 2019届互联网校招本科薪酬清单
- 52个有效方法(1) - 了解Objective-C语言的起源
- S3C DMA使用方法,2410-2440 dma介绍
- python的random模块怎么写_Python常用标准库之random模块
- CAM是利用计算机,利用DroidCam将手机摄像头打造成计算机摄像头
- 8种开源情报(OSINT)工具简介
- 程序员修炼之道关键点总结和个人感悟
- 这个编辑器居然号称快如闪电!
- 最大面额钞票10的21次方
- python加减乘除求余
- Redis(设置失效时间,RedisDesktopManger远程管理工具)
- 证明:无理数的无理数次方是否还是无理数
- Oracle数据库之表空间(tablespace)---面试再也不害怕系列之一