杀鸡焉用牛刀 发表于 2023-1-5 23:32:54

Ajax+WCF+MySQL实现数据库部署并调用

​         最近的数据库课程要求将MySQL数据库部署在服务器上,参考了大佬们的博客后,总结一下。
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>先放上参考的大佬们的博客。
        【原创经验分享】JQuery(Ajax)调用WCF服务 <authentication mode="Forms"/>- <authentication mode="Forms"/>南宫萧尘 <authentication mode="Forms"/>- <authentication mode="Forms"/>博客园 <authentication mode="Forms"/>(cnblogs.com)
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>WinForm+WCF+mysql+http实现简单的用户登录注册_小瞄喵的博客-CSDN博客
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 未能加载文件或程序集“Renci.SshNet, <authentication mode="Forms"/>Version=2016.1.0.0, <authentication mode="Forms"/>Culture=neutral, <authentication mode="Forms"/>PublicKeyToken=……” <authentication mode="Forms"/>- <authentication mode="Forms"/>河耶悦子 <authentication mode="Forms"/>- <authentication mode="Forms"/>博客园 <authentication mode="Forms"/>(cnblogs.com)        
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>一、VS2019下载WCF组件
        进入到 C:\Program <authentication mode="Forms"/>Files <authentication mode="Forms"/>(x86)\Microsoft <authentication mode="Forms"/>Visual <authentication mode="Forms"/>Studio\Installer 文件夹下,打开 <authentication mode="Forms"/>vs_installer.exe。修改VS2019,点击单个组件,搜索WCF并下载安装。
https://img-blog.csdnimg.cn/17f9735d504b4ca9bf1d3375e960f865.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
https://img-blog.csdnimg.cn/9271ccb4cefc485a9818a3d78a104e3f.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
 
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>二、 新建WCF项目
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>新建VS项目,选择WCF服务应用程序。将IService.cs、Service.svc删除(如果你不需要的话)。
https://img-blog.csdnimg.cn/49e3bb5609944f26afd2af60621f8598.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
        添加新建项,选择WCF服务(支持Ajax)。
https://img-blog.csdnimg.cn/50e2bb37fbd743e09c4ce3727088c847.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 三、配置Web.config参数
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>打开Web.config,配置Forms身份验证。
<authentication mode="Forms"/>        https://img-blog.csdnimg.cn/341a89c54661446880d82f60268a3aff.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 右键单击 <authentication mode="Forms"/>Web.config,选择 <authentication mode="Forms"/>编辑WCF配置。
https://img-blog.csdnimg.cn/d9bd142b01564533b1326dec63c13cac.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 右键单击 <authentication mode="Forms"/>绑定,新建绑定配置。
https://img-blog.csdnimg.cn/297b24fc8e904174a9d2cfd810c75881.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>选择 <authentication mode="Forms"/>webHttpBinding,修改 <authentication mode="Forms"/>配置-Name,将 <authentication mode="Forms"/>常规-CrossDomainScriptAcessEnabled <authentication mode="Forms"/>设为 <authentication mode="Forms"/>True。
        https://img-blog.csdnimg.cn/18dcb17b30e54522b17bf48013951701.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
https://img-blog.csdnimg.cn/b1a93598ef27468daea770e4b6252a73.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 点击 <authentication mode="Forms"/>服务-终结点,修改Name, <authentication mode="Forms"/>在 <authentication mode="Forms"/>BindingConfiguration处绑定之前的“绑定”。
https://img-blog.csdnimg.cn/5d6aa5cc412d4033a50475c0ab553192.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>四、编写WCF服务
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>转到VS项目中之前创建的 <authentication mode="Forms"/>xxx.svc.cs文件中,添加如下两项。
https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gifhttps://img-blog.csdnimg.cn/23fd22fa9ef74bb8ad701c543d410fc4.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gifhttps://img-blog.csdnimg.cn/5463a8faf41e474580e535872f806ecb.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 在 <authentication mode="Forms"/> <authentication mode="Forms"/>下面编写函数。
<authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>First() <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>"OK"; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>/*有参数*/ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>Second(string <authentication mode="Forms"/>name) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>string <authentication mode="Forms"/>msg <authentication mode="Forms"/>= <authentication mode="Forms"/>string.Format("{0}success",name); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>msg; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>}  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 现在,保存项目,右键 <authentication mode="Forms"/>svc文件,在浏览器中查看。
https://img-blog.csdnimg.cn/62de662d520d4d0184589f2a2df99293.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>出现如下网页,说明前面没啥问题。
https://img-blog.csdnimg.cn/0571b692ce224a3dbdbcc176dcbc872e.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 五、创建HTML,调用服务
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>新建一个HTML文件,其中,getJSON的URL链接为上图出现的。
<authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 点击按钮,均有alert弹窗出现。
https://img-blog.csdnimg.cn/01f0f52bce9e4a849a533817539835f4.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 运行HTML文件没反应的,在同级目录下新建js文件夹,去网上下载 <authentication mode="Forms"/>jquery-1.8.3.min.js放进来。因为有一句 <authentication mode="Forms"/>src="js/jquery01.8.3-min.js"
        六、WCF连接MySQL
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>下载 <authentication mode="Forms"/>MySQL.Data.DLL(百度),右键项目-添加-引用,将下载的MySQL.Data.DLL加进去。
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>添加如下引用。
using <authentication mode="Forms"/>MySql.Data;using <authentication mode="Forms"/>MySql.Data.MySqlClient;using <authentication mode="Forms"/>System.Data;https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 配置MySQL,并创建连接。
​const <authentication mode="Forms"/>string <authentication mode="Forms"/>sqlconfig <authentication mode="Forms"/>= <authentication mode="Forms"/>"Server=localhost;Port=3306;Uid=root;Pwd=11111;Database=html1"; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>MySqlConnection <authentication mode="Forms"/>connection <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>MySqlConnection(sqlconfig);
https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 编写相应函数,完整svc.cs代码如下。
using <authentication mode="Forms"/>System;using <authentication mode="Forms"/>System.Collections.Generic;using <authentication mode="Forms"/>System.Linq;using <authentication mode="Forms"/>System.Runtime.Serialization;using <authentication mode="Forms"/>System.ServiceModel;using <authentication mode="Forms"/>System.ServiceModel.Activation;using <authentication mode="Forms"/>System.ServiceModel.Web;using <authentication mode="Forms"/>System.Text;using <authentication mode="Forms"/>MySql.Data;using <authentication mode="Forms"/>MySql.Data.MySqlClient;using <authentication mode="Forms"/>System.Data;namespace <authentication mode="Forms"/>databaseExport{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>class <authentication mode="Forms"/>dataService <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>// <authentication mode="Forms"/>格式转换:DataSet->JSON <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>DataTableToJSON(DataTable <authentication mode="Forms"/>dt) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>StringBuilder <authentication mode="Forms"/>jsonBuilder <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>StringBuilder(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("{\"Name\":\"" <authentication mode="Forms"/>+ <authentication mode="Forms"/>dt.TableName <authentication mode="Forms"/>+ <authentication mode="Forms"/>"\",\"Rows"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("\":["); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>for <authentication mode="Forms"/>(int <authentication mode="Forms"/>i <authentication mode="Forms"/>= <authentication mode="Forms"/>0; <authentication mode="Forms"/>i <authentication mode="Forms"/>< <authentication mode="Forms"/>dt.Rows.Count; <authentication mode="Forms"/>i++) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("{"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>for <authentication mode="Forms"/>(int <authentication mode="Forms"/>j <authentication mode="Forms"/>= <authentication mode="Forms"/>0; <authentication mode="Forms"/>j <authentication mode="Forms"/>< <authentication mode="Forms"/>dt.Columns.Count; <authentication mode="Forms"/>j++) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("\""); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append(dt.Columns.ColumnName); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("\":\""); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append(dt.Rows.ToString().Replace("\"", <authentication mode="Forms"/>"\\\"")); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("\","); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Remove(jsonBuilder.Length <authentication mode="Forms"/>- <authentication mode="Forms"/>1, <authentication mode="Forms"/>1); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("},"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Remove(jsonBuilder.Length <authentication mode="Forms"/>- <authentication mode="Forms"/>1, <authentication mode="Forms"/>1); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("]"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>jsonBuilder.Append("}"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>jsonBuilder.ToString(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>DataSetToJSON(DataSet <authentication mode="Forms"/>ds) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>StringBuilder <authentication mode="Forms"/>json <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>StringBuilder(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append("{\"Tables\":"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append("["); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>foreach <authentication mode="Forms"/>(System.Data.DataTable <authentication mode="Forms"/>dt <authentication mode="Forms"/>in <authentication mode="Forms"/>ds.Tables) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append(DataTableToJSON(dt)); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append(","); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Remove(json.Length <authentication mode="Forms"/>- <authentication mode="Forms"/>1, <authentication mode="Forms"/>1); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append("]"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>json.Append("}"); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>json.ToString(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>// <authentication mode="Forms"/>在此处添加更多操作并使用 <authentication mode="Forms"/> <authentication mode="Forms"/>标记它们 <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>/*无参数*/ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>First() <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>const <authentication mode="Forms"/>string <authentication mode="Forms"/>sqlconfig <authentication mode="Forms"/>= <authentication mode="Forms"/>"Server=localhost;Port=3306;Uid=root;Pwd=111111;Database=html1"; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>MySqlConnection <authentication mode="Forms"/>connection <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>MySqlConnection(sqlconfig); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>connection.Open(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>string <authentication mode="Forms"/>sql <authentication mode="Forms"/>= <authentication mode="Forms"/>"SELECT <authentication mode="Forms"/>* <authentication mode="Forms"/>FROM <authentication mode="Forms"/>test1"; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>MySqlDataAdapter <authentication mode="Forms"/>adapter <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>MySqlDataAdapter(sql, <authentication mode="Forms"/>connection); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>DataSet <authentication mode="Forms"/>ds <authentication mode="Forms"/>= <authentication mode="Forms"/>new <authentication mode="Forms"/>DataSet(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>adapter.Fill(ds); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>connection.Close(); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>DataSetToJSON(ds); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>/*有参数*/ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>public <authentication mode="Forms"/>string <authentication mode="Forms"/>Second(string <authentication mode="Forms"/>name) <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>{ <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>string <authentication mode="Forms"/>msg <authentication mode="Forms"/>= <authentication mode="Forms"/>string.Format("{0}success",name); <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>return <authentication mode="Forms"/>msg; <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>} <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/> <authentication mode="Forms"/>}} 
https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 点击 <authentication mode="Forms"/>工具-NuGet包管理器-程序包管理器控制台,运行如下命令,下载Renci.Ssh.NET.dll
NuGet\Install-Package <authentication mode="Forms"/>SSH.NET <authentication mode="Forms"/>-Version <authentication mode="Forms"/>2016.1.0https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gifhttps://img-blog.csdnimg.cn/dfced1dcc3c24b3db9dc9fc771688384.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 跟前面一样,在浏览器中跑一下WCF服务,打开之前的HTML,点击 <authentication mode="Forms"/>无参数调用WCF测试 <authentication mode="Forms"/>,出现如下内容,说明已经读取到数据库中内容。
https://img-blog.csdnimg.cn/b3f5dc5ceff948fd9252d78a3aa9c8d9.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 七、部署IIS
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>打开控制面板-程序-启用或关闭Windows功能,勾选并确定。https://img-blog.csdnimg.cn/a78a26c9cbc041a984271210221f5bc9.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
 
 https://img-blog.csdnimg.cn/e3a1824607a947559a344f90ff69d648.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 进入VS,右键项目,点击发布。选择方法为:文件系统,选择喜欢的目录,设置好后发布,如下图(该图引自WinForm+WCF+mysql+http实现简单的用户登录注册_小瞄喵的博客-CSDN博客)
https://img-blog.csdn.net/20180914105240429?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI1NTM3MTc3/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70https://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
 目录下会出现如下文件夹。
https://img-blog.csdnimg.cn/d7d4c01164ca4cffa1c4a72b33e53153.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
         点击 <authentication mode="Forms"/>控制面板-系统和安全-管理工具,点击第一个 <authentication mode="Forms"/>IIS。
https://img-blog.csdnimg.cn/3036baa26bcf421393603f84426fd7b0.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 右键单击 <authentication mode="Forms"/>网站,选择添加网站,确定网站名称,物理路径选择之前发布的目录。
https://img-blog.csdnimg.cn/ac87bae736f84310959006dff75da894.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 点击 <authentication mode="Forms"/>连接为,选择 <authentication mode="Forms"/>特定用户,输入你的电脑名称和登录密码。
https://img-blog.csdnimg.cn/fa8b7240bce8457c99ec13182a6a193f.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
        如果出现如下情况,检查密码是否错误。如果密码没问题,给电脑新建一个用户,用新建的用户和密码连接。
https://img-blog.csdnimg.cn/cedff1add77448068129e74c911da5de.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>如果连接成功,点击测试设置,应该出现下图。
https://img-blog.csdnimg.cn/ea0d9a98e6b74e648d6b77505fa81c5e.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 选择IP地址和端口号,点击确定即可。浏览创建的网站,如下图。
https://img-blog.csdnimg.cn/9f5adbbe1ff04d9095474653cc343110.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/> 最后,将HTML文件中的URL地址改为该地址。如图。
https://img-blog.csdnimg.cn/060807efcab34b67b94ee81396dbbd70.pnghttps://img2023.cnblogs.com/blog/3025759/202301/3025759-20230105180056379-105779404.gif​编辑
 
  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>  <authentication mode="Forms"/>OK,大功告成!

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: Ajax+WCF+MySQL实现数据库部署并调用