Write("<root>"); Response.Write(" <status>" + status + "</status>"); Response.Write(" <message>" + message + "</message>"); Response.Write("</root>"); Response.End(); } } }
Web.config <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="sysno" value="k8n6g2b0m1a6b0f6e8"></add> </appSettings> <system.web> <httpRuntime executionTimeout="3600" maxRequestLength="1048576"/> <compilation debug="true" defaultLanguage="c#" /> <customErrors mode="Off" /> <identity impersonate="true"/> <authentication mode="Forms"> <forms name="forums" path="/" loginUrl="Login.aspx" protection="All" timeout="40"> </forms> </authentication> <pages validateRequest="false"></pages> <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" uiCulture="zh-CN"/> </system.web> </configuration>
web.config的sysno要跟filemd5fun.asp里面的Apisysno保持一致,具体应用时应该要把这个key改成你自己的值来保证安全。 演示地址:http://www.shouji138.com/aspnet2/filemd5.asp |