Automatically add trusted publisher to client store

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U3RldmVuIFRhbmc=?=

    #1

    Automatically add trusted publisher to client store


    I want to download pfx from my asp.net server, add the pfx to client's
    X509Store as
    a trusted publisher, Is it possible? my func in aspx is like this:

    void InstallCertific ation()
    {
    try{
    WebClient web = new WebClient();
    string url = "http:/myaspserver/mydir/mykey_2008.pfx" ;
    byte [] b = web.DownloadDat a(url);
    X509Certificate 2 cert = new X509Certificate 2(b, "password") ;
    X509Store store = new X509Store(Store Name.AuthRoot,
    StoreLocation.L ocalMachine);
    store.Open(Open Flags.ReadWrite );
    store.Add(cert) ;
    store.Close();
    store = new X509Store(Store Name.TrustedPub lisher,
    StoreLocation.L ocalMachine);
    store.Open(Open Flags.ReadWrite );
    store.Add(cert) ;
    store.Close();
    msg.Text = "Certificat ion installed";
    }
    catch(Exception e)
    {
    //MessageBox( e.ToString());
    msg.Text = e.ToString();
    }

    but the page will load pretty much longer time and show the error of
    System.net.webe xception that unable to connect to remote server
    (Actually myaspserver is working, the aspx and the pfx url is correct).

    Best Regards
    Steven
    --
    =============== ========
    Steven Tang
    SYWWUYU)
    **:)
  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Automatically add trusted publisher to client store

    where is this code running? if its in the codebehind, then the server is
    downloading a cert from itself, and trying to install it to itself. if this
    is what you are trying to do, then try localhost, so thats it a loopback, as
    it common to have outgoing port 80 blocked on a webserver.


    -- bruce (sqlwork.com)


    "Steven Tang" wrote:
    >
    I want to download pfx from my asp.net server, add the pfx to client's
    X509Store as
    a trusted publisher, Is it possible? my func in aspx is like this:
    >
    void InstallCertific ation()
    {
    try{
    WebClient web = new WebClient();
    string url = "http:/myaspserver/mydir/mykey_2008.pfx" ;
    byte [] b = web.DownloadDat a(url);
    X509Certificate 2 cert = new X509Certificate 2(b, "password") ;
    X509Store store = new X509Store(Store Name.AuthRoot,
    StoreLocation.L ocalMachine);
    store.Open(Open Flags.ReadWrite );
    store.Add(cert) ;
    store.Close();
    store = new X509Store(Store Name.TrustedPub lisher,
    StoreLocation.L ocalMachine);
    store.Open(Open Flags.ReadWrite );
    store.Add(cert) ;
    store.Close();
    msg.Text = "Certificat ion installed";
    }
    catch(Exception e)
    {
    //MessageBox( e.ToString());
    msg.Text = e.ToString();
    }
    >
    but the page will load pretty much longer time and show the error of
    System.net.webe xception that unable to connect to remote server
    (Actually myaspserver is working, the aspx and the pfx url is correct).
    >
    Best Regards
    Steven
    --
    =============== ========
    Steven Tang
    SYWWUYU)
    **:)

    Comment

    • =?Utf-8?B?U3RldmVuIFRhbmc=?=

      #3
      RE: Automatically add trusted publisher to client store

      Thank you for response, actually this piece of code suppose to run @ client
      computer and I'm trying to install the trust certification to the client
      computer
      who visit our aspx page which contains this piece of this code.

      Best Regards

      =============== ========
      Steven Tang
      SYWWUYU)
      **:)


      "bruce barker" wrote:
      where is this code running? if its in the codebehind, then the server is
      downloading a cert from itself, and trying to install it to itself. if this
      is what you are trying to do, then try localhost, so thats it a loopback, as
      it common to have outgoing port 80 blocked on a webserver.
      >
      >
      -- bruce (sqlwork.com)
      >
      >
      "Steven Tang" wrote:
      >

      I want to download pfx from my asp.net server, add the pfx to client's
      X509Store as
      a trusted publisher, Is it possible? my func in aspx is like this:

      void InstallCertific ation()
      {
      try{
      WebClient web = new WebClient();
      string url = "http:/myaspserver/mydir/mykey_2008.pfx" ;
      byte [] b = web.DownloadDat a(url);
      X509Certificate 2 cert = new X509Certificate 2(b, "password") ;
      X509Store store = new X509Store(Store Name.AuthRoot,
      StoreLocation.L ocalMachine);
      store.Open(Open Flags.ReadWrite );
      store.Add(cert) ;
      store.Close();
      store = new X509Store(Store Name.TrustedPub lisher,
      StoreLocation.L ocalMachine);
      store.Open(Open Flags.ReadWrite );
      store.Add(cert) ;
      store.Close();
      msg.Text = "Certificat ion installed";
      }
      catch(Exception e)
      {
      //MessageBox( e.ToString());
      msg.Text = e.ToString();
      }

      but the page will load pretty much longer time and show the error of
      System.net.webe xception that unable to connect to remote server
      (Actually myaspserver is working, the aspx and the pfx url is correct).

      Best Regards
      Steven
      --
      =============== ========
      Steven Tang
      SYWWUYU)
      **:)

      Comment

      • Allen Chen [MSFT]

        #4
        RE: Automatically add trusted publisher to client store

        Hi Steven,

        If you put a txt file in the same virtual directory where the pfx file
        locates and access it in the browser via http://myaspserver/mydir/test.txt
        can you see the content of the file? If you can, can you download it via
        the following code?

        WebClient web = new WebClient();
        string url = "http://myaspserver/mydir/test.txt";
        byte[] b = web.DownloadDat a(url);

        If you can from your description the following code does not work? (Please
        confirm it)

        WebClient web = new WebClient();
        string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
        byte[] b = web.DownloadDat a(url);

        Please test it and tell me the result. It can help to narrow down this
        issue. BTW, does your client machine need a proxy to access network
        resources? In addition please check the Firewall settings on both server
        side and client side as Bruce mentioned.

        Regards,
        Allen Chen
        Microsoft Online Support

        Delighting our customers is our #1 priority. We welcome your comments and
        suggestions about how we can improve the support we provide to you. Please
        feel free to let my manager know what you think of the level of service
        provided. You can send feedback directly to my manager at:
        msdnmg@microsof t.com.

        =============== =============== =============== =====
        Get notification to my posts through email? Please refer to
        http://msdn.microsoft.com/en-us/subs...#notifications.

        Note: MSDN Managed Newsgroup support offering is for non-urgent issues
        where an initial response from the community or a Microsoft Support
        Engineer within 2 business day is acceptable. Please note that each follow
        up response may take approximately 2 business days as the support
        professional working with you may need further investigation to reach the
        most efficient resolution. The offering is not appropriate for situations
        that require urgent, real-time or phone-based interactions. Issues of this
        nature are best handled working with a dedicated Microsoft Support Engineer
        by contacting Microsoft Customer Support Services (CSS) at
        http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
        =============== =============== =============== =====
        This posting is provided "AS IS" with no warranties, and confers no rights.

        --------------------
        | Thread-Topic: Automatically add trusted publisher to client store
        | thread-index: AclEKSJkghW7rZu GRE2zq6l2ncbgow ==
        | X-WBNR-Posting-Host: 207.46.193.207
        | From: =?Utf-8?B?U3RldmVuIFR hbmc=?= <steventang@com munity.nospam>
        | References: <BD2959C7-251E-4DEE-91C3-D433CF6FE3F1@mi crosoft.com>
        <EEFB4A12-55D8-4FF7-AC40-1093216CBA43@mi crosoft.com>
        | Subject: RE: Automatically add trusted publisher to client store
        | Date: Tue, 11 Nov 2008 10:13:01 -0800
        | Lines: 67
        | Message-ID: <5EE79F8A-3153-493F-831E-1C71091AD173@mi crosoft.com>
        | MIME-Version: 1.0
        | Content-Type: text/plain;
        | charset="Utf-8"
        | Content-Transfer-Encoding: 7bit
        | X-Newsreader: Microsoft CDO for Windows 2000
        | Content-Class: urn:content-classes:message
        | Importance: normal
        | Priority: normal
        | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
        | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        | Path: TK2MSFTNGHUB02. phx.gbl
        | Xref: TK2MSFTNGHUB02. phx.gbl
        microsoft.publi c.dotnet.framew ork.aspnet:7966 8
        | NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
        | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
        |
        | Thank you for response, actually this piece of code suppose to run @
        client
        | computer and I'm trying to install the trust certification to the client
        | computer
        | who visit our aspx page which contains this piece of this code.
        |
        | Best Regards
        |
        | =============== ========
        | Steven Tang
        | SYWWUYU)
        | **:)
        |
        |
        | "bruce barker" wrote:
        |
        | where is this code running? if its in the codebehind, then the server
        is
        | downloading a cert from itself, and trying to install it to itself. if
        this
        | is what you are trying to do, then try localhost, so thats it a
        loopback, as
        | it common to have outgoing port 80 blocked on a webserver.
        | >
        | >
        | -- bruce (sqlwork.com)
        | >
        | >
        | "Steven Tang" wrote:
        | >
        |
        | I want to download pfx from my asp.net server, add the pfx to
        client's
        | X509Store as
        | a trusted publisher, Is it possible? my func in aspx is like this:
        |
        | void InstallCertific ation()
        | {
        | try{
        | WebClient web = new WebClient();
        | string url = "http:/myaspserver/mydir/mykey_2008.pfx" ;
        | byte [] b = web.DownloadDat a(url);
        | X509Certificate 2 cert = new X509Certificate 2(b, "password") ;
        | X509Store store = new X509Store(Store Name.AuthRoot,
        | StoreLocation.L ocalMachine);
        | store.Open(Open Flags.ReadWrite );
        | store.Add(cert) ;
        | store.Close();
        | store = new X509Store(Store Name.TrustedPub lisher,
        | StoreLocation.L ocalMachine);
        | store.Open(Open Flags.ReadWrite );
        | store.Add(cert) ;
        | store.Close();
        | msg.Text = "Certificat ion installed";
        | }
        | catch(Exception e)
        | {
        | //MessageBox( e.ToString());
        | msg.Text = e.ToString();
        | }
        |
        | but the page will load pretty much longer time and show the error of
        | System.net.webe xception that unable to connect to remote server
        | (Actually myaspserver is working, the aspx and the pfx url is
        correct).
        |
        | Best Regards
        | Steven
        | --
        | =============== ========
        | Steven Tang
        | SYWWUYU)
        | **:)
        |

        Comment

        • =?Utf-8?B?U3RldmVuIFRhbmc=?=

          #5
          RE: Automatically add trusted publisher to client store

          Hello Allen,
          I created a simple WPF app tested follow. see embedded content>

          "Allen Chen [MSFT]" wrote:
          Hi Steven,
          >
          If you put a txt file in the same virtual directory where the pfx file
          locates and access it in the browser via http://myaspserver/mydir/test.txt
          Yes, the browser will show the content.
          can you see the content of the file? If you can, can you download it via
          the following code?
          >
          WebClient web = new WebClient();
          string url = "http://myaspserver/mydir/test.txt";
          byte[] b = web.DownloadDat a(url);
          >
          Yes, it is downloadable.
          If you can from your description the following code does not work? (Please
          confirm it)
          >
          WebClient web = new WebClient();
          string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
          byte[] b = web.DownloadDat a(url);
          >
          This is also download able in the wpf test app.
          Please test it and tell me the result. It can help to narrow down this
          issue. BTW, does your client machine need a proxy to access network
          resources? In addition please check the Firewall settings on both server
          side and client side as Bruce mentioned.
          >
          Regards,
          Allen Chen
          Microsoft Online Support
          >
          If WPF testapp work, in general aspx shall work, both of them call .net
          am I right? but it seems that the aspx would not work.

          Best Regards
          Steven

          Comment

          • Allen Chen [MSFT]

            #6
            RE: Automatically add trusted publisher to client store

            Hi Steven,

            I remember the proxy detection of ASP.NET applications is different from
            that of desktop applications. Could you try to explicitly specify the proxy
            to see if it works?


            WebClient web = new WebClient();
            web.Proxy = WebProxy.GetDef aultProxy();
            string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
            byte[] b = web.DownloadDat a(url);

            Regards,
            Allen Chen
            Microsoft Online Community Support
            --------------------
            | Thread-Topic: Automatically add trusted publisher to client store
            | thread-index: AclElYnLcw0IzIw 4SM6enZmHKgN7FQ ==
            | From: =?Utf-8?B?U3RldmVuIFR hbmc=?= <steventang@com munity.nospam>
            | References: <BD2959C7-251E-4DEE-91C3-D433CF6FE3F1@mi crosoft.com>
            <EEFB4A12-55D8-4FF7-AC40-1093216CBA43@mi crosoft.com>
            <5EE79F8A-3153-493F-831E-1C71091AD173@mi crosoft.com>
            <RHAx1$GRJHA.34 40@TK2MSFTNGHUB 02.phx.gbl>
            | Subject: RE: Automatically add trusted publisher to client store
            | Date: Tue, 11 Nov 2008 23:09:00 -0800
            | Lines: 47
            | Message-ID: <0C42BA65-F50D-45F1-81E1-36C4E4B5D543@mi crosoft.com>
            | MIME-Version: 1.0
            | Content-Type: text/plain;
            | charset="Utf-8"
            | Content-Transfer-Encoding: 7bit
            | X-Newsreader: Microsoft CDO for Windows 2000
            | Content-Class: urn:content-classes:message
            | Importance: normal
            | Priority: normal
            | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
            | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
            | Path: TK2MSFTNGHUB02. phx.gbl
            | Xref: TK2MSFTNGHUB02. phx.gbl
            microsoft.publi c.dotnet.framew ork.aspnet:7971 0
            | NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
            | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
            |
            | Hello Allen,
            | I created a simple WPF app tested follow. see embedded content>
            |
            | "Allen Chen [MSFT]" wrote:
            |
            | Hi Steven,
            | >
            | If you put a txt file in the same virtual directory where the pfx file
            | locates and access it in the browser via

            |
            | Yes, the browser will show the content.
            |
            | can you see the content of the file? If you can, can you download it
            via
            | the following code?
            | >
            | WebClient web = new WebClient();
            | string url = "http://myaspserver/mydir/test.txt";
            | byte[] b = web.DownloadDat a(url);
            | >
            |
            | Yes, it is downloadable.
            |
            | If you can from your description the following code does not work?
            (Please
            | confirm it)
            | >
            | WebClient web = new WebClient();
            | string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
            | byte[] b = web.DownloadDat a(url);
            | >
            |
            | This is also download able in the wpf test app.
            |
            | Please test it and tell me the result. It can help to narrow down this
            | issue. BTW, does your client machine need a proxy to access network
            | resources? In addition please check the Firewall settings on both
            server
            | side and client side as Bruce mentioned.
            | >
            | Regards,
            | Allen Chen
            | Microsoft Online Support
            | >
            |
            | If WPF testapp work, in general aspx shall work, both of them call .net
            | am I right? but it seems that the aspx would not work.
            |
            | Best Regards
            | Steven
            |

            Comment

            • =?Utf-8?B?U3RldmVuIFRhbmc=?=

              #7
              RE: Automatically add trusted publisher to client store

              Hi Allen,
              Sorry that I didn't response this due to busy on other stuff. I tried
              updated the
              aspx page and added Proxy = WebProxy.GetDef aultProxy(), when I visit this
              page
              from client side (I called the InstallCertific ation in the Page_Load), the
              browser says that:
              System.Net.WebE xception: Unable to connect to the remote server --->
              System.Net.Sock ets.SocketExcep tion: No connection could be made because the
              target machine actively refused it 127.0.0.1:8080 at
              System.Net.Sock ets.Socket.DoCo nnect(EndPoint endPointSnapsho t, SocketAddress
              socketAddress) at System.Net.Sock ets.Socket.Inte rnalConnect(End Point
              remoteEP) at System.Net.Serv icePoint.Connec tSocketInternal (Boolean
              connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address,
              ConnectSocketSt ate state, IAsyncResult asyncResult, Int32 timeout, Exception&
              exception) --- End of inner exception stack trace --- at
              System.Net.WebC lient.DownloadD ataInternal(Uri address, WebRequest& request)
              at System.Net.WebC lient.DownloadD ata(Uri address) at
              System.Net.WebC lient.DownloadD ata(String address) at
              ASP.xweb_index_ aspx.InstallCer tification()

              All the best
              --
              =============== ========
              Steven Tang
              SYWWUYU)
              **:)


              "Allen Chen [MSFT]" wrote:
              Hi Steven,
              >
              I remember the proxy detection of ASP.NET applications is different from
              that of desktop applications. Could you try to explicitly specify the proxy
              to see if it works?
              >
              >
              WebClient web = new WebClient();
              web.Proxy = WebProxy.GetDef aultProxy();
              string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
              byte[] b = web.DownloadDat a(url);
              >
              Regards,
              Allen Chen

              Comment

              • Allen Chen [MSFT]

                #8
                RE: Automatically add trusted publisher to client store

                Hi Steven,

                Thanks for your update.

                Are you accessing the 80 port or the 8080 port? From the code you provided
                previously you're accessing the 80 port. See below:

                WebClient web = new WebClient();
                string url = "http://myaspserver/mydir/test.txt";
                byte[] b = web.DownloadDat a(url);

                However, from the exception it seems you're using this url:
                string url = "http://myaspserver:808 0/mydir/test.txt";

                Could you clarify which url you're using? If it is 8080 please check if the
                TCP port of this site has been set as 8080 in IIS.


                For further investigation please also provide the IIS version and the
                operating system you're using.

                Regards,
                Allen Chen
                Microsoft Online Support

                --------------------
                | Thread-Topic: Automatically add trusted publisher to client store
                | thread-index: AclILeI2tNdcfOb dRf+REkafcpvKkQ ==
                | X-WBNR-Posting-Host: 207.46.193.207
                | From: =?Utf-8?B?U3RldmVuIFR hbmc=?= <steventang@com munity.nospam>
                | References: <BD2959C7-251E-4DEE-91C3-D433CF6FE3F1@mi crosoft.com>
                <EEFB4A12-55D8-4FF7-AC40-1093216CBA43@mi crosoft.com>
                <5EE79F8A-3153-493F-831E-1C71091AD173@mi crosoft.com>
                <RHAx1$GRJHA.34 40@TK2MSFTNGHUB 02.phx.gbl>
                <0C42BA65-F50D-45F1-81E1-36C4E4B5D543@mi crosoft.com>
                <UeTPiTVRJHA.16 72@TK2MSFTNGHUB 02.phx.gbl>
                | Subject: RE: Automatically add trusted publisher to client store
                | Date: Sun, 16 Nov 2008 12:57:06 -0800
                | Lines: 46
                | Message-ID: <0B325CF4-9D79-4AB3-803B-381B9E4B4D3D@mi crosoft.com>
                | MIME-Version: 1.0
                | Content-Type: text/plain;
                | charset="Utf-8"
                | Content-Transfer-Encoding: 7bit
                | X-Newsreader: Microsoft CDO for Windows 2000
                | Content-Class: urn:content-classes:message
                | Importance: normal
                | Priority: normal
                | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
                | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
                | Path: TK2MSFTNGHUB02. phx.gbl
                | Xref: TK2MSFTNGHUB02. phx.gbl
                microsoft.publi c.dotnet.framew ork.aspnet:7997 7
                | NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
                | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
                |
                | Hi Allen,
                | Sorry that I didn't response this due to busy on other stuff. I tried
                | updated the
                | aspx page and added Proxy = WebProxy.GetDef aultProxy(), when I visit
                this
                | page
                | from client side (I called the InstallCertific ation in the Page_Load),
                the
                | browser says that:
                | System.Net.WebE xception: Unable to connect to the remote server --->
                | System.Net.Sock ets.SocketExcep tion: No connection could be made because
                the
                | target machine actively refused it 127.0.0.1:8080 at
                | System.Net.Sock ets.Socket.DoCo nnect(EndPoint endPointSnapsho t,
                SocketAddress
                | socketAddress) at System.Net.Sock ets.Socket.Inte rnalConnect(End Point
                | remoteEP) at System.Net.Serv icePoint.Connec tSocketInternal (Boolean
                | connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address,
                | ConnectSocketSt ate state, IAsyncResult asyncResult, Int32 timeout,
                Exception&
                | exception) --- End of inner exception stack trace --- at
                | System.Net.WebC lient.DownloadD ataInternal(Uri address, WebRequest&
                request)
                | at System.Net.WebC lient.DownloadD ata(Uri address) at
                | System.Net.WebC lient.DownloadD ata(String address) at
                | ASP.xweb_index_ aspx.InstallCer tification()
                |
                | All the best
                | --
                | =============== ========
                | Steven Tang
                | SYWWUYU)
                | **:)
                |
                |
                | "Allen Chen [MSFT]" wrote:
                |
                | Hi Steven,
                | >
                | I remember the proxy detection of ASP.NET applications is different
                from
                | that of desktop applications. Could you try to explicitly specify the
                proxy
                | to see if it works?
                | >
                | >
                | WebClient web = new WebClient();
                | web.Proxy = WebProxy.GetDef aultProxy();
                | string url = "http://myaspserver/mydir/ mykey_2008.pfx" ;
                | byte[] b = web.DownloadDat a(url);
                | >
                | Regards,
                | Allen Chen
                |
                |

                Comment

                • =?Utf-8?B?U3RldmVuIFRhbmc=?=

                  #9
                  RE: Automatically add trusted publisher to client store

                  Hello Allen,
                  I tried to update the path and no file download issue anymore, but the
                  trust
                  will not be added to the client computer and it shows that X509 cannot be
                  applied.
                  It looks like the code download the prx file from itself and then try to add
                  the trust
                  to the server computer, not the client computer.
                  You know the aspx is the server side code, Is there any way to modify
                  the
                  code let:
                  When client computer visit this aspx page,
                  this aspx page download the prx to the client system and install it into
                  the client computer?

                  Best Regards
                  Steven

                  --
                  =============== ========
                  Steven Tang
                  SYWWUYU)
                  **:)


                  "Allen Chen [MSFT]" wrote:
                  Hi Steven,
                  >
                  Thanks for your update.
                  >
                  Are you accessing the 80 port or the 8080 port? From the code you provided
                  previously you're accessing the 80 port. See below:
                  >
                  WebClient web = new WebClient();
                  string url = "http://myaspserver/mydir/test.txt";
                  byte[] b = web.DownloadDat a(url);
                  >
                  However, from the exception it seems you're using this url:
                  string url = "http://myaspserver:808 0/mydir/test.txt";
                  >
                  Could you clarify which url you're using? If it is 8080 please check if the
                  TCP port of this site has been set as 8080 in IIS.

                  >
                  For further investigation please also provide the IIS version and the
                  operating system you're using.
                  >
                  Regards,
                  Allen Chen
                  Microsoft Online Support
                  >

                  Comment

                  • Allen Chen [MSFT]

                    #10
                    RE: Automatically add trusted publisher to client store

                    Hi Steven,

                    Firstly, for the security reason, automatically downloading and adding the
                    pfx to the X509Store is not recommended.

                    If we have to do so we need to use ActiveX. However, we cannot ensure if
                    the clients have enabled ActiveX. If they don't we cannot achieve the
                    requirement.

                    Following article demonstrates how to create an MFC ActiveX control:



                    Another option is to let your customer download a console application and
                    run it. You can put your code in the console application. Then add a
                    download link on the page to notify your customers. Though it's not an
                    ideal means I think it's a more secure way for your customers.

                    Please let me know if you need further assistance.

                    Regards,
                    Allen Chen
                    Microsoft Online Community Support

                    Comment

                    Working...