the objecthe was not the man...

For, if this were the case, the object could be said to be non-existent when that single mind was not perceiving it_2E
您要查找的是不是:
因为如果这样,当单个的心不再感知它时,就可以说对象不存在了。
如果这是真的那就别无他法
我也许说得过火,但要是果真如此,那就该怪我耳朵失灵,可不能怪我这管秃笔。
如果情况确系如此,那么俄国人就大大地错估了他们所面对的d处新班子的高明程度。
我突然想到,若真如此,我也许可以用普通的化学分析方法从矿物中将这种物质提取出来。
斯特莫假设这些恐龙的雄性与雌性拥有不同大小的神经棘。[5]如果属实,这些帆状物可能拥有耀眼的颜色,但这是完全建立于推测上的。
如果这是确实如此-为什么两种钢琴声音如此不同?
事实上,如果情况不是这样,那才异乎寻常,因为我们所认识和所期望的香港和香港人,正是如此。
这是在一九九五年推行改革前的一贯做法。
如果情况真是如此,人工智能在做出和利用市场决定上比人类做地更好会有不错的机会。
情况就是这样,我们的盟国从来没有一种推动力来促使它们对真正的区域性防务能力作出贡献。
因此,我们的世间免不了是一个不完美的世界。
现在去海外度假的人比以前多得多。
如果不是这种情况,地球就会被一个单独的球状板块所覆盖,并且不会有相对的板块运动发生。
后来我听老李说,情况并不如此。
因此,我们的世间免不了是一个不完美的世界。
这是多少年的经验了。
我的看法是,如果这是我要做的最后一件事,我想使它具有一定的价值。
索菲娅说她懂了,但事实并非如此。
如果不是以上词条,让海词编辑来提供解释
的海词问答和网友补充:
相关词典网站:eckellee's Blog
字号:大 中 小
我原先认为使用nhiberante应该没有什么问题了,虽然没有正式在项目中使用过,不过做过不少实验,而且我以前也在java中曾使用hibernate。在现在的定餐系统中,我打算真的来尝试一下这个不用自己写sql的的工具,我甚至用codesmith写了两个模版来帮助我写那些烦琐的xml配置文件。
当然,开始都很顺利,直到我开始真正的使用了多表关联之后:0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.}}" style="CURSOR: pointer" onclick=javascript:window.open(this.src); src="/UploadFiles/462792.jpg" onload="javascript:if(this.width>500){this.resized=this.style.width=500;}">
在四张表中:tbOrder(定单),tbCustomer(客户资料),tbOrderStatus(定单状态),tbRestruant(饭店)中,tbOrder分别和另三张表实现多对一关联。为了实现这样的影射,各自的配置文件:COrder.hbm.xml:
&?xml version="1.0" encoding="utf-8" ?& &hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"&&&class name="thmz.deforder.dal.po.COrder,thmz.deforder.dal" table="tbOrder"& &&&&& &&&&& &id name="orderID" column="orderID" type="Int64" unsaved-value="0"&&&&&&&&&& &generator class="identity"/&&&&&& &/id&&&&&& &!--&property name="tbOrderStatus_orderstatusID" column="tbOrderStatus_orderstatusID" type="Int64" /&--&&&&&& &!--&property name="tbRestruant_restrID" column="tbRestruant_restrID" type="Int64" /&--&&&&&& &!--&property name="tbCustomer_customerID" column="tbCustomer_customerID" type="Int64" /&--&&&&&& &property name="numperson" column="numperson" type="Int64"& not-null="false"/&&&&&& &property name="arrivetime" column="arrivetime" type="DateTime"& not-null="false"/&&&&&& &property name="ordertime" column="ordertime" type="DateTime"& not-null="false"/&&&&&& &many-to-one name="restruant"&&&&&&& column="tbRestruant_restrID"&&&&&&&&&&&& &&&&&&& not-null="false"&&&&&&& class="thmz.deforder.dal.po.CRestrauant,thmz.deforder.dal"&&&&&&& cascade="all"&&&&&&& outer-join="auto"&&&&&&& update="true"&&&&&&& insert="true"&&&&&&& /&&&&&& &many-to-one name="customer"&&&&&&& column="tbCustomer_customerID"&&&&&&&&&&&& &&&&&&& not-null="false"&&&&&&& class="thmz.deforder.dal.po.CCustomer,thmz.deforder.dal"&&&&&&& cascade="all"&&&&&&& outer-join="auto"&&&&&&& update="true"&&&&&&& insert="true"&&&&&&&&& /&&&&&& &many-to-one name="orderstatus"&&&&&&& column="tbOrderStatus_orderstatusID"&&&&&&&&&&&& &&&&&&& not-null="false"&&&&&&& class="thmz.deforder.dal.po.COrderStatus,thmz.deforder.dal"&&&&&&& cascade="all"&&&&&&& outer-join="auto"&&&&&&& update="true"&&&&&&& insert="true"&&&&&&&&& /&&&/class&&/hibernate-mapping&
COrderStatus.hbml.xml
&?xml version="1.0" encoding="utf-8" ?& &hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"&&&class name="thmz.deforder.dal.po.COrderStatus,thmz.deforder.dal" table="tbOrderStatus"& &&&&& &&&&& &id name="orderstatusID" column="orderstatusID" type="Int64" unsaved-value="0"&&&&&&&&&& &generator class="identity"/&&&&&& &/id&&&&&& &property name="statusdescription" column="statusdescription" type="String"& not-null="false"/&&&&&& &property name="statusname" column="statusname" type="String"& not-null="false"/&&&&&& &property name="state" column="state" type="Int32"& not-null="false"/&&&&&& &bag name="ordercollection" inverse="true" table="tbOrder" cascade="all"&&&&&&&& &key column="tbOrderStatus_orderstatusID" /&&&&&&&& &one-to-many class="thmz.deforder.dal.po.COrder,thmz.deforder.dal" /&&&&&& &/bag&&&/class&&/hibernate-mapping&
CCustomer.hbm.xml
&?xml version="1.0" encoding="utf-8" ?& &hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"&&&class name="thmz.deforder.dal.po.CCustomer,thmz.deforder.dal" table="tbCustomer"& &&&&& &&&&& &id name="customerID" column="customerID" type="Int64" unsaved-value="0"&&&&&&&&&& &generator class="identity"/&&&&&& &/id&&&&&& &property name="phone" column="phone" type="String"& not-null="false"/&&&&&& &property name="name" column="name" type="String" /&&&&&& &property name="mobile" column="mobile" type="String"& not-null="false"/&&&&&& &property name="discountcardno" column="discountcardno" type="String"& not-null="false"/&&&&&& &property name="points" column="points" type="Int64" /&&&&&& &property name="membertypeID" column="membertypeID" type="Int64"& not-null="false"/&&&&&& &property name="notes" column="notes" type="String"& not-null="false"/&&&&&& &bag name="ordercollection" inverse="true" table="tbOrder" cascade="all"&&&&&&&& &key column="tbCustomer_customerID" /&&&&&&&& &one-to-many class="thmz.deforder.dal.po.COrder,thmz.deforder.dal" /&&&&&& &/bag&&&&&& &bag name="phonecollection" inverse="true" table="tbPhones" cascade="all"&&&&&&&& &key column="customerID" /&&&&&&&& &one-to-many class="thmz.deforder.dal.po.CPhones,thmz.deforder.dal" /&&&&&& &/bag&&&/class&&/hibernate-mapping&
CRestruant.hbm.xml
&?xml version="1.0" encoding="utf-8" ?& &hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"&&&class name="thmz.deforder.dal.po.CRestrauant,thmz.deforder.dal" table="tbRestruant"& &&&&& &&&&& &id name="restrID" column="restrID" type="Int64" unsaved-value="0"&&&&&&&&&& &generator class="identity"/&&&&&& &/id&&&&&& &property name="fax" column="fax" type="String"& not-null="false"/&&&&&& &property name="name" column="name" type="String"& not-null="false"/&&&&&& &property name="phone" column="phone" type="String"& not-null="false"/&&&&&& &property name="establish" column="establish" type="DateTime" /&&&&&& &property name="areazone" column="areazone" type="String"& not-null="false"/&&&&&& &property name="description" column="description" type="String" /&&&&&& &property name="timeopen" column="timeopen" type="String"& not-null="false"/&&&&&& &property name="timeclose" column="timeclose" type="String"& not-null="false"/&&&&&& &property name="paymentmethod" column="paymentmethod" type="String"& not-null="false"/&&&&&& &property name="address" column="address" type="String"& not-null="false"/&&&&&& &property name="envdescription" column="envdescription" type="String"& not-null="false"/&&&&&& &property name="discount" column="discount" type="String"& not-null="false"/&&&&&& &property name="avgspending" column="avgspending" type="Int64" /&&&&&& &property name="points_all" column="points_all" type="String" /&&&&&& &property name="points" column="points" type="Int32" /&&&&&& &property name="category" column="category" type="String"& not-null="false"/&&&&&& &property name="mainusage" column="mainusage" type="String"& not-null="false"/&&&&&& &property name="order_total" column="order_total" type="Int64" /&&&&&& &property name="lastevent_date" column="lastevent_date" type="DateTime"& not-null="false"/&&&&&& &property name="isvisible" column="isvisible" type="Int32" /&
&&&&& &bag name="foodcollection" inverse="true" table="tbFoods" cascade="all"&&&&&&&& &key column="restrID" /&&&&&&&& &one-to-many class="thmz.deforder.dal.po.CFoods,thmz.deforder.dal" /&&&&&& &/bag&&&&&& &bag name="ordercollection" inverse="true" table="tbOrder" cascade="all"&&&&&&&& &key column="tbRestruant_restrID" /&&&&&&&& &one-to-many class="thmz.deforder.dal.po.COrder,thmz.deforder.dal" /&&&&&& &/bag&& &/class&&/hibernate-mapping&
这个影射也是很平常的,各实体类我也不在具体写了,问题在于实现一个业务过程时,这里,我要一个增加定单的数据操作,由于tborder 和其他三个表关联,因为意味着,新的定单一定要有客户、饭店、定单状态关联。这样一般就是下面的代码(没有使用事物):
public static bool NewOrder(long restrID,long customerID,int osID,COrder order)&&&&&&& {&&&&&&&&&&& if (order == null)&&&&&&&&&&&&&&&&&&&&&&&&&& CRestrauant restruant = Restrauant.ViewRestrauant(restrID);///饭店关联&&&&&&&&&&& CCustomer customer = Customer.ViewCustomer(customerID);///客户关联&&&&&&&&&&& COrderStatus orderstatus = OrderStatus.ViewOrderStatus(osID);///定单状态关联&&&&&&&&&&& &&&&&&&&&&& &&&&&&&&&&& order.orderstatus =&&&&&&&&&&& orderstatus.ordercollection.Add(order);&&&&&&&&&&&& order.restruant =&&&&&&&&&&& &&&&&&&&&&& restruant.ordercollection.Add(order);&&&&&&&&&&&&order.customer =&&&&&&&&&&& customer.ordercollection.Add(order);&&&&&&&&&&&&ISession s = CommonOperate.OpenSession();&&&&&&&&&&&&&&&&&&&&&&&&&&& s.SaveOrUpdate(restruant);&&&&&&&&&&& s.Flush();&&&&&&&&&&& s.Close();&&&&&&&&&&&&&&&&&& }
这样的关联表记录操作我之前已经写过很多次了,可是这里就出了问题。
a different object with the same identifier value was already associated with the session: 1, of class: thmz.deforder.dal.po.COrderStatus
到网上搜索到的是:
Exception happens when you try to use session.update, session.lock
This exceptions happens when you did load an object allready with session.get or session.load
and you try to reattach the object with session.update or session.lock
Do not load an object to the session when you have allready a reference to it, you want to reuse.
hibernate2.17中使用insertOrUpdate()方法&
hibernate3.0以上使用merge()来合并两个session中的同一对象
可惜我使用的是nhibernate,不知道现在对应的版本是多少了,更没有上面两个方法。绝望的时候,我在session的方法列表中随便选了另一个方法:s.SaveOrUpdateCopy(order);居然就可以了。hibernate/nhibernate 为什么老是出这样希奇古怪的问题。0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.}}" style="CURSOR: pointer" onclick=javascript:window.open(this.src); src="/images/emot/face6.gif" onload="javascript:if(this.width>500){this.resized=this.style.width=500;}">
在用Hibernate3.05+Spring1.2+WebWork2.17开发项目中,经常遇到类似下面的报错:org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.hymake.hyplat.acl.impl.Group#3500]&at org.hibernate.engine.PersistenceContext.checkUniqueness(PersistenceContext.java:543)
经跟踪调试进去,发现在Hibernate Session的EntryByKey中存在另外一个主键值与Action层中相同的PO。。。其实也就是Detached态,再持久的时候,遇到这个另外一个相同的PO时Hibernate的报错。。我的Action层具体的代码是这样的:
private IUser _
public String edit() throws Exception{&&& _user= _userService.getUser(getKeyID());}
public String save() throws Exception {&&& ......................①&&& String[] groups = getRequest().getParameterValues("groupSelect");&&& if (groups != null) {&&&&&&&& for (int i = 0; i & groups. i++) {&&&&&&&&&&&&&& IGroup group = _groupService.getGroupByName(groups[i]);&&&&&&& // 因为这时的_user为detached态,所以会在EntryByKey持久这个_user,但hashCode与原_user不同&&&&&&& // 不妨称这个为user1&&&&&&&&&&&&&& group.addUser(_user);&&&&&&&&&&&&&& _user.addToGroup(group);&&&&&&&&& }&&& }&&& //在这里,进行对_user持久化的时候,发现在EntryByKey中有另一个具在相同Identity的PO,所以Hibernate就报错&&& //我这边的user是除了用Hibernate的ID外,还采用业务主键name作为equals的判断条件及HashCode的生成&&& //这边的_user除了基本信息与上述的user1相同外,在groups中还多出一个group字段。&&& _userService.saveUser(_user);}
初步解决办法是:在①这地方加一句_user = _userService.getUser(_user.getName());进行对user再持久一下,那么就OK了。。可问题出来了,这里的①根据用户名从数据库取到一个user,那么页面上原先编辑的东西全部被覆盖掉了。难道要再对user一个一个赋值?显然不可行。
那么Hibernate的例子adminApp是什么实现的呢?查看他的源代码,他是这样写的:& public String save() {&& User user =& getUser();//这里的getUser()就是相当于我们上面的_user&& //与Session重新关联&& getSession().update(user);& }
& getSession是什么呢?他是在abstractAction是写的。我们在WebWork可以& 在action基类中这样写:&&& protected Session getHibernateSession() {&&&&&&& if (_sessionFactory == null) {&&&&&&&&&&& _sessionFactory = (SessionFactory) getBean("sessionFactory");&&&&&&& }&&&&&&& &&&&&&& return SessionFactoryUtils.getSession(_sessionFactory, true);&&&&&&& &&& }&&& protected final Object getBean(final String beanName) {&&&&&&& &&&&&&& ServletContext servletContext = ServletActionContext&&&&&&&&&&&&&&& .getServletContext();&&&&&&& &&&&&&& WebApplicationContext wac = WebApplicationContextUtils&&&&&&&&&&&&&&& .getRequiredWebApplicationContext(servletContext);&&&&&&& &&&&&&& return wac.getBean(beanName);&&& }
这个问题就解决了。。:)
function open_phone(e) {
var context = document.title.replace(/%/g, '%');
var url = document.location.
open("/ishare.do?m=t&u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(context) + "&sid=70cd6ed4a0");
!觉得精彩就顶一下,顶的多了,文章将出现在更重要的位置上。
大 名:&&[]&&[注册成为和讯用户]
(不填写则显示为匿名者)
(您的网址,可以不填)
请根据下图中的字符输入验证码:
(您的评论将有可能审核后才能发表)
已成功添加“”到
请不要超过6个字org.hibernate.WrongClassException 错误解决 - 钰琳仙境 - ITeye技术网站
博客分类:
关于 org.hibernate.WrongClassException 错误的解决!
首先看log(中间的null有可能是数字),说明在保存时出现子类id不匹配的问题。
Object with id: null was not of the specified subclass: org.appfuse.model.User (class of the given object did not match class of persistent copy);
nested exception is org.hibernate.WrongClassException: Object with id: null was not of the specified subclass: org.appfuse.model.User (class of the given object did not match class of persistent copy)
问题很奇怪,同样的代码在以往是有效的。由于本人比较懒于是乎就查了google,发现是与子类映射有关?
详细描述大家可以参考网络上面的,这里我只说解决方法。
简单讲,问题时出现在与子类相关的映射中:
比如 User 实体有两个子类 Employee,Employer(举例),
我们直接修改 user 并保存于是出现了上面的异常,但同样的代码却可以保存 Employee和Employer实体,原因是hibernate不能确定其中一个这个实体子类。于是将原来的代码加上:
BeanUtils.copyProperties(user, employee);
直接copy一个Employee实体出来以确定使用哪个子类,于是乎现在保存就行了。
原则上就是:既然hibernate无法确认子类那我们就帮帮他确认好了。
原因不分析了,这不是俺的强项。呵呵~~
另外,如果哪位大侠有高见麻烦留个言吧,以便在下可以学习一下。多有谢过啦~~~!
还有就是如果页面中出现了重复的域也有可能导致问题,这个需要仔细检查页面。
浏览: 171135 次
来自: 北京
显示的是A server error has occurred ...
非常不错,:idea: ,感谢楼主
好……一定好好研究
thanks ,nomandia
学习着
谢谢分享!当前位置: →
→ 平时Error记录
平时Error记录
& 作者及来源: ☆♂安♀★ - 博客园 &
&收藏到→_→:
摘要: 平时Error记录
"平时Error记录"::
the windows firewall on this machine is currently1.this row already belongs to another table. datatable tdlangauge = showlangauege.clone();&&&&&&&&&&&&&&& foreach (datarow row in drlanauage)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& tdlangauge.rows.add(row.itemarray); &&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&& olanguage.tables.add(tdlangauge);2. asp.net如何实现关闭子页面的时候刷新父页面的gridview控件在子页面中写onunload事件;例如&body onunload="close()"&&/body&&&script type="text-javascript"&&&&&& function close(){&&&&&&&&& window.parent.location.reload();&&&&& }&/script&3 .gridview没数据的时候还是显示标题直接绑定后台传过来的数据,不要判断为否为空在绑定,这样数据为空的就不能绑定显示标题了4.隐藏gridview中的button& if (enlabel.text == "")&{&&&& e.row.findcontrol("btnimage").visible =& }5.gridview合并某些列不同行的相同值&&&&& 在gridview_rowdatabound&&&&&&&&&&&&&&&&&&& bool islastrow =&&&&&&&&&&&&&&&&&&&&&&&& int imergebegin,&&&&&&&&&&&&&&&&&&&&&&&& imergebegin = 1;&&&&&&&&&&&&&&&&&&&&&&&& imergeend = 3;&&&&&&&&&&&&&&&&&&&&&&&& if (gvlanguagemain.allowpaging && (orow.rowindex == osource.count % gvlanguagemain.pagesize - 1 || orow.rowindex == gvlanguagemain.pagesize - 1))&&&&&&&&&&&&&&&&&&&&&&&&&&&& islastrow =&&&&&&&&&&&&&&&&&&&&&&&& else if (orow.rowindex == osource.count - 1)&&&&&&&&&&&&&&&&&&&&&&&&&&&& islastrow =&&&&&&&&&&&&&&&&&&&&&&&& if (orow.rowindex & 0)&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (!scurrentinvno.equals(spreviousinvno))&&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (orow.rowindex - ipreviousinvrownum & 1)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& addrowspanforcolumns(gvlanguagemain.rows[ipreviousinvrownum], imergebegin, imergeend, orow.rowindex - ipreviousinvrownum);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& spreviousinvno =&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ipreviousinvrownum = orow.&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&&&& else&&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& removecolumnsfromrow(orow, imergebegin, imergeend);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (islastrow)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& addrowspanforcolumns(gvlanguagemain.rows[ipreviousinvrownum], imergebegin, imergeend, orow.rowindex - ipreviousinvrownum + 1);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&& else&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&& spreviousinvno =&&&&&&&&&&&&&&&&&&&&&&&&&&&& ipreviousinvrownum = orow.&&&&&&&&&&&&&&&&&&&&&&&& }& 在外部定义一个方法&& /// &summary&&&&&&&& /// adds the row span for columns.&&&&&&& /// &/summary&&&&&&&& /// &param name="orow"&the row.&/param&&&&&&&& /// &param name="iindexofcolumnbegin"&the index of column begin.&/param&&&&&&&& /// &param name="iindexofcolumnend"&the index of column end.&/param&&&&&&&& /// &param name="irowspan"&the rowspan.&/param&&&&&&&& private void addrowspanforcolumns(gridviewrow orow, int iindexofcolumnbegin, int iindexofcolumnend, int irowspan)&&&&&&& {&&&&&&&&&&& for (int i = 0; i & orow.cells. i++)&&&&&&&&&&& {&&&&&&&&&&&&&&& if (i & iindexofcolumnbegin || i & iindexofcolumnend)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& orow.cells[i].rowspan =&&&&&&&&&&&&&&& }&&&&&&&&&&& }&&&&&&& }&&&&& private void removecolumnsfromrow(tablerow orow, int iindexofcolumnbegin, int iindexofcolumnend)&&&&&&& {&&&&&&&&&&& for (int i = 0; i & orow.cells. i++)&&&&&&&&&&& {&&&&&&&&&&&&&&& if (i & iindexofcolumnbegin || i & iindexofcolumnend)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& orow.cells.removeat(i);&&&&&&&&&&&&&&&&&&& i--;&&&&&&&&&&&&&&&&&&& iindexofcolumnbegin--;&&&&&&&&&&&&&&&&&&& iindexofcolumnend--;&&&&&&&&&&&&&&& }&&&&&&&&&&& }&&&&&&& }不要用多个and拼接,会影响执行速度5. cannot find column error?如果在dataset绑定的时候出错那就是之前没有创建那列,而如果在ui转换 则你绑定(或者排序,我的就是排序的时候重复排序)的时候错误了。6.获取父页面的方法并传值function resourceselect_button_select_onclick() {&&& var resourcetype, ogridview,&&& index = f(_pre + 'hdtabindex').value&&& var arrtext = [], arrdesc = [], arrkey = [];&&& if (index == '1') {&&&&&&& ogridview = f(_pre + 'gdv1');&&& }&&& if (index == '2') {&&&&&&& ogridview = f(_pre + 'gdv2');&&& }&&& if (index == '3') {&&&&&&& ogridview = f(_pre + 'gdv3');&&& }&&& resourcetype =&&& for (var i = 1; i & ogridview.rows.length-1; i++) {&&&&&&& var a = ogridview.rows[i].cells[0].getelementsbytagname("input")[0];&&&&&&& if (a != undefined && a.checked) {&&&&&&&&&&& arrtext.push(ogridview.rows[i].cells[1].innerhtml);&&&&&&&&&&& arrdesc.push(ogridview.rows[i].cells[2].innerhtml);&&&&&&&&&&& arrkey.push(ogridview.rows[i].cells[3].innerhtml);&&&&&&& }&&& }&&& if (arrkey.length & 1) {&&&&&&& alert(selectatleastoneitem);&&&&&&&&&& }&&& parent.document.getelementbyid('sisiframe').contentwindow.loadresourcetinformation(arrtext, arrdesc, arrkey,resourcetype);&&& resourceselect_button_cancel_onclick();&&&}接收function loadresourcetinformation(arrtext, arrdesc, arrkey, resourcetype) {&&&&&&&&&&& var arrtext = arrtext.slice(0);&&&&&&&&&&& var arrdesc = arrdesc.slice(0);&&&&&&&&&&& var arrkey = arrkey.slice(0);&&&&&&&&&&& sresourcetype =&&&&&&&&&&& var ogridview = document.getelementbyid('&%=gridviewresourcetext.clientid %&');&&&&&&&&&&& //delete empty row.&&&&&&&&&&& if (ogridview.rows[1].cells[1].innerhtml == '&') {&&&&&&&&&&&&&&& ogridview.deleterow(1);&&&&&&&&&&& }&&&&&&&&&&& for (var i = 0; i & arrkey. i++) {&&&&&&&&&&&&&&& var sinsertcontent = '&tr onmouseout="onmouseoutclient(this)" onmouseover="onmouseoverclient(this)"& class="rowstyle"&';&&&&&&&&&&&&&&& sinsertcontent += '&td align="center" style="width:2%;"&';&&&&&&&&&&&&&&& sinsertcontent += '&input type="checkbox" name="checkitem" id="cbocheckitem" key="' + arrkey[i] + '"&';&&&&&&&&&&&&&&& sinsertcontent += '&/td&';&&&&&&&&&&&&&&& sinsertcontent += '&td align="left" style="width:55%;"&' + arrtext[i] + '&/td&';&&&&&&&&&&&&&&& sinsertcontent += '&td align="left" style="width:43%;"&' + arrdesc[i] + '&/td&';&&&&&&&&&&&&&&& sinsertcontent += '&td class="hidden" & ' + arrkey[i] + ' &/td&';&&&&&&&&&&&&&&& sinsertcontent += '&/tr&';&&&&&&&&&&&&&&& //delete duplicate data.&&&&&&&&&&&&&&& if (ogridview.rows.length & 1) {&&&&&&&&&&&&&&&&&&& for (var y = 1; y & ogridview.rows. y++) {&&&&&&&&&&&&&&&&&&&&&&& if (arrtext[i] == ogridview.rows[y].cells[1].innerhtml && arrdesc[i] == ogridview.rows[y].cells[2].innerhtml) {&&&&&&&&&&&&&&&&&&&&&&&&&&& ogridview.deleterow(y);&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&& $('#&%=gridviewresourcetext.clientid %&').append(sinsertcontent);&&&&&&&&&&&&&&& if (ogridview.rows.length & 2) {&&&&&&&&&&&&&&&&&&& $("#resourcediv").css("height","100px");&&&&&&&&&&&&&&& }&&&&&&&&&&& }&&&&&&& }7.& 父页刷新&& window.parent.refresh()8.把gridview的pageindex设置为第一页&& gdv1.pageindex = 0;9. &asp:scriptmanager id="scriptmanager1" runat="server"&&/asp:scriptmanager&&asp:updatepanel id="updatepanel1" runat="server"&&&& &contenttemplate&& &/contenttemplate& &/asp:updatepanel&10 是javascript代码,还是想照常输出到label里面要把他转换为server.htmlencode()里面进行转,html会自己解析换为html代码,然后页面会自己转换一次11.object reference not set to an instance of an object.(。)1、viewstate 对象为null。2、dateset 空。3、sql语句或datebase的原因导致datareader空。4、声明字符串变量时未赋空值就应用变量。5、未用new初始化对象。6、session对象为空。7、对控件赋文本值时,值不存在。8、使用request.querystring()时,所获取的对象不存在,或在值为空时未赋初始值。9、使用findcontrol时,控件不存在却没有做预处理。10、重复定义找过象引用设置到对象的实例错误. 我做的是从一个页面直接访问另外一个页面的方法,而在那个方法里面刚好有另外一个页面的控件,因为没有经过另外一个页面的初始化,所以找不到控件。11、 sql里面的字符串拼接参数都要为字符串类型,不然会报错12. 获取frame或者iframe的id为sisiframe所在的window对象的事件为setpackageinfo&parent.document.getelementbyid('sisiframe').contentwindow.setpackageinfo(opackageinfo);13. asp.net web forms中用system.web.optimization的作用bundleconfig.cs http://code./loop-reference-handling-in-caaffaf7/sourcecode?fileid=65769&pathid=14.dataset.relations获取用于将表链接起来并允许从父表浏览到子表的关系的集合。/holdon/archive//1646609.html15 .datatable转换为list#region datatable to list&&&&&&& /// &summary&&&&&&&& /// datatable装换为泛型集合&&&&&&& /// &/summary&&&&&&&& /// &typeparam name="t"&&/typeparam&&&&&&&& /// &param name="datatable"&datatable&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static list&t& tolist&t&(this datatable datatable)&&&&&&& {&&&&&&&&&&& int n = 0;&&&&&&&&&&& try&&&&&&&&&&& {&&&&&&&&&&&&&&& // 返回值初始化&&&&&&&&&&&&&&& list&t& result = new list&t&();&&&&&&&&&&&&&&& for (int j = 0; j & datatable.rows. j++)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& n =&&&&&&&&&&&&&&&&&&& t _t = (t)activator.createinstance(typeof(t));&&&&&&&&&&&&&&&&&&& propertyinfo[] propertys = _t.gettype().getproperties();&&&&&&&&&&&&&&&&&&& foreach (propertyinfo pi in propertys)&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&& for (int i = 0; i & datatable.columns. i++)&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&& // 属性与字段名称一致的进行赋值&&&&&&&&&&&&&&&&&&&&&&&&&&& if (pi.name.equals(datatable.columns[i].columnname))&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& // null值单独处理&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (datatable.rows[j][i] != dbnull.value)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& pi.setvalue(_t, datatable.rows[j][i], null);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& else&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& pi.setvalue(_t, null, null);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&& result.add(_t);&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&& catch (exception ex)&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&& }&&&&&&& #endregion&&&&&&& #region dataview to list&&&&&&& /// &summary&&&&&&&& /// dataview装换为泛型集合&&&&&&& /// &/summary&&&&&&&& /// &typeparam name="t"&&/typeparam&&&&&&&& /// &param name="dataview"&dataview&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static list&t& tolist&t&(this dataview dataview)&&&&&&& {&&&&&&&&&&& int n = 0;&&&&&&&&&&& try&&&&&&&&&&& {&&&&&&&&&&&&&&& // 返回值初始化&&&&&&&&&&&&&&& list&t& result = new list&t&();&&&&&&&&&&&&&&& for (int j = 0; j & dataview. j++)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& n =&&&&&&&&&&&&&&&&&&& t _t = (t)activator.createinstance(typeof(t));&&&&&&&&&&&&&&&&&&& propertyinfo[] propertys = _t.gettype().getproperties();&&&&&&&&&&&&&&&&&&& foreach (propertyinfo pi in propertys)&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&& for (int i = 0; i & dataview.table.columns. i++)&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&& // 属性与字段名称一致的进行赋值&&&&&&&&&&&&&&&&&&&&&&&&&&& if (pi.name.equals(dataview.table.columns[i].columnname))&&&&&&&&&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& // null值单独处理&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if (dataview[j][i] != dbnull.value)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& pi.setvalue(_t, dataview[j][i], null);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& else&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& pi.setvalue(_t, null, null);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&& result.add(_t);&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&& catch (exception ex)&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&& }&&&&&&& #endregion15.& html转化为图片的实现/lyl6796910/archive//2875809.html16 c#技术pdf转换成图片&&13种方案/lyl6796910/p/3318056.html17 获取视频属性/tianfang/archive//3138779.html18.未能加载文件或&xxx&或它的某一个依赖项。系统找不到指定的文件。 1. dll没有引用。  2. dll文件名与加载时的dll文件名不一致。  3. dll文件根本不存在,即出现丢失情况。  4. 加载dll路径错误,即dll文件存在,但加载路径不正确。  5. 引用了dll,路径也对,但是在bin目录(也就是项目生成目录,更加实际情况不一定是bin目录)下没有引用的dll(一般引用dll后,自动加载到引用项目的bin目录下)。我上次加载引用一个system.web.operation.dll 这个dll文件,因为vs的里面带一个这个名字的dll,而我从别的项目拷一个过来,而不是本项目内部的,所以报错。解决:我从管理nuget上面下载了一个dotless adapter for system.web.optimization的安装包安装完就可以了。
&/web&中的服务器错误。
给定关键字不在字典中。
说明: 执行当前 web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及此文来自: 马开东博客
转载请注明出处 网址:
代码中导致错误的出处的详细信息。
结论 没有成功绑定或者绑定的字段不存在或者绑定的字段没有把数据传递过来
js缺少函数,
可能是没有成功
由于启动用户实例的进程时出错,导致无法生成sql server的用户实例
http://z/q.htm
版本太低,只支持2005及以下
&解决:安装visualstudio 2008 sp1
& 解决:多试几次
从索引 97 处开始,初始化字符串的格式不符合规范。
& 解决:连接的输入字符串中有错(aso.net连接数据中的时候)
connectionstring 属性尚未初始化
解决:连接异常(如dispose之后还open)
executenonquery 要求已打开且可用的连接。连接的当前状态为已关闭。
& 解决:没有open()
&变量名 '@username' 已声明。变量名在查询批次或内部必须唯一
& 解决:要把之前的数据清空。
阅读器关闭时场所通用read无效
&解决:使用datatable方法不使用datareader
参数化查询 '(@id bigint)select * from users where id=@id' 需要参数 '@id',但未提供该参数。(如题:sqlhelper.executedatatable("select * from users where id=@id",new sqlparameter("id",0));
public static datatable executedatatable(string sql, params sqlparameter[] parameters)
&&&&&&&&&&& string constr = configurationmanager.connectionstrings["constr"].
&&&&&&&&&&& using (sqlconnection conn = new sqlconnection(constr))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& conn.open();
&&&&&&&&&&&&&&& using (sqlcommand cmd = conn.createcommand())
&&&&&& &&&&&&&&&{
&&&&&&&&&&&&&&&&&&& mandtext =
&&&&&&&&&&&&&&&&&&& foreach (sqlparameter parameter in parameters)
&&&&&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&&&&&& cmd.parameters.add(parameter);
&&&&&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&&&&&& dataset dataset = new dataset();
&&&&&&&&&&&&&&&&&&& sqldataadapter adapter=new sqldataadapter(cmd);
&&&&&&&&&&&&&&&&&&& adapter.fill(dataset);
&&&&&&&&&&&&&&&&&&& return dataset.tables[0];
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&& })
解决:查看sqlparameter的定义,里面有一个sqldbtype dbtype,再查看他可以看此文来自: 马开东博客
转载请注明出处 网址:
出来里面是枚举类型
修改为sqlhelper.executedatatable("select * from users where id=@id",new sqlparameter("id",(object)0));实际上就是进行类型的转换
sqlconection在程序中一直保持他open可以吗
答:不行,连接是非常宝贵的资源,连接的数量是有限的,一定要用完就close或者dispose
当传递具有已修改的datarow集合时,更新要求有效的updatecommand。
解决:要为表设置主键 ,谁都在表,唯有主键不会变,程序要通过主键来定位要更新的行。&& 忘记设置主键怎么办?先到中设置主键,然后在dataset的对应的datatable上点右键,选择&配置&,在点击&完成&(如果是新增或者删除字段的话,点击&配置&,&查询生成器&,再把新增的字段给打钩,在&完成&)
类 结构或接口成员声明中的标志"using"无效
&解决:在这个前面缺少定义一个方法
线程间操作无效: 从不是创建控件&txtnum&的线程访问它。
将截断字符串或二进制数据。
语句已终止。
解决:原先定义的字符串长度不够
winform中奖datareader绑定到datagridview的两种方法
在winform中,datareader是不能直接绑定到datagridview的,我想到了用两种方法来实现将datareader绑定到datagridview。
sqlcommand command = new sqlcommand(querystring, connection);
connection.open();
sqldatareader reader = command.executereader();
//方法一,借助于datatable
//datatable table = new datatable();
//table.load(reader);
//datagridview1.datasource =
//方法二,借助于bindingsource
bindingsource bs = new bindingsource();
bs.datasource =
datagridview1.datasource =
reader.close();
&sqllibrary.sqlhelper&的类型初始值设定项引发异常。
&该类在使用时(初始化时)发生的异常,包括这个类的构造函数、字段的默认值等,尤其是静态类中常会遇到。因为静态类的字段在类的第一次使用前会初始化一下。(设置断点调试)
解决:系统版本不纯净,重装
在做socket的传输文件的时候没办法弹出保存的窗体原因是:没有this参数
系统iis没有没有很多东西,原因是先安装了.net framework,再安装了iis,在安装framework的时候发现你系统没有安装iis不帮你注册iis文件表,解决办法:在dos里面
,然后再到
,再次输入aspnet_regiis -i
用executereader查询的时候,如果要获取输出参数的值,方法一:必须关闭sqldataread对象才会有值,因为关闭才代表查询结束。方法二:在的时候当第二张表的值返回,如select @total=count(1) from #temp&&
select @total
或者不使用executereader,而使用adapter
c#在发送邮箱的时候发生:无法从传输连接中读取数据: net_io_connectionclosed。
解决:可能打开了36此文来自: 马开东博客
转载请注明出处 网址:
0等杀毒软件或者打开了防火墙
datagrid里面的分页功能:$("#grid").datagrid('loaddata',
{ "rows": data.data[0].rows, "total": data.data[0].total
assert.areequal 失败。应为:
&e10adc3949ba59abbe56e057f20f883e&,实际为:
原因:编写ajax的时候代码书写错误
win7 部署weblogic 不能运行http://localhost:7001/console/
解决办法:去系统盘中寻找startweblogic.cmd这个文件,然后执行,不能关闭,一关闭就不能运行页面了
oracle.jdbc.driver.databaseerror.newsqlexception(databaseerror.java:133)&br/
看连接字符串
服务器ip 名称
用户名密码等连接有没有错,防火墙有没有关
安装sql server management studio express时出现错误码29506,应该怎么解决,我的系统是win7旗舰版
&解决:/zh-cn/download/confirmation.aspx?id=15366
由于启动用户实例的进程时出错,导致无法生成sql server的用户实例
http://z/q.htm
版本太低,只支持2005及以下
&解决:安装visualstudio 2008 sp1
& 解决:多试几次
从索引 97 处开始,初始化字符串的格式不符合规范。
& 解决:连接的输入字符串中有错(aso.net连接数据中的时候)
connectionstring 属性尚未初始化
解决:连接异常(如dispose之后还open)
executenonquery 要求已打开且可用的连接。连接的当前状态为已关闭。
& 解决:没有open()
&变量名 '@username' 已声明。变量名在查询批次或内部必须唯一
& 解决:要把之前的数据清空。
阅读器关闭时场所通用read无效
&解决:使用datatable方法不使用datareader
参数化查询 '(@id bigint)select * from users where id=@id' 需要参数 '@id',但未提供该参数。(如题:sqlhelper.executedatatable("select * from users where id=@id",new sqlparameter("id",0));
public static datatable executedatatable(string sql, params sqlparameter[] parameters)
&&&&&&&&&&& string constr = configurationmanager.connectionstrings["constr"].
&&&&&&&&&&& using (sqlconnection conn = new sqlconnection(constr))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& conn.open();
&&&&&&&&&&&&&&& using (sqlcommand cmd = conn.createcommand())
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& mandtext =
&&&&&&&&&&&&&&&&&&& foreach (sqlparameter parameter in parameters)
&&&&&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&&&&&& cmd.parameters.add(parameter);
&&&&&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&&&&&& dataset dataset = new dataset();
&&&&&&&&&&&&&&&&&&& sqldataadapter adapter=new sqldataadapter(cmd);
&&&&&&&&&&&&&&&&&&& adapter.fill(dataset);
&&&&&&&&&&&&&&&&&&& return dataset.tables[0];
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&& })
解决:查看sqlparameter的定义,里面有一个sqldbtype dbtype,再查看他可以看出来里面是枚举类型
修改为sqlhelper.executedatatable("select * from users where id=@id",new sqlparameter("id",(object)0));实际上就是进行类型的转换
sqlconection在程序中一直保持他open可以吗
答:不行,连接是非常宝贵的资源,连接的数量是有限的,一定要用完就close或者dispose
当传递具有已修改的datarow集合时,更新要求有效的updatecommand。
解决:要为表设置主键 ,谁都在表,唯有主键不会变,程序要通过主键来定位要更新的行。&& 忘记设置主键怎么办?先到中设置主键,然后在dataset的对应的datatable上点右键,选择&配置&,在点击&完成&(如果是新增或者删除字段的话,点击&配置&,&查询生成器&,再把新增的字段给打钩,在&完成&)
类 结构或接口成员声明中的标志"using"无效
&解决:在这个前面缺少定义一个方法
线程间操作无效: 从不是创建控件&txtnum&的线程访问它。
将截断字符串或二进制数据。
语句已终止。
解决:原先定义的字符串长度不够
winform中奖datareader绑定到datagridview的两种方法
在winform中,datareader是不能直接绑定到datagridview的,我想到了用两种方法来实现将datareader绑定到datagridview。
sqlcommand command = new sqlcommand(querystring, connection);
connection.open();
sqldatareader reader = command.executereader();
//方法一,借助于datatable
//datatable table = new datatable();
//table.load(reader);
//datagridview1.datasource =
//方法二,借助于bindingsource
bindingsource bs = new bindingsource();
bs.datasource =
datagridview1.datasource =
reader.close();
&sqllibrary.sqlhelper&的类型初始值设定项引发异常。
&该类在使用时(初始化时)发生的异常,包括这个类的构造函数、字段的默认值等,尤其是静态类中常会遇到。因为静态类的字段在类的第一次使用前会初始化一下。(设置断点调试)
解决:系统版本不纯净,重装
在做socket的传输文件的时候没办法弹出保存的窗体原因是:没有this参数
系统iis没有没有很多东西,原因是先安装了.net framework,再安装了iis,在安装framework的时候发现你系统没有安装iis不帮你注册iis文件表,解决办法:在dos里面
,然后再到
,再次输入aspnet_regiis -i
用executereader查询的时候,如果要获取输出参数的值,方法一:必须关闭sqldataread对象才会有值,因为关闭才代表查询结束。方法二:在的时候当第二张表的值返回,如select @total=count(1) from #temp&&
select @total
或者不使用executereader,而使用adapter
c#在发送邮箱的时候发生:无法从传输连接中读取数据: net_io_connectionclosed。
解决:可能打开了360等杀毒软件或者打开了防火墙
datagrid里面的分页功能:$("#grid").datagrid('loaddata', { "rows":
data.data[0].rows, "total": data.data[0].total });
assert.areequal 失败。应为: &e10adc3949ba59abbe56e057f20f883e&,实际为:
22.&3662&。
原因:编写ajax的时候代码书写错误
win7 部署weblogic 不能运行http://localhost:7001/console/
解决办法:去系统盘中寻找startweblogic.cmd这个文件,然后执行,不能关闭,一关闭就不能运行页面了
oracle.jdbc.driver.databaseerror.newsqlexception(databaseerror.java:133)&br/
看连接字符串 服务器ip 名称 用户名密码等连接有没有错,防火墙有没有关
安装sql server
management studio express时出现错误码29506,应该怎么解决,我的系统是win7旗舰版
&解决:/zh-cn/download/confirmation.aspx?id=15366
microsoft.jet.oledb.4.0' 配置为单线程单元下运行,所以该访问接口无法用于分布式
解决:http://bbs.csdn.net/topics/
原来是sql 2005
express的然后转到sql 2008 r2 后,用.\express作为实例名,不管用sa还是admin添加的时候都会出错,提示{ an error occured when attaching
database(s) },查看详细是error 948,个人人为是你原来的在express里面,但是在sql 2008 r2里面没有sqlexpress(没有为什么还可以登录,这个我就不想明白了,可能是里面的版本低于现在是sql 2008 r2把),也有人说是你的文件的权限文件(添加一个system(拥有所有权限,authenticated users(可读可写可修改),everyone(可读))),有时候改了可行,有时候不行,我不知道是什么原因,用local作为实例名正常(他会自己添加一个权限owner rights,还有另外一个估计是sql权限) 我的系统是win 7 x64。
ie 8按f12没反映问题& 原因:f12没移动到左上角了,所以你看不到效果。
解决:预览找到你f12的那个页面,右击&移动&,按下&&& 把他移动下来。
vs 2010没有负载测试的问题。
如果不是ultimated版本就没有负载测试这个,你要自己安装visual studio 2010 load test feature pack deployment guide,而这个在visual_studio_agents_2010安装文件里面有这个功能,如图:
安装配置负载测试的是出错:failed
to configure load test database 原因 确实 sp1的某个dll文件
解决:安装vs 2010 sp1
问题:检索&com&类工厂中&clsid&为&{0-11cf-ae68-00aa004a34d5}&的组件时失败。
解决:今天本人要用vs中用orm&和创建连接时&用一个createentity.exe连接本地(sql&server&2008)时&出现这个错误:检索&com&类工厂中&clsid&为&{0-11cf-ae68-00aa004a34d5}&的组件时失败。刚开始以为是用户权限的问题于是在网上搜了好一阵找到一个感觉沾边的解决办法:http://www.6down.net/html/technologydoc//213.htm。这个只是再中文件完整的情况下,这个办法能解决一般的问题。但是我试后还是不行。于是又招到这个具体的clsid错误号码在谷歌上搜便找到了这个原因:/foundation/archive//1305297.html原来是sql&server&2008里的文件缺少一个.dll文件:qldmo。后来终于找到了我的解决办法:/kycms/archive//1546378.html。这里面的问题就是我的具体问题解决办法。试过后,我就连起我的了。要是大家的是mssql&server&2008的话,就可以这样做。直接照第三个链接做就可以了。
如果还是不行在在vs中找到引用控件所在的项目--〉属性--〉生成--〉常规---〉目标平台---〉选择x86即可解决。
检测mssql 的版本
select @@version as ver
33.&& 错误 1 错误&2019:&指定的成员映射无效。类型&temodel.filterconfiguration&中的成员&tempid&的类型&edm.int32[nullable=false,defaultvalue=]&与类型&temodel.store.filterconfigurations&中的成员&tempid&的&sqlserverce.nvarchar[nullable=false,defaultvalue=,maxlength=4000,unicode=true,fixedlength=false]&不兼容。
d:\myproject\te\tehelpertool\main\te\te.dataaccess\temodel.edmx 374 11
te.dataaccess
解决:用全局去搜索tempid(在model里面),把他的类型修改为你所要的类型
&把转换为报错:a circular reference was detected while serializing an object of
type原因是我把要传出来的值写错了var
data = new { total = param.total, rows = from u in users select new { u, u.id,
u.address, u.age, u.phone, u.upwd, u.nickname, u.username, u.email, u.gender,
u.lastloginip } };
正确的是var
data = new { total = param.total, rows = from u in users select new { u.id,
u.address, u.age, u.phone, u.upwd, u.nickname, u.username, u.email, u.gender,
u.lastloginip } };不能在多传u不能会报错,说重复了
在$.ready(function (){});中写上$(".ismenu").click(function
() {});事件不触发,而在$(function(){});事件则触发
用ef来绑定的,当删此文来自: 马开东博客
转载请注明出处 网址:
除某个用户组的时候(而这个组已经有用户了),删除不了
,只能先把原来的用户移除、
the type or
namespace name '****' could not be found (are you missing a using directive or
an assembly reference
解决:因为我程序的运行环境是.net4.0,而dll是2.0的,起初我怀疑是版本冲突的问题,为此我还专门把这个dll拿到vs2005上试了下,结果是可以正确运行。
但是,回过头来想一下就会觉得版本冲突的想法有些扯淡,哪有高版本的.net不能调用低版本的?这明显不符合向下兼容的原则。
the type initializer for
'spring.context.support.contextregistry' threw an exception
说明:引用不包含common.logging.dll(通用日志接口),找到文件所在文职引用添加进去或者去服务器上面找。
error creating context
'spring.root': 'cusname' node cannot be resolved for the specified context
[springnhiberatestart.customer].
解决:app.config配置文件里面的解决不包含customer或者包含但是配置错误(如:&object name="customer" type="springnhiberatestart.customer,springnhiberatestart"& (&!--type:第一个是类型的全名称,第二个是类型所在--&))
页面中有些可以触发click有些不不触发,但又不是自己写的javascript有问题,比如
&&$(function () {
&&&&&&&&&&& bindmenulinkclick();
&&&&&&& });
&//点击菜单按钮就在中间区域添加一个页签
&&&&&&& function
bindmenulinkclick() {
&&&&&&&&& &&$('.easyuilinkbutton').click(function () {
&&&&&&&&&&&& //省略
解决:function
bindmenulinkclick() {
&&&&&&&&&&&
$(document).on("click",'.easyuilinkbutton',function () {
//(on是1.7.0以后的支持的,原来的旧版本用live。分析:页面加载之后再用代码比如ajax生成的代码,必需得用live或on才行
不然的话,你得在ajax生成代码后再用bind绑定
no context registered. use the
'registercontext' method or the 'spring/context' section from your
configuration file.(在配置sptring.net的时候出现的)
分析:app.config没有配置或者配置错误。
could not load file or assembly
'iesi.collections, version=1.0.1.0, culture=neutral,
publickeytoken=aa95f207798dfdb4' or one of its dependencies. 系统找不到指定的文件。
分析:在使用nhibernate的时候缺少iesi.collections.dll,添加引用即可。
&nhibernate.bytecode.linfu.proxyfactory does
not implement nhibernate.bytecode.iproxyfactoryfactory
在配置spring.net和nhibernate时候代码没错但还是不成功或者报错了。
解决:如果是把他们配置到xml文件,右击xml文件属性。build action设置为嵌入资源(embedded
resource),另外要把copy& to output directory 设置为始终复制。
nbernate 出现nhibernate.bytecode.proxyfactoryfactorynotconfiguredexception:
the proxyfactoryfactory was not configured
可能是配置文件出错,把这段代码放到app.config里面&property name="proxyfactory.factory_class"&nhibernate.bytecode.linfu.proxyfactoryfactory,
nhibernate.bytecode.linfu&/property&
解决:ibernate的最新版本为:nhibernate-2.1.2.ga-bin,和以往版本不一样。在使用配置时,在hibernate.cifg.xml文件中需要添加
name="proxyfactory.factory_class"&nhibernate.bytecode.linfu.proxyfactoryfactory,
nhibernate.bytecode.linfu&/property&
&添加后,需引用required_for_lazyloading\linfu下面的dll,否则会出现如错误:
在安装完mygeneration
的时候打开他会出现you must choose driver,可能是mygeneration加载搜索你电脑的类型缓慢的原理,请你重开几次 或者重启试试。
cannot find a resource with the
name/key username [line: 17 position: 20]
说明:加载页面没有找到username的key,可能要先到你加载之前
a relative uri cannot be
created because the 'uristring' parameter represents an absolute uri.
说明:uri地址有错。
error 3 unsafe code may only
appear if compiling with /unsafe
解决方法:在工程属性中勾选&allow
unsafe code&
13:55:59 [emerg] : bind() to 0.0.0.0:80 failed (10013: an attempt was
made to access a socket in a way forbidden by its access permissions) &
打开nginx报错解决办法:
在cmd窗口运行如下命令:
c:\users\administrator&netstat -aon |
findstr :80 &
看到80端口果真被占用。发现占用的pid是4,名字是system。怎么禁用呢?
1、打开注册表:regedit
2、找到:hkey_local_machine\system\currentcontrolset\services\http
3、找到一个reg_dword类型的项start,将其改为0
4、重启系统,system进程不会占用80端口
重启之后,start nginx.exe 。在浏览器中,输入127.0.01,即可看到亲爱的&welcome to nginx!& 了。
add value to collection of type
'microsoft.phone.shell.applicationbaritemlist`1[[microsoft.phone.shell.iapplicationbariconbutton,
microsoft.phone, version=7.0.0.0, culture=neutral,
publickeytoken=24eec0d8c86cda1e]]' threw an exception. [line: 40 position: 82]
winphone页面的.applicationbaritem报错,可能是图标的数量超过了(正常最多是4个)
&invalid uri: the format of the uri could not
be determined.
解释:url地址有错误,比如要加http://
&&//invalid uri: the authority/host could not be parsed.
解释:url地址无法解析,可能是url地址错误
&error&&&&&& 10&&& could
not load the assembly file:///d:\新建文件夹\新建文件夹\zhianchen\heima\windows
phone2\windows phone\phoneapp1\lib\coding4fun.toolkit.audio.dll.this assembly may have been downloaded from the web.&&if an assembly has been
downloaded from the web, it is flagged by windows as
being a web file, even if it resides on the local computer.&this may prevent it from being used in
your project.&you can change this
designation by changing the file properties.&only
unblock assemblies that you trust.&see
/fwlink/?linkid=179545 for more information. phoneapp1(中文:错误十不能加载大会文件,这个组装可能已经从网上下载。如果一个装配已从网上下载,它是由windows作为web标记文件,即使它驻留在本地计算机上。这可能阻止它被用于你的项目。您可以更改这个名称通过更改文件属性。唯一你信任的开启。请参见/fwlink/?linkid = 179545的更多信息。phoneapp1)
你文件的权限不够造成不安全,删除引用,coding4fun.toolkit.audio.dll右击属性&解除锁定。然后在添加引用。
error 1&&&&&& 'gestureeventargs' is
an ambiguous reference between 'system.windows.input.gestureeventargs' and
'microsoft.phone.controls.gestureeventargs'&&&&&&& d:\新建文件夹\新建文件夹\zhianchen\heima\windows
phone2\windows phone\phoneapp1\变换page2.xaml.cs& 24&&&& 44&&&& phoneapp1
只能把'gestureeventargs'指定到具体某个下面的事件,比如改成system.windows.input.gestureeventargs
56. microsoft.phone.controls.toolkit的listpickeritem大于5个的时候会报错,m为2个的时候高度是192px,以后每增加1个item,高度增加192px,如此类推,当增加到5个的时候高度为768px,那么第6个就无法在屏幕内显示完整,因此会有报错。
解决:&&&&&&&
&tk:listpicker x:name="listpicker"&
&&&&&&&&&&& &tk:listpicker.fullmodeitemtemplate&
&&&&&&&&&&&&&&& &datatemplate&
&checkbox content="{binding}"&&/checkbox&&
&&&&&&&&&&&&&&& &/datatemplate&
&&&&&&&&&&& &/tk:listpicker.fullmodeitemtemplate&
&tk:listpicker.itemtemplate&
&&&&&&&&&&&&& &&&datatemplate&
&&&&&&&&&&&&&&&&&&& &textblock text="{binding}"&&/textblock&
&&&&&&&&&&&&&&& &/datatemplate&
&&&&&&&&&&& &/tk:listpicker.itemtemplate&
&&&&&&& &/tk:listpicker&
后台用itemssource绑定
listpicker.itemssource
= new string[]
{ "aaa", "bbb",
"ccc", "dddd",
"eeee", "ffff",
"gggg", "hhhh",
"ii", "aaa",
"bbb", "ccc",
"dddd", "eeee",
"ffff", "gggg",
"hhhh", "ii"
cannot add instance of type
'system.string' to a collection of type
'system.windows.controls.uielementcollection'. [line: 44 position: 28]
字符串无法转换为ui容器
&attempt to access the method failed:
system.io.file.openread(system.string)
解析:权限不够,winphone
不能用传统的io读取和写入方法file.openwrite()也会报错。&
isolatedstoragefile isf= isolatedstoragefile.getuserstoreforapplication();& //按获取用户的独立存储
isf.createdirectory("hello");& //写相当于独立存储目录的路径就行。
using (stream
stream = isf.createfile("hello/1.txt"))
& using (streamwriter sw = new
streamwriter(stream))
&&&&&&&&& sw.writeline("heiheihei!!!");
new activexobject (
excel.application ); &not available&&
web访问本地文件的权限不够。
&error 1 the type ' &' is defined
in an assembly that is not referenced.&you
must add a reference to assembly 'heima.hotel.model,
version=1.0.0.0, culture=neutral, publickeytoken=null'.
解析:版本不兼容
could not load file or assembly
'xmblogs.web.sql.dal' or one of its dependen
找不到,当你的程序没用错,而assembly.load(assemblyname);
却找不到名称报错的时候是因为你这个项目没有添加给
&xmblogs.web.sql.dal&的引用。
解决:解决方法:
1.检查oracledal工程属性看assembly name是否为oracledal。
2.看web中有没有添加oracledal.dll的引用(多数可能是这个原因)。
to cast object of type 'oracledal.config' to type 'idal.iconfig'
&解决方法:oracledal中的类应该如定义:
public class config:iconfig{}
&an error occurred during the
parsing of a resource required to service this request. please review the
following specific parse error details and modify your source file
appropriately
如果配置文件没错的话,那就是dll生成的位置变了。
. multiple types were found that match
the controller named 'home'. this can happen if the route that services this
request ('{controller}/{action}/{id}') does not specify namespaces to search
for a controller that matches the request. if this is the case, register this
route by calling an overload of the 'maproute' method that takes a 'namespaces'
parameter.
the request for 'home' has found the following matching controllers:
xmblogs.web.ui.controllers.homecontroller
xmblogs.web.ui.areas.shopping.controllers.homecontroller
说明:路由冲突
&cs0234: the type or namespace name 'optimization' does not exist in the namespace 'system.web' (are you missing an assembly reference?) 且using system.web.
为红色的红色,则你要添加system.web.的引用。
&multiple types were found that match the controller named 'home'. this can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. if this is the case, register this route by calling an overload of the 'maproute' method that takes a 'namespaces' parameter.
解析:多个控制器的路由冲突
方法:在控制器的路由上面加上请求的命名控件
routes.maproute(
&&&&&&&&&&&&&&& "default", // route name
&&&&&&&&&&&&&&& "{controller}/{action}/{id}", // url with parameters
&&&&&&&&&&&&&&& new { controller = "home", action = "index", id = urlparameter.optional },// parameter defaults
&&&&&&&&&&&&&&& new {},
&&&&&&&&&&&&&&& new string[] { "mvcapplication1.controllers" }//使用区域功能,而区域里面含有了相同名字的控制器的时候,使用此参数可以控制& 搜索到相同名字的 控制器而报错的问题
&&&&&&&&&&& );
&value cannot be null.
parameter name: assemblystring
系统找不到指定的文件。 (exception from hresult: 0x)
assembly.loadfile(path);
去找的时候,要把路径的\改成/
&could not load file or assembly
'xmblogs.web.sql.dal' or one of its dependencies. 系统找不到指定的文件。
工厂模式,跨项目引用另外一个项目,如果你引用的是dll,而不是直接引用项目的话(直接引用项目的话会在工程模式的那个项目下面的bin\debug生成一个xmblogs.web.sql.dal的dll文件),
如果反射使用= assembly.load(assemblyname)
的话,自己会去本项目的bin\debug下面查找为assemblyname的,而你如果引用dll则没有这个dll文件,使用assembly.loadfile(path)来反射。(且在web那个项目的bin中要有这个dll文件)
68. the object 'df__myphone__sunnum__07f6335a' is dependent
on column 'sunnum'.
alter table drop column sunnum failed because one or more
objects access this column.
说明:在删除字段的报错。 表中有一个叫df__myphone__sunnum__07f6335a的约束,用alter table myphone& drop constraint& df__myphone__sumnum__108b795b,删除在删除字段。
the sqlparameter is
already contained by another sqlparametercollection. 解决:没有释放
sqlparameter
&the sqlparameter is already contained by
another sqlparametercollection.
解决:/dudu/archive//19628.html
&procedure or function
'xmb_001_insertsystemmessage' expects parameter '@messagepeople', which was not
messagepeople'
不符合要求,可能为null或者超出字段长度
&asp.net mvc本地测试没报错,但是发布到外网就报错。
分析:因为你本地安装了asp.net
mvc所以不报错。asp.net mvc本身不要求
服务器必须安装了它。因为我们将system.web.mvc.dll和你或许用到的microsoft.web.mvc.dll直接放在\bin文件夹中部署就可以了,这种部署方式叫做私有部署,如果你买的空间没有安装asp.net mvc的话(即gac中没有上述的两个dll)通过私有部署的方式也很容易,另外如果你的服务器没有安装过.net framework sp1的话,你还需要将system.web.abstractions.dll和system.web.routing.dll也拷贝到你的\bin文件夹中。下面会详述这些。
asp.net mvc对我们买的虚拟服务器有什么样的要求
除了需要服务器支持asp.net
2.0和安装了.net frameworkd 3.5之外没有其他要求。所以我们看不到有空间提供商打广告说自己的空间支持asp.net mvc,因为通过把相关的放在\bin文件夹中你同样可以私有部署你的asp.net mvc项目。
&type 'system.runtimetype' with data contract
name 'runtimetype:http://schemas.datacontract.org/2004/07/system' is not
expected. consider using a datacontractresolver or add any types not known
statically to the list of known types - for example, by using the
knowntypeattribute attribute or by adding them to the list of known types
passed to datacontractserializer.
datacontractserializer serializer = new datacontractserializer(request.type);
&&&&&&& memorystream ms = new memorystream();
&&&&&&& serializer.writeobject(ms, request.data);
&&&&&&& string
= encoding.default.getstring(ms.toarray());
&&&&&&& ms.dispose();
&&&&&&& return new serializationresponse() {data = };
修改成type type = type.gettype(request.type);
&&&&&&& datacontractserializer serializer = new datacontractserializer(type, new type[]{type.gettype(request.type)});
&&&&&&& memorystream ms = new memorystream();
&&&&&&& serializer.writeobject(ms, request.data);
&&&&&&& string
= encoding.default.getstring(ms.toarray());
&&&&&&& ms.dispose();
&&&&&&& return new serializationresponse() {data = };
&error&&&&&&& 1&&&&&& 'xmblogs.web.model.shopcategory' is a 'type' but is used like a 'variable'&& d:\新建文件夹\新建文件夹\heima\xbblogs\xmblogs\xmblogswebsolution\xmblogs.web.ui\areas\shopping\controllers\homecontroller.cs&& 34&&&& 110 xmblogs.web.ui
解析:xmblogs.web.model.shopcategory是type类型要重写,如果原来是mon.convertor.listto&shopcategory&(listshopcategory, shopcategory);
要写成mon.convertor.listto&shopcategory&(listshopcategory,new shopcategory());
&datetime values that are greater than datetime.maxvalue or smaller than datetime.minvalue when converted to utc cannot be serialized to .
用调试去看,值得某个时间类型的字段得出来的值不在datetime类型内,常见得出来的值是&
0:00:00&,null,所以要保证时间在datetime规定的范围内
&datable转换为list集合的有数据但是数据都为null,原因在你datatble转换为list集合里面的方法,ropertyinfo[] propertys = _t.gettype().getproperties();& / //返回当前实例的所有属性
,你用调试去看,查看出来propertys的length为0,原因是list集合里面的类的要用属性而不用用字段,所以他查询出来的length为0,把字段修改成属性就行,如public改成public int shopcategoryid { }
window phone7向content或者resource文件里面写入东西时报错。 value does not fall within the expected range.。
解释:目前没办法向content或者resource类型的写入公司。
&&&&&&&&&&& //读取build action=resource类型的文件
&&&&&&&&&&& streamresourceinfo streaminfo = application.getresourcestream(new uri("/phoneapp1;component/resource.txt", urikind.relative));
&&&&&&&&&&& using (streamreader reader = new streamreader(streaminfo.stream))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& string txt = reader.readtoend();
&&&&&&&&&&&&&&& messagebox.show(txt);
&&&&&&&&&&&&&&& //reader
&&&&&&&&&&& }
&&&&&&&&&&& //读取build action=content类型的文件
&&&&&&&& &&&using (stream stream = microsoft.xna.framework.titlecontainer.openstream("content.txt"))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& using (streamreader reader = new streamreader(stream))
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& string txt = reader.readtoend();
&&&&&&& &&&&&&&&&&&&messagebox.show(txt);
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&&&&&& //或者
&&&&&&&&&&& //streamresourceinfo streaminfo = application.getresourcestream(new uri("content.txt", urikind.relativeorabsolute));
&&&&&&&&&&& //{
&&&&&&&&&&& //&&& using (streamreader reader = new streamreader(streaminfo.stream))
&&&&&&&&&&& //&&& {
&&&&&&&&&&& //&&&&&&& string txt = reader.readtoend();
&&&&&&&&&&& //&&&&&&& messagebox.show(txt);
&&&&&&&&&&& //&&& }
&&&&&&&&&&& //}
windows phone在做页面反转动画的时候错误: &hexadecimal value 0x0b, is an invalid character. line 17, position 55.&&&&&
分析:你从ppt或者网上copy下来的代码的编码格式可能跟你的widows phone的编码格式不一样(网上你添加一些特殊字符可能在你的vs里面看不到,但是在记事本(notepad等)里面就显示很清楚了。),你最好手动敲一遍。
&windows phone运动加速度感应器(accelerometer acc = new accelerometer();
&&&&&&&&&&& acc.currentvaluechanged += new eventhandler&sensorreadingeventargs&accelerometerreading&&(acc_currentvaluechanged);
&&&&&&&&&&& acc.start();
void acc_currentvaluechanged(object sender, sensorreadingeventargs&accelerometerreading& e)
&&&&&&&&&&& //引用microsoft.xna.framework
&&&&&&&&&&&&&&& textblock1.text= e.sensorreading.acceleration.x + "," + e.sensorreading.acceleration.y+","+e.sensorreading.acceleration.z;
&&&&&&&&&&
)的时候报错。 invalid cross-thread access.
解决:要用异步线程委托void acc_currentvaluechanged(object sender, sensorreadingeventargs&accelerometerreading& e)
&&&&&&&&&&& //引用microsoft.xna.framework
&&&&&&&&&&& dispatcher.begininvoke(()=&
&&&&&&&&&&&&&&& textblock1.text= e.sensorreading.acceleration.x + "," + e.sensorreading.acceleration.y+","+e.sensorreading.acceleration.z
&&&&&&&&&&&&&&& );
&&&&&&&&&&
&window phone 引用log4net报错:无法将引用添加到 xxxx引用他不是使用windows phone运行生成的。windows phone 项目将只使用windows phone
分析:windows phone采用的mscorlib.dll、system.dll等核心库是和桌面版本的.net是不一样的,经过了精简、优化、修改,所以不能引用普通桌面版本的dll,甚至不能直接引用浏览器版本silverlight的。
windows 使用socket报错:can not access a disposed object. object name: 'system.net.sockets.socket'.
如果是测试的话有可能是你停留的时间多长或者网络不稳定
&error&&&&&&& 1&&&&&& the type 'pcremote.server.socketcmdeventargs' cannot be used as type parameter 'teventargs' in the generic type or method 'system.eventhandler&teventargs&'. there is no implicit reference conversion from &xxxx& \socketserver.cs& 28 55&&&& pcremote.server
&由于套接字没有连接并且(当使用一个 sendto 调用发送数据报套接字时)没有提供地址,发送或接收数据的请求没有被接受。&
&一个封锁操作被对 wsacancelblockingcall 的调用中断。&
解析:因为有对象连接tcpclient或者没有对象连接的时候,关闭监听的时候报错。
解决:在报错的方法中获取当前的监听的tcplistener,用try{}catch (exception ex)
&&&&&&&&&&& {
&&&&&&&&&&&&&&& tcplistener.stop();
&&&&&&&&&&& }
&socket请求报错:在其上下文中,该请求的地址无效。&
socket所绑定的ip或者端口错误或者防火墙问题。
通常每个套接字地址(协议/网络地址/端口)只允许使用一次。& 解析:端口被暂用
&wpf的listbox绑定list数据集,有绑定数据,但是显示不出来。
原因:前端绑定要是类的属性名才行,不能用字段名,不然不行。
&invalid uri: the authority/host could not be parsed. 分析:uri地址错误
&/当用windows phone访问vs调试的网站项目的时候访问不了的原因是cassin(卡西尼) 服务器的时候只监听localhost
解决:可用iis或者端口映射器(portmap等),如果还是不行,可能是当前的端口被占用了。
an unhandled exception has occurred . click here to reload
分析:我的是因为之前显卡原因导致无缘无故系统桌面异常。(这个是微软的说明:/en-us/library/bb907398)
解决:重启vs就好,不然就重启电脑。
&error&&&&&&& 1&&&&&& could not load the assembly file:///d:\heima\heima\heima\windows phone2\windows phone\phoneapp3\library\newtonsoft..dll. this assembly may have been downloaded from the web.& if an assembly has been downloaded from the web, it is flagged by windows as being a web file, even if it resides on the local computer. this may prevent it from being used in your project. you can change this designation by changing the file properties. only unblock assemblies that you trust. see /fwlink/?linkid=179545 for more information.&&&&&&& phoneapp3
解析:文件安全问题 解决:文件右击属性:解决锁定。
&windows phone 页面无缘无故退出。& 分析:有地方出错,如果调试没有指定地方报错的话,可能是引用dll有问题。
windows phone在生成的时候错误:xap packaging failed. object reference not set to an instance of an.&& 分析:有可能是项目引用的dll出错,也有可能是哪个文件的名称同名了(我的就是在不同的文件夹下。但是同名了,这样会冲突)
&an unknown error has occurred. error: .
解析:windows phone做浏览器,自己在查询的页面手写一个javascriptfunction方法的时候,找不到javascript的function对象,不明。
primitive: xxxxx .解析:
有可能是你的出错,也有可能是下面的原因。
if it is a valid
object like&{'foo':'foovalue', 'bar':'barvalue'}&then
might not send it as
data but instead serialize it to&foor=foovalue&bar=barvalue&thus you get the error"invalid
primitive:&xxx
1默认支持的请求的类型必须是&http post
2请求的 content-type 必须是&application/; charset=utf-8
3 asp.net ajax script services and page methods& 能够理解并接受的参数只能是 的字符串。 这些字符串参数会在服务器自动的反序列化成为对象,被用作调用方法的参数。例子如下:
$.ajax({&&
&&&&type:&"post",&&
&&&&url:&"webservice.asmx/webmethodname",&&
&&&&data:&{&'fname':&'dave',&'lname':&'ward'&},&&
&&&&contenttype:&"application/;&charset=utf-8",&&
&&&&datatype:&""&&
英文说/questions/2445874/messageinvalid--primitive-recordid
http://blog.csdn.net/cooleader320/article/details/7745488
怎么想向后台传多个数据:
解决:后台向传的格式是
下面这些申明的是string 自己声明
= "[{ 'parentidstring': '0', 'downloadtypename': '" + yingyongwen + "', 'filesize': '', 'downurl': '' }";
+ "," + "{ 'parentidstring': '" + returnparentid + "', 'downloadtypename': '" + leixingming + "', 'filesize': '', 'downurl': '' }]";
$.post("/getdb/insertdownchildren", { array:
}, function (data) {
&&&&&&&&&&&&&&&&&&&&&& var s =
&&&&&&&&&&&&&&&&&& });
string or binary data would be truncated.
the statement has been terminated.
解析:字符串太长,有可能是你的列的设置的太短。
maximum request length
解析:之前请求加起来的长度超过最大值。
解决:在web.config的&system.web&里面放上
&httpruntime
maxrequestlength="21400" enable="true"
requestlengthdiskthreshold="512"
usefullyqualifiedredirecturl="false"
executiontimeout="45"/&
&could not load file or assembly 'xxx.web.sql.dal'
or one of its dependencies. 系统找不到指定的文件。
&login failed for user 'iis apppool\asp.net
&the process cannot access the
file 'd:\.txt' because it is being used by another
解决:创建文件如果不关闭会一直暂用着。file.create("'d:\.txt ").close();
&error&&&&&& 1&&&&&& whitespace is not
allowed after end of markup extension.
解析:textblock tag="showwindowclick" text="{binding title} " grid.column="1"&&/textblock&
在这个是事件绑定里面,&与{之间不能用空格。(window phone)
&&event handler is invalid 项目中有地方报错影响到这个事件不能生成,解法看上题。
nullreferenceexception 解析:在window phone在连接到网页的时候报错了,原因是是报错那个对象未实例化)
&an unknown error has
occurred. error: .
解析:找不到javascript的function的方法
&winphone 在查找时候报错:path cannot be absolute.&& 分析:你没有写是相对路径还是绝对路径
windows phone在做删除某个页面的时候:keynotfoundexception
说没找到,原因是你在把要某个页面设置显示的页面的时候找不到对象,这说明集合中没有,可能是你没有把页面的对象增加到集合里面或者集合的长度为0了。
&operation not permitted on
isolatedstoragefilestream.
解决:向独立存储中创建好一个文件之后,然后再次打开的时候报错,isolatedstoragefile.getuserstoreforapplication().createfile(返回的是isolatedstoragefilestream
,而isolatedstoragefile.getuserstoreforapplication().openfile()时又会去创建另外一个isolatedstoragefilestream,而前者并没有释放,因为就会出现出现这样的问题。索要要在创建之后把他close(),如果这个还报错的话,说明你之前操作那次没有把他关闭。)
&&&no segments* file found in
lucene.net.store.simplefsdirectory@c:\1017index: files:
解析:在没有创建索引之前(索引库为空),你进行查询调用& indexreader reader = indexreader.open(directory,true);所以会报报这个错。
an unhandled exception of t搜索此文相关文章:此文来自: 马开东博客
网址: 站长QQ
平时Error记录_博客园相关文章
博客园_总排行榜
博客园_最新
博客园_月排行榜
博客园_周排行榜
博客园_日排行榜

我要回帖

更多关于 it was not until 的文章

 

随机推荐