Solved

ClickOnce deployment doesn't handle registration COM User Control

Posted on 2009-05-13
4
421 Views
Last Modified: 2013-11-26
I have a VS2008 solution building a Outlook 2007 add-in. This add-in will create a new folder in Outlook with a asp page as home page. On this ASP a scriptis run, referencing a custom control loading data from SQLExpress.

When published on the development machine the Custom Control is registered and the Add-in works fine.
When deployment is run on target machine, the add-in installs but the script returns an error saying the Custom Control method called doesn't exists.

Attached code is from the User Control TimelogContact showing the Initialize code that is not accessible from page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title></title></head>
<body onload='OnBodyLoad()'>
      <script> function OnBodyLoad()
              {
                  var oApp = window.external.OutlookApplication;
                  TimelogContacts.Initialize(oApp);
              }
      </script>
    <object classid='clsid:6D5EC5A0-3F04-11DE-A97D-F85755D89593' id='TimelogContacts' height='100%'/>
</body>
</html>
using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using MSOutlook = Microsoft.Office.Interop.Outlook;
using Word = Microsoft.Office.Interop.Word;
using Excel = Microsoft.Office.Interop.Excel;
 
namespace TimelogAddIn
{
    [ComVisible(true)]
    [Guid("6D5EC5A0-3F04-11DE-A97D-F85755D89593")]
    public partial class TimelogContacts : UserControl
    {
        public event LoginAttemptEventHandler LoginAttempt;
        public delegate void LoginAttemptEventHandler(bool success, string siteCode, string apiInitials, string apiPassword);
        private TimelogAddIn.APILoginCredentials loginCredentials;
        private System.Globalization.CultureInfo _oldCI;
        public Word.Application _wordApp; 
        private Excel.Application _excelApp;
        private string _dir = "";
        private string _proj = "";
        // private string _cust = "";
        private object _oMissing = System.Reflection.Missing.Value;
 
        MSOutlook.Application _app = null;
 
        [ComVisible(true)]
        public void Initialize(MSOutlook.Application o)
        {
            _app = (MSOutlook.Application)o;
        }

Open in new window

0
Comment
Question by:MJellema
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:MJellema
ID: 24387940
Dear CodeCruiser,

Thank you for posting these links but I cannot see any solutions in them for my problem. Main reasons are all articles talk about Visual Studio 2005 (SE) and non address the clickOnce way to setup a COM add-in.

Any other parts on the web to look for an answer?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24390260
0
 

Accepted Solution

by:
MJellema earned 0 total points
ID: 24677319
Thank you CodeWarrior for your suggestions but non helped me out. I rewrote the code to make sure the class interface and all was in the main module of the code.
Now the ClickOnce works and no longer needs to register things it seems is not capable off.
Question is closed.
0

Featured Post

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question