我作了一个dcom
服务器端先配置我的dcom对象wz_server.login的身份验证级别为“无”,使用自定义访问权限  加  everyone,身份标识 为交互式用户  客户端:先拷贝wz_server 到客户端执行,再同服务器端一样的配置,不同的是去掉“在这台计算机上运行应用程序”选上“在下列计算机上运行应用程序”并选择服务器端
配置后 客户机必须用  administrator 登陆

解决方案 »

  1.   

    http://community.csdn.net/Expert/topic/3189/3189969.xml?temp=.4275324
      

  2.   

    http://community.csdn.net/Expert/topic/3170/3170015.xml?temp=.4635126
    你的配置有问题,可能不需要那么麻烦
      

  3.   

    http://community.csdn.net/Expert/topic/3170/3170015.xml?temp=.4635126
    是否说我不用dcom
    要用com+
      

  4.   

    dcom
    正确部署的方法是什么
      

  5.   

    使用vb建立DCOM服务器端及客户端应用的详细过程(1)      
    关键字:
    dcom , com ,dconcnfg.exe  贴文时间
    2001-5-29 14:34:59  文章类型: 
    翻译  给贴子投票  
      yangsaibing    翻译  出处: MSDN  
      
    使用vb建立dcom服务器端及客户端应用的详细过程(1)
       window9x,winnt server和winnt workstation平台都能支持dcom。
       本节介绍如何建立dcom服务器端应用,及其注意事项。(本人使用的是西文版vb6)
       一、建立如下目录:
       c:\dcomdemo
       c:\dcomdemo\server
       c:\dcomdemo\server\setup
       c:\dcomdemo\client
       c:\dcomdemo\client\setup
       二、构建server端dcom应用
        1.打开一个新的vb工程,在新工程对话框里,选择"activex exe"工程类型,打开工程,对该工程设置如下属性:      
       control             name        property         value
       ------------------------------------------------------------------
       class module        class1      (name)           clsdcomdemoserver
                                                  instancing       5 - multiuse
       2.拷贝如下代码到类模块clsdcomdemoserver:       option explicit       public function servertime()
               '返回服务器时间
               servertime = time
          end function   public function addnumbers(x as integer, y as integer) as  integer
               '使用服务器计算两数之和
               addnumbers = x + y
        end function      public function subtractnumbers(x as integer, y as integer) _
               as integer
               '计算两数之差
               subtractnumbers = x - y
          end function    3.在工程菜单, 单击 "project1 properties." 
         注意:如果你已经更改并保存过工程,现在工程名称将不会叫"project1"
       4.单击"general" 按钮,设置如下属性:    project type:             activex   startup object:           (none)               project name:             prodcomdemoserver    project description:      dcom demo project - server
          5.单击"make"按钮,设置如下属性:    auto increment:                     <checked>   application title:                  prodcomdemoserver version  
      6.单击"compile" 按钮,设置如下属性:    compile to p-code:       <selected>
       compile to native code:  <not selected>   其它选项无需有效.
      7.单击"component" 按钮,设置如下属性:    start mode:                  activex component
       remote server files:     <checked> 
       version compatibility:   project     注意:一定要选中"remote server files",目的用于生成vbr文件.
      8.单击"ok"   9.在"file"菜单, 单击"save project as". 保存为如下所述名称: 目录                   文件类型           文件名称                                                                               扩展名称
       ---------------------------------------------------------------------
       c:\dcomdemo\server    class module    comdemoserver     .cls
                                          project        prodcomdemoserver     .vbp   10.单击"file"菜单, 单击"make prodcomdemoserver.exe."   此时弹出一个对话框,保存exe文件到如下目录:   c:\dcomdemo\server directory.                               <待续> 
      

  6.   

    使用vb建立dcom服务器端及客户端应用的详细过程(2)   本节介绍如何建立dcom客户端应用,及其注意事项。(本人使用的是西文版vb6)    1.打开vb,在"file"菜单单击"new project",选择"standard exe"并单击"ok".    2.在"project"菜单, 单击"references".    3.单击"browse",选择"c:\dcomdemo\server\prodcomdemoserver.exe",单击"ok",
         并选中该引用.   4.在工程里插入一个模块,放置两个commandbutton, 两个textbox,以及三个label到form1上
         . 设置如下属性:   control         name              property         value
       ------------------------------------------------------------------
       module          module1           name       moddcomdemoclient         form            form1             name             frmdcomdemoclient
                                                caption          dcom demo - client   commandbutton  command1           name             cmdservertime
                                                           caption          &get server time                  command2              name             cmdcomputenumbers
                                                    caption          &compute numbers   text box        text1              name             txtx
                                                  tabstop          true
                                                  tabindex         0                   text2                    name             txty
                                                     tabstop          true
                                                    tabindex         1   label           label1            name             lblansweradd
                       label2            name             lblanswersubtract
                       label3            name             lblservertime
     注意:现在还不要给工程更改名称,即名称仍为"project1"
     
       5.拷贝如下代码到模块里,(不是form1上): 
          option explicit       public oserver as new   _ prodcomdemoserver.clsdcomdemoserver
       6.拷贝如下代码到frmdcomdemoclient代码窗口: 
          option explicit
          private sub form_load()
               '设置文本框的初始化值.
                txtx.text = "1"
                txty.text = "2"
          end sub      private sub txtx_gotfocus()
                txtx.selstart = 0
                txtx.sellength = len(txtx.text)
          end sub      private sub txty_gotfocus()
                txty.selstart = 0
                txty.sellength = len(txty.text)
            end sub      private sub cmdservertime_click()
               '获取服务器端的程序,并将返回值显示在lblservertime标签里.
               lblservertime.caption = oserver.servertime
          end sub      private sub cmdcomputenumbers_click()
                lblansweradd.caption = oserver.addnumbers _
                    (cint(txtx.text), cint(txty.text))
                lblanswersubtract.caption = oserver.subtractnumbers _
                    (cint(txtx.text), cint(txty.text))
          end sub      private sub form_queryunload(cancel as integer, unloadmode as _
                    integer)            set oserver = nothing
          end sub    7.在"project"菜单, 单击"project1 properties." 
       8.单击"general",设置如下属性:    project type:             standard exe        startup object:           frmdcomdemoclient     project description:      dcom demo project - client 
       9.单击"make",设置如下属性:    application title:                  prodcomdemoclient 
       10.单击"compile",设置如下属性:    compile to p-code:       <selected>   11.单击"ok"   12.在"file"菜单, 单击"save project as",保存的文件名称如下所述:    directory         file       filename           extension
       ----------------------------------------------------------------
       c:\dcomdemo\client  module       moddcomdemoclient     .bas
                           form1        frmdcomdemoclient     .frm
                           project      prodcomdemoclient     .vbp
       13.按"f5"按钮,测试客户端应用   14.测试完成,在"file"菜单, 单击"make prodcomdemoclient.exe".    15.将生成的exe文件保存到c:\dcomdemo\client   16.关闭客户端和服务器端应用.                           <待续>
      

  7.   

    使用vb建立dcom服务器端及客户端应用的详细过程(3) 分发服务器dcom应用:   事实上,你已经可以在你的机器上运行程序了.如果你能在两台机器上测试
    你的应用,它更能表达dcom分布的特点,在两台机器上,请按下列方法进行: 
       1.启动"package & deloyment wizard"安装打包工具   2.单击"browse",选择c:\dcomdemo\server\prodcomdemoserver.vbp文件   3.如果问是否重新编译,"yes"或"no"都行,单击"next"
       
       4.一直选择缺省设置,直到打包完成,并共享c:\dcomdemo\目录   5.在需要安装dcom服务器(winnt)的机器,找到共享目录,进入server\package目录,
         单击setup.exe文件,使用缺省安装;同时记录该服务器的ip地址,以备用   6.在dcom服务器上运行dconcnfg.exe,设置dcom
      
       7.找到prodcomdemoserver.clsdcomdemoserver,双击它,并设置其"访问"属性,
         "启动"属性(例如,在nt上建立一个用户abc,赋予用户abc拥有"访问"和"启动"
          prodcomdemoserver.clsdcomdemoserver的权限) 分发客户端dcom应用:
       1.在客户端机器运行regedit.exe程序,查找字符串clsdcomdemoserver,将与其
         相关的所有注册码删除,确保注册表不存在与clsdcomdemoserver相关的东西   2.启动"package & deloyment wizard"安装打包工具
       3.单击"browse",选择c:\dcomdemo\client\prodcomdemoclient.vbp文件
       4.单击next
       5.单击next
       6.出现客户端需要用到的文件,去掉prodcomdemoserver.exe文件,并增加
         对"c:\dcomdemo\server\prodcomdemoserver.vbr"文件的引用
       7.单击next
       8.在"网路地址"里填入刚才记录下来的ip地址
       9.使用缺省设置,完成剩下的打包工作.
       10.到c:\dcomdemo\client\package\目录,运行setup.exe文件
       11.测试应用,获取远程服务器的时间等.
      

  8.   

    通过注册表配置DCOM:Ⅰ.应用程序级配置
    现在我们以QQ.QQAPI(qq.exe)为例,其CLSID为{2D616D8F-F1BA-43A1-BEF0-E2A82A0FBD56}
    那么我们就可以使用编辑注册表
    =================================================================================
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{2D616D8F-F1BA-43A1-BEF0-E2A82A0FBD56}
    -------------------------
    常规 General
       中文说明:身份验证级别
       Description:Authentication Level 
       名称:AuthenticationLevel
       类型:(REG_DWORD)
       取值:
            0x00000000:(默认)      Default
            0x00000001:无          (None)
            0x00000002:连接        Connect
            0x00000003:调用        Call
            0x00000004:数据包      Packet
            0x00000005:数据包完整性 Packet Integrity
            0x00000006:数据包保密性 Packet Privacy
    -------------------------
    位置 Location
       中文说明:在数据所在的计算机运行应用程序 
       Description:Run application on the computer where the data is located
       名称:ActivateAtStorage
       类型:(REG_SZ)
       取值:Y:表示选上 其余反之
       
       中文说明:在此计算机上运行应用程序 
       Description:Run application on this computer
       名称:(未从注册表获得配置项) 
       [忽略]
       
       中文说明:在以下计算机上运行应用程序 
       Description:Run application on the following computer
       名称:RemoteServerName 
       类型:(REG_SZ) 
       取值:[计算机名]
    -------------------------
    标识 Identity
       名称:RunAs
       类型:(REG_SZ)
       取值:
           Interactive User:交互式用户 The interactive user
           [帐户]:实帐户               This user
           [为空或无此项表示登录用户]    The launching user
    -------------------------
    终结点 Endpoints
       名称:EndPoints 
       类型:(REG_MULTI_SZ) 
       取值:
           格式: [协议名][,][终结点属性][,][端口(无端口用一空格填充)]
    一、协议序列 Protocol Sequence
       1.协议序列:隧道 TCP/IP                (Tunneling TCP/IP)     
         值:ncacn_http 
       2.协议序列:数据报 UDP/IP              (Datagram UDP/IP)
         值:ncadg_ip 
       3.协议序列:面向连接的 SPX              (Connection-oriented SPX)
         值:ncacn_spx
         PS:不支持动态终结点
       4.协议序列:面向连接的 TCP/IP           (Connection-oriented TCP/IP)
         值:ncacn_ip_tcp 
       5.协议序列:面向连接的 NetBEUI          (Connection-oriented NetBEUI)
         值:ncacn_nb_nb
         PS:不支持动态终结点
       6.协议序列:面向连接的 IPX 上的 NetBEUI  (Connection-oriented Netbios over IPX)
         值:ncacn_nb_ipx
         PS:不支持动态终结点
       7.协议序列:数据报 IPX                  (Datagram IPX)
         值:ncadg_ipx 
         PS:不支持动态终结点
    二、终结点属性: Endpoint Assignment
       1.属性:禁用协议序列                   
         Desc:Disable protocol sequence
         值:3
       2.属性:使用默认终结点
         Desc:Use default endpoints
         值:0
       3.属性:使用静态终结点
         Desc:Use static endpoint
         值:0,端口
       4.属性:使用动态终结点的 Intranet 范围 
         Desc:Use Intranet range of dynamic endpoints
         值:2
       5.属性:使用动态终结点的 Internet 范围
         Desc:Use Internet range of dynamic endpoints
         值:1
    ---------------------------------------------------
    Ⅱ.全局配置 
    注册表键:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole默认属性 
    Default Properties
    ===============================================
    在这台计算机上启用分布式 COM
    Enable Distributed COM on this computer
    注册表值:EnableDCOM (REG_SZ) Y/N在这台计算机上启用 COM Internet 服务
    Enable COM Internet Services on this computer
    注册表值:EnableDCOMHTTP (REG_SZ) Y/N默认分布式 COM 的通讯属性
    Default Distributed COM communication properties
    ------------------------------------------------
      默认身份验证级别
      Default Authentication Level
      注册表值:LegacyAuthenticationLevel (REG_DWORD)
          默认值       Default          0x00000000
          (无)        (None)            0x00000001
          连接         Connect          0x00000002
          呼叫         Call             0x00000003
          数据包       Packet           0x00000004
          数据包隐私   Packet Integrity  0x00000005
          数据包整体性  Packet Privacy   0x00000006  默认模拟级别
      Default Impersonation Level
      注册表值:LegacyImpersonationLevel (REG_DWORD)
          匿名  Anonymous               0x00000001
          标识  Identify                0x00000002
          模拟  Impersonate             0x00000003
          委派  Delegate                0x00000004  为参考跟踪提供额外的安全措施
      Provide addtional security for reference tracking
      注册表值:LegacySecureReferences (REG_SZ) Y/N
      

  9.   

    用DCOM做到分布式系统,那在网络中客户端是通过何种方式与服务器建立联系的,用何种协议找到服务器的所在位置了,如果网络分布太大,并非是一幢办公楼的网络,是地区性的大网络,此种方式对处理速度上有没有问题存在,请赐教