metawebblog api 是一个博客标准,这样我们就可以通过实现这个标准来实现 我们自己的博客支持word2007,windows liver writer来写博客. metablog的.net接口如下. using System;using System.Collections.Generic;using System.Text;using CookComputing.XmlRpc;namespace blog{ #region Structs public struct BlogInfo…
查看全文
/api/metaweblog/metawebloghandler.cs using System;using System.Collections.Generic;using System.IO;using System.Text;using System.Web;using System.Web.Security;using System.Xml;using BlogEngine.Core; namespace BlogEngine.Core.API.MetaWeblog{ /// <summary> /// HTTP Handler for MetaWeblog …
查看全文
我用c#,path.gettemppath().tostring()方法获取系统的临时路径是C:\Documents and Settings\Administrator\Local Settings\Temp但是我在iis中执行的时候,获取的临时路径为什么是C:\WINDOWS\Temp???IIS是以系统的账号运行,怎么可能拿到adminsitrator账号的文件夹呢?没有直接俄逻辑关系怎么可能只接拿呢?用这个拿拿…
查看全文
在发送ajax请求的时候,为了保证每次的都与服务器交互,就要传递一个参数每次都不一样,这里就用了时间戳大家在系统开发中都可能会在js中用到ajax或者dwr,因为IE的缓存,使得我们在填入相同的值的时候总是使用IE缓存,为了解决这个问题一般可以用一下方法:1:在ajax或者dwr提交的url后面加时间戳。例如http_request.onread…
查看全文
MetaWeblog API是一套基于XML-RPC通信协议的编程接口,是诸如Wordpress这样的Blog应用程序对外接口国际规范标准,通过MetaWeblog API,Blog应用可以对外公布Blog提供的服务,从而允许外面的程序能取得和设置Blog文章的文本或属性。目前大部分流行的Blog程序和工具都支持MetaWeblog API。一、什么是MetaWeblog API?MetaWebBl…
查看全文
private void GetImage(){ try { //验证码地址 Uri uri = new Uri("http://61.142.253.40:8085/CheckCode.aspx"); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri); //设置cookie,必须有下面这句代码,…
查看全文
在某些情况下,我们经常需要使用到多线程做一些操作,比如操作文件,如果在多线程中操作同一个文件,必然会发生多个线程同时操作文件的情况,那么此时会报“文件已经被其它程序打开”之类的错误。解决方法就是使用lock关键字进行锁定。下面是实例代码: private void btnStart_Click(object sender, EventArgs e) …
查看全文
前台$.ajax({ type: "get", cache: false, url: "/xxx/xxx/", success: function (retValue) { } });当前台使用get方式请求时,后台返回JSONResult必须设置JsonReq…
查看全文
首先,form表单的提交方法要声明为post,enctype属性声明为multipart/form-data。后台方法: //验证图片格式 public bool ValidateImg(string imgName) { string[] imgType = new string[] { "gif", "jpg", "png", "bmp" }; int i = 0; …
查看全文
在MVC中配置路由如下:routes.MapRoute( name: "Article", url: "{controller}/{action}/{id}.html", defaults: new { controller = "Article", action = "Detail", id = UrlParameter.Optional } );但是运行时,发现报错,提示无法找…
查看全文