lougon

导航

文章分类 -  asp.net

Asp.Net应用程序中为什么要MachineKey?如何生成MachineKey?
摘要:如果你的Asp.Net程序执行时碰到这种错误:“验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。”那么说明你没有让你的应用程序使用统一的machineKey,那么machineKey的作用是什么呢?按照MSDN的标... 阅读全文

posted @ 2010-04-23 16:47 lougon 阅读(127) 评论(0) 推荐(0)

ASP.NET machineKey的作用和使用方法
摘要:ASP.NET machineKey的作用如果你的Asp.Net程序执行时碰到这种错误:“验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。”那么说明你没有让你的应用程序使用统一的machineKey,那么machi... 阅读全文

posted @ 2010-04-20 11:31 lougon 阅读(437) 评论(0) 推荐(0)

应用程序中向web服务post多文件和post参数
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> public static string UploadFileEx( string url, System.Web.HttpFileCollection files, ... 阅读全文

posted @ 2008-10-31 15:35 lougon 阅读(620) 评论(0) 推荐(0)

取出网页的临时文件
摘要:using System;using System.Runtime.InteropServices;namespace post{ /// /// IECache 的摘要说明。 /// public class IECache { public IECache() { // // TODO: ... 阅读全文

posted @ 2007-07-13 12:45 lougon 阅读(1585) 评论(0) 推荐(0)

C#.NET分别以GET和POST方式抓取远程页面
摘要:引入命名空间using System.IO;using System.Net;using System.Text;using System.Text.RegularExpressions;//以GET方式抓取远程页面内容 public string Get_Http(string tUrl) { string strResult; try {... 阅读全文

posted @ 2007-07-11 10:32 lougon 阅读(629) 评论(1) 推荐(0)

ASP.net DropDownList 无刷新联动!
摘要:WebForm2 -----------------------namespace dropDown{ /**//// /// WebForm2 的摘要说明。 /// public class WebForm2 : System.Web.UI.Page { protected System.Web.UI.WebControls.DropDownList... 阅读全文

posted @ 2006-09-20 00:00 lougon 阅读(264) 评论(0) 推荐(0)

常用正则表达式
摘要:"^\d+$" //非负整数(正整数 + 0) "^[0-9]*[1-9][0-9]*$" //正整数 "^((-\d+)|(0+))$" //非正整数(负整数 + 0) "^-[0-9]*[1-9][0-9]*$" //负整数 "^-?\d+$" //整数 "^\d+(\.\d+)?$" //非负浮点数(正浮点数 + 0) "^(([0-9]+\.[0-9]*[1-9][0-9... 阅读全文

posted @ 2006-09-11 17:10 lougon 阅读(226) 评论(0) 推荐(0)