zoukankan      html  css  js  c++  java
  • C#动态设置webServer路径

    using BD.SD_BJXYZY_PRO.WsbxService;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Configuration;
    namespace BD.SD_BJXYZY_PRO.BJXYZY
    {
    /// <summary>
    /// 使用此类时第一步必须先调用DynamicLoadingUrl()方法
    /// </summary>
    public class myWebservice : WSBX
    {
    /// <summary>
    /// 根据/config/config.Xml文件动态设置webServer路径
    /// Author:lijia
    /// DateTime:2018-06-05
    /// </summary>
    public static myWebservice DynamicLoadingUrl()
    {
    string basePath = AppDomain.CurrentDomain.BaseDirectory;
    string WebServerUrl = HttpUtil.GetXmlAttributeValue(basePath + "/config/config.Xml", "WebServerUrl", "value");
    myWebservice service = new myWebservice();
    service.Url = WebServerUrl;
    return service;
    }
    }
    }

    使用:

    var ws= myWebservice.DynamicLoadingUrl();
    string pKey=ws.Open(Ztxx, Dwid, pZgid);

  • 相关阅读:
    python学习-3 字典
    python学习-3
    python学习-3
    python学习日记-2
    python学习日记
    FTP文件传输
    unity实现截屏功能
    使用C++来写数据库
    background使用
    一张图说明DIV盒子距离
  • 原文地址:https://www.cnblogs.com/hn_lijia/p/9140913.html
Copyright © 2011-2022 走看看