Coder Social home page Coder Social logo

Comments (6)

daisukenishino avatar daisukenishino commented on May 26, 2024

Supplementary explanation

I want you to support the same settings as the ASP.NET Web service.

Although I think a lot of settings are supported in WCF,
Only setting in the same range as the ASP.NET Web service.

  • Authentication credentials information
    • UserName
    • Password
    • Domain
  • Proxy information
    • ProxyUrl
    • Authentication credentials information
      • PUserName
      • PPassword
      • PDomain
  • Client certificate
    • CertFile
    • CertPassword
  • Compression

In addition, they are set to Prop tag of TMProtocolDefinition.xml.

Please refer to the following documents for more information.

Examples of setting (set as a string) see below.

from opentouryo.

daisukenishino avatar daisukenishino commented on May 26, 2024

Settings on the XML is loaded into the Dictionary props.

Property that has been set in the XML is loaded by the following statement "Dictionary <string, string> props".

https://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/programs/C%23/Frameworks/Infrastructure/Framework/Transmission/CallController.cs#L373

// 名前解決(プロトコルURL)
CallController.PRT_NS.NameResolutionProtocolUrl(serviceName, out url, out timeout, out props);

from opentouryo.

daisukenishino avatar daisukenishino commented on May 26, 2024

The views on modification

(1) The following properties I think it's possible diversion.

  • _proxyUrlWCF(ProxyUrlWCF) is unnecessary because it can be diverted to _proxyUrl(ProxyUrl).
  • _nwcProxyWCF(NetworkCredentialToProxyWCF) is unnecessary because it can be diverted to _nwcProxy(NetworkCredentialToProxy).

from opentouryo.

daisukenishino avatar daisukenishino commented on May 26, 2024

The views on modification

(2) This code uses the props variable.
When not using end-point definition on the config file. However, I think not enough only definition of props variable. Therefore I want you to change to be overwritten by the definition of props variable after you use the end-point definition on the config file. I think to become a code such as the following.

else if (protocol == ((int)FxEnum.TmProtocol.WCF_HTTP).ToString())
{
  #region WCF : basicHTTPBinding、wsHTTPBinding

  // 都度newしても接続はプールされているので、オーバーヘッドは少ない(と思われる)。
  this.WCF_HTTP = new WCFHTTPSvcForFxClient(this.WCF_HTTP_EndPointConfigName, url);

  #region プロパティの設定

  // 現時点では全てConfig任せ(WCF_HTTP_EndPointConfigName)
  // ↓ Modified as follows.

  #region WASのクライアント認証のセキュリティ資格情報
  // WASのセキュリティ資格情報
  if (this._nwcWAS == null)
  {
    // ユーザ指定:なし
    if (!props.ContainsKey(FxLiteral.TRANSMISSION_HTTP_PROP_USER_NAME))// Dic化でnullチェック変更
    {
       // XML定義:キーが無い
    }
    else
    {
      if (props[FxLiteral.TRANSMISSION_HTTP_PROP_USER_NAME] == null
          || (string)props[FxLiteral.TRANSMISSION_HTTP_PROP_USER_NAME] == "")
      {
        // XML定義:null or 空文字列
      }
      else
      {
        // XML定義:あり
        // WASのセキュリティ資格情報を生成する。
        NetworkCredential nwcWAS = new NetworkCredential();
        nwcWAS.UserName = (string)props[FxLiteral.TRANSMISSION_HTTP_PROP_USER_NAME];

        ...Omission...

  #endregion

  // 同期呼び出しで実行(なぜか並びが変わるWCF_HTTP)
  ret = this.WCF_HTTP.DotNETOnlineWS(
  serviceName, ref contextObject,
  out returnValueObject, parameterValueObject);

  #endregion
}

system.serviceModel - bindings Section is possible that the Administrator is rewritten.
https://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/programs/C%23/Samples/WebApp_sample/ProjectX_sample/web.config#L279

I have assumed the required case a separate set for each user.
https://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/files/resource/Test/nw/Option%20(for%20example).txt

  • UserName=administrator;
  • Password=seigi;
  • Domain=Domain;
  • ProxyUrl=http://xxxxxxxx:8080;PUserName=PUserName;
  • PPassword=PPassword;
  • PDomain=PDomain;
  • UserAgent=UserAgent;
  • ConnGroupName=ConnGroupName;
  • Compression=true;
  • CertFile=C:\certnew.cer;CertPassword=CertPassword;

The following Property is not supported in WCF.

  • UserAgent=UserAgent;
  • ConnGroupName=ConnGroupName;
  • Compression=true;

from opentouryo.

daisukenishino avatar daisukenishino commented on May 26, 2024

The views on modification

(3) Requires proxy to test the proxy authentication.

  • Can you prepare the proxy by Linux?
  • However, if you want to use the Windows proxy,
    • you can use ISA Server or Windows 2012 R2 Web Application Proxy.
    • I will loan the MSDN software.

from opentouryo.

daisukenishino avatar daisukenishino commented on May 26, 2024

About the building of the proxy.

#49 (comment)

It's very useful that owns a Hyper-V environment. However, if it exceeds the rental period when building an environment Hyper-V, there is no need to build a Hyper-V environment.

What test status of the WCF Proxy property of communication control function? I think that building of Proxy will not be spent more than one month.

Please tell us about the time you spent to build the proxy.
Answer : IT team is working.

Little delay is no problem about delivery of this function.

from opentouryo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.