22
schangxiang@126.com
2024-12-25 30443483e37c7d323dca9c20d8407c3614acf542
22
已修改2个文件
41 ■■■■■ 文件已修改
CC/iWareCC_ASRS/FormCC.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/SdaMainForm.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.cs
@@ -28,6 +28,7 @@
using System.Net;
using System.ServiceModel;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using XiGang.Core.Model;
using XiGang.Core.Model.ViewModels;
@@ -279,22 +280,25 @@
            #region 对外发布WCF形式数据访问服务
            try
            Task.Run(() =>
            {
                #region 对外发布WCF形式数据访问服务
                var lineServiceHost = new ServiceHost(typeof(CCWcfService));
                lineServiceHost.Open();
                lbl_WCFMsg.Text = "发布WCF成功," + lineServiceHost.BaseAddresses[0].AbsoluteUri;
                lbl_WCFMsg.ForeColor = Color.Green;
                #endregion
                try
                {
                    #region 对外发布WCF形式数据访问服务
                    var lineServiceHost = new ServiceHost(typeof(CCWcfService));
                    lineServiceHost.Open();
                    lbl_WCFMsg.Text = "发布WCF成功," + lineServiceHost.BaseAddresses[0].AbsoluteUri;
                    lbl_WCFMsg.ForeColor = Color.Green;
                    #endregion
            }
            catch (Exception ex)
            {
                Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "发布WCF失败", ex);
                lbl_WCFMsg.Text = "发布WCF失败:" + ex.Message;
                lbl_WCFMsg.ForeColor = Color.Red;
            }
                }
                catch (Exception ex)
                {
                    Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "发布WCF失败", ex);
                    lbl_WCFMsg.Text = "发布WCF失败:" + ex.Message;
                    lbl_WCFMsg.ForeColor = Color.Red;
                }
            });
            #endregion
SDA/iWareSda/SdaMainForm.cs
@@ -12,7 +12,7 @@
using System.Linq;
using iWareCommon;
using Newtonsoft.Json.Linq;
using System.Threading.Tasks;
namespace iWareSda
{
@@ -108,8 +108,11 @@
            {
                #region 对外发布WCF形式数据访问服务
                var StationServiceHost = new ServiceHost(typeof(iWareSda.StationService));
                StationServiceHost.Open();
                Task.Run(() =>
                {
                    var StationServiceHost = new ServiceHost(typeof(iWareSda.StationService));
                    StationServiceHost.Open();
                });
                #endregion