1. asp.net generates xml file webservice. Call the interface: [csharp] public XmlDocument List () {XmlDocument doc = new XmlDocument (); StringBuilder sb = new StringBuilder (); IList <CityInfo> list = iCity. infoList (); sb. append ("<? Xml version = \ "1.0 \" encoding = \ "UTF-8 \"?> "); Sb. Append (" <data> "); if (list! = Null & list. count> 0) {foreach (CityInfo item in list) {sb. append (string. format ("<area id = {0} title = {1} alpha = {2} value = {3}/>", item. ID, item. title, item. alpha, item. value) ;}} sb. append ("</data>"); doc. innerXml = sb. toString (); return doc;} II. xml file generated by asp 1. After asp file is written, you can use [vb] Under IIS deployment. <! -- # Include file = "conn. asp" --> <% Response. ContentType = "text/xml" %> <? Xml version = "1.0" encoding = "UTF-8"?> <% Gdtmp = gdtmp & "<strategy>" & chr (13) & chr (10) set rs = server. createobject ("adodb. recordset ") SQL =" select * from tableInfo "set rs = server. createobject ("adodb. recordset ") rs. open SQL, conn12, 1, 1 do while not rs. eof mytime = rs ("mytime") val = rs ("val") preVal = rs ("preVal") amplitude = rs ("Amplitude ") gdtmp = gdtmp & "<item>" & chr (13) & chr (10) gdtmp = gdtmp & "<time> <! [CDATA ["& mytime &"]> </time> "& chr (13) & chr (10) gdtmp = gdtmp &" <val> <! [CDATA ["& val &"]> </val> "& chr (13) & chr (10) gdtmp = gdtmp &" <preVal> <! [CDATA ["& preVal &"]> </preVal> "& chr (13) & chr (10) gdtmp = gdtmp &" <ampltmp> <! [CDATA ["& ldata &"]> </amplr> "& chr (13) & chr (10) gdtmp = gdtmp & "</item>" & chr (13) & chr (10) I = I + 1 rs. movenext loop rs. close set rs = nothing conn12.close set conn12 = nothing gdtmp = gdtmp & "</strategy>" & chr (13) & chr (10) response. write gdtmp %> 2. conn. asp: configure the main file [vb] for connecting to the database <% @ LANGUAGE = "VBSCRIPT" %> <% on error resume next '. Put this line of code in conn. the first line of asp. 'Libor query dim DbServer12, DbName12, DbUserName12, DbPassword12 DbServer12 = "" DbName12 = "" DbUserName12 = "" DbPassword12 = "" connstr12 = "Provider = SQLOLEDB.1; data Source = "& DbServer12 &"; Initial Catalog = "& DbName12 &"; User ID = "& DbUserName12 &"; Password = "& DbPassword12 &"; "Set CONN12 = Server. createObject ("ADODB. connection ") conn12.ConnectionTimeout = 300 conn12.open connstr12 %> 3. If no configuration file is added. config can also Use [html] <? Xml version = "1.0" encoding = "UTF-8"?> <Configuration> <system. webServer> <directoryBrowse enabled = "true"/> </system. webServer> </configuration>