随笔分类 -  VS.Net

VS.Net相关
摘要:使用Mvvmlight组件。节点数据也继承了viewmodelbase。但数据添加了节点后,UI却不更新。 阅读全文
posted @ 2021-01-21 17:41 疯狂二十九笔 阅读(497) 评论(0) 推荐(0)
摘要:1,webBrowser属性设置 /// <summary> /// 初始化浏览器 /// </summary> private void initWebBrowser() { webBrowser1.ScriptErrorsSuppressed = true; //防止 WebBrowser 控件 阅读全文
posted @ 2021-01-06 09:17 疯狂二十九笔 阅读(952) 评论(0) 推荐(0)
摘要:// absoluteExpiration: // 所插入对象将过期并被从缓存中移除的时间。 // 如果使用绝对过期,则 slidingExpiration 参数必须为 Cache.NoSlidingExpiration。 // // slidingExpiration: // 最后一次访问所插入对 阅读全文
posted @ 2017-04-26 09:25 疯狂二十九笔 阅读(947) 评论(0) 推荐(0)
摘要:1,对象 2,序列化类 3,给对象赋值,看序列化为xml是什么样子 结果: 4,如果想根节点School变成MySchool怎么办呢?只需要在School类上加一个标签: 结果: 或者: 或者: [XmlType("MySchool")] public class School { public s 阅读全文
posted @ 2017-02-09 22:12 疯狂二十九笔 阅读(4161) 评论(0) 推荐(2)
摘要:1,使用nuget安装SPring.Core。安装这个的同时,会把Common.Logging,Common.Logging.Core也装上。 2,建立对象配置xml文件。如图Objects.xml。(文件的属性要设置为嵌入的资源,不然在实例化容器的时候会找不到资源抛异常。) 3,实例化容器,三种方 阅读全文
posted @ 2016-11-15 15:38 疯狂二十九笔 阅读(316) 评论(0) 推荐(0)
摘要:两种方式:1,在cshtml中引入@using Admin.Models 2,在 Views 文件夹中的 Web.config 文件中添加引用如: 阅读全文
posted @ 2016-08-14 12:02 疯狂二十九笔 阅读(1015) 评论(0) 推荐(0)
摘要:1,[A]System.Web.WebPages.Razor.Configuration.HostSection 无法强制转换为 [B]System.Web.WebPages.Razor.Configuration.HostSection 解决办法:对比/view/web.config文件中的下列... 阅读全文
posted @ 2015-09-28 16:32 疯狂二十九笔 阅读(320) 评论(0) 推荐(0)
摘要:调试微信支付退款时,需要使用pfx证书,在本地调试时没有问题,但在服务器部署时报异常:System.Security.Cryptography.CryptographicException 出现了内部错误解决办法:IIS 应用程序池--》选择应用程序池-->高级配置 -->“加载用户配置文件” 设置... 阅读全文
posted @ 2015-05-29 11:33 疯狂二十九笔 阅读(579) 评论(0) 推荐(0)
摘要:从远程客户端访问服务器上的WebService能够显示,但点击调用相关的方法时显示“只能用于来自本地计算机的请求”,这时提醒我们还需要在服务器进行相关的配置才能让其他机器正常访问该WebService。具体配置方法如下:修改webconfig文件,在system.web节点下面加入下面代码?: 阅读全文
posted @ 2015-05-27 08:48 疯狂二十九笔 阅读(562) 评论(0) 推荐(0)
摘要:1,无法为具有固定名称“System.Data.SqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer”... 阅读全文
posted @ 2015-05-12 22:23 疯狂二十九笔 阅读(335) 评论(0) 推荐(0)
摘要:URL Rewrite Module下载地址:http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module1,下载后安装,重启IIS,即可出现url rewrite的模块。2,选择文件所在的文件夹,双击url rewrite进行配置(可以针不同的文件夹下的文件进行设置,只需要先中文件夹,然后双击UrlRewrite即可)add rules3,设置匹配模式4,设置要重写的地址5,应用,然后就可以用http://****/help来访问原来的http://****/help.aspx地址了 阅读全文
posted @ 2013-03-22 19:26 疯狂二十九笔 阅读(693) 评论(0) 推荐(0)
摘要:1. Framwork4.0以下在aspx页面头中加入validateRequest="false"即可。2.Framwork4.0以上先在web.config中加入<system.web> <compilation debug="true" targetFramework="4.0"/> <httpRuntime requestValidationMode="2.0"/> </system.web>然后在aspx页面头中加入validateRequest=" 阅读全文
posted @ 2013-03-21 14:07 疯狂二十九笔 阅读(164) 评论(0) 推荐(0)
摘要:今天在做资源抓取程序时遇到一个问题,用于下载资源的url并不是资源的真实url,在浏览器中点击,可以下载,但用代码下载回来的东西是一堆html源码。后来设置了httpreferer,下载正常了。1,HttpWebRequest下载Encoding encode = Encoding.GetEncoding(pagecode); //请求URL HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Referer = url;//r... 阅读全文
posted @ 2012-03-09 15:38 疯狂二十九笔 阅读(198) 评论(0) 推荐(0)
摘要:作用:把某字段中的某个值全部替换为另一个值declare @id intdeclare cursorID cursor for select id from T_Video where url like '%http://iilloo.com.cn%'open cursorIDfetch next from cursorID into @idwhile @@fetch_status=0begin declare @url varchar(500) select @url= url from T_Video where id=@id set @url=replace(@url,& 阅读全文
posted @ 2011-11-17 18:37 疯狂二十九笔 阅读(163) 评论(0) 推荐(0)
摘要:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Text;using System.IO;namespace EC{/// <summary>/// Fil 阅读全文
posted @ 2011-11-15 22:47 疯狂二十九笔 阅读(210) 评论(0) 推荐(0)