zoukankan      html  css  js  c++  java
  • (原)处理一个用户只能应用一个系统CS客户端

    场景:
            客户在使用系统过程中,系统中的数据会与外围耗材的唯一编号相关,为了防止误用他人耗材提出此需求。

    解决办法:

           逻辑层(示例代码,正式使用自己优化):
           
     1单点登录
         界面层,登录时代码:
         
    1 //增加单点登录验证
    2                        string strSSO = Provider.ConfigService.SSOLogin(Security.UserID, System.Net.Dns.GetHostName() + "("+System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName())[0].ToString()+")", CheckAddress());
    3                        if (strSSO != "")
    4                        {
    5                            MessageBox.Show("您已经在机器名为 " + strSSO + " 的计算机上进行登录,\n如非正常退出请回到原计算重新登录并安全退出!""提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    6                            Environment.Exit(0);
    7                        }
      

                       
                         退出时代码:
    1Provider.ConfigService.SSOLogout(Security.UserID);
  • 相关阅读:
    ModelForm中手动给某些字段赋值
    Ubuntu 18.04.4 LTS 安装Torch步骤
    High-Resolution Image Inpainting using Multi-Scale Neural Patch Synthesis
    Semantic Image Inpainting with Deep Generative Models
    Context Encoders: Feature Learning by Inpainting
    Focus Manipulation Detection via Photometric Histogram Analysis
    Learning to Detect Fake Face Images in the Wild
    A general approach to detect tampered and generated image
    Image splicing forgery detection combining coarse to refined convolutional neural network and adaptive clustering
    Detecting GAN-generated Imagery using Color Cues
  • 原文地址:https://www.cnblogs.com/spymaster/p/900842.html
Copyright © 2011-2022 走看看