提出问题提出问题
 

已答复Tab Just Won't Show Up

  • 2009年6月1日 5:58Robert L. Stinnett 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     包含代码
    Ok, so I made sure that my namespace and DLL name match (check and double-check) but my Tab is just now showing up.  The console log doesn't show anything that stands out (besides a strange negative error number I can't reference anywhere).

    Any ideas?
    Created at 6/1/2009 12:45:59 AM
    ***** Started at 6/1/2009 12:45:59 AM ***
    ***** Started at 6/1/2009 12:45:59 AM ***
    [1]090601.004600.5126: Error: Error -2147023728 in SendMessage
    [1]090601.004600.5282: Error: Error -2147023728 in SendMessage
    [1]090601.004600.5439: Error: Error -2147023728 in SendMessage
    [1]090601.004600.8407: BackupConfig: Error: Disconnected Backup Config
    [1]090601.004600.8720: BackupConfig: Error: Disconnected Backup Config
    [1]090601.004600.8720: Error: Client 6e758090-4594-47f5-888a-e973e4924c31 not found by BackupHelpers.FindClient
    [1]090601.004600.8720: Error: Client Microsoft.HomeServer.HomeServerConsoleTab.Health.ClientNotFoundException: 6e758090-4594-47f5-888a-e973e4924c31
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClient(ConfigurationRoot configurator, Guid pcGuid)
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClientNoThrow(ConfigurationRoot configurator, Guid pcGuid) not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client 5634b5ab-bd59-4ac9-ac97-2c9c425d98b4 not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client Microsoft.HomeServer.HomeServerConsoleTab.Health.ClientNotFoundException: 5634b5ab-bd59-4ac9-ac97-2c9c425d98b4
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClient(ConfigurationRoot configurator, Guid pcGuid)
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClientNoThrow(ConfigurationRoot configurator, Guid pcGuid) not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client 57051620-a0c8-4fa4-8812-cafad057f272 not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client Microsoft.HomeServer.HomeServerConsoleTab.Health.ClientNotFoundException: 57051620-a0c8-4fa4-8812-cafad057f272
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClient(ConfigurationRoot configurator, Guid pcGuid)
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClientNoThrow(ConfigurationRoot configurator, Guid pcGuid) not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client 9b430db1-b171-4ff3-a337-dd5123d8d993 not found by BackupHelpers.FindClient
    [1]090601.004600.8876: Error: Client Microsoft.HomeServer.HomeServerConsoleTab.Health.ClientNotFoundException: 9b430db1-b171-4ff3-a337-dd5123d8d993
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClient(ConfigurationRoot configurator, Guid pcGuid)
       at Microsoft.HomeServer.HomeServerConsoleTab.Health.BackupHelpers.FindClientNoThrow(ConfigurationRoot configurator, Guid pcGuid) not found by BackupHelpers.FindClient
    [1]090601.004600.9501: BackupConfig: Error: Disconnected Backup Config
    [1]090601.004604.0751: Error: Error -2147023728 in SendMessage
    [11]090601.004605.0438: Error: Backup percentage is -2147483648
    [11]090601.004605.0438: Error: Cannot invoke RefreshData for HealthControl
    [7]090601.004605.0438: Error: Cannot invoke RefreshData for HealthControl
    [7]090601.004605.0438: Error: Cannot invoke RefreshData for HealthControl
    [7]090601.004605.0438: Error: Cannot invoke RefreshData for HealthControl
    [7]090601.004605.0438: Error: Cannot invoke RefreshData for HealthControl
    [11]090601.004608.0438: Error: Backup percentage is -2147483648
    [11]090601.004608.0438: Error: Cannot invoke RefreshData for HealthControl
    [1]090601.004608.7469: Error: Cannot invoke RefreshData for HealthControl
    [1]090601.004608.7469: Error: Error -2147023728 in SendMessage
    [12]090601.004615.0437: Error: Backup percentage is -2147483648
    [17]090601.004636.0434: Error: Backup percentage is -2147483648
    [18]090601.004806.5423: Error: Backup percentage is -2147483648
    [19]090601.005107.0399: Error: Backup percentage is -2147483648
    [1]090601.005227.2268: Error: Error -2147023728 in SendMessage


    www.robertstinnett.com

答案

全部回复

  • 2009年6月2日 8:57Sam WoodMVP用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hi Robert,

    Can you post the namespace and DLL file name you're using? I know you've checked it already :) Also, it would help if you could post the code for your IConsoleTab/ITabExtender.

    Sometimes, if I'm desperate, I chuck in a throw new Exception() into the constructor, just to make sure my add-in is being called at all. That should cause something to show up in the log if WHS is trying to load your tab.
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
  • 2009年6月2日 15:13Ken WarrenMVP, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    ...
    Sometimes, if I'm desperate, I chuck in a throw new Exception() into the constructor,
    ...
    It amazes me sometimes, what the humble printf() has become...
    I'm not on the WHS team, I just post a lot. :)
  • 2009年6月2日 21:26Theo van Elsberg答复者用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    It amazes me sometimes, what the humble printf() has become...

    (*LOL*) That still is a great debuging tool, but lately I have switched to trace listeners and Studio's remote debugger....


    Robert,
    Check out Visual Studio remote debugging tool. This enables you to debug your code while running on the server from your development machine to see how it behaves. Your second option would be to add some additional logging routines that can write to a log/error file.

    Or else (must say I never tried if this works well for WHS addin's) you could add some simple Debug.Writelines and try running Sysinternal's DebugView utility on the server that runs your addin.

    - Theo.


    No home server like Home Server
  • 2009年6月3日 4:59Robert L. Stinnett 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     包含代码
    Thanks everyone for your replies. It's been a while since I did any programming, but wanted to port an old program over to WHS I wrote.  I am using Brendan Grant's templates.  Here is the base skeleton code, which doesn't work!

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Data;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.HomeServer.Extensibility;
    
    namespace Microsoft.HomeServer.HomeServerConsoleTab.WeatherAtHome
    {
        public class HomeServerSettingsExtender : ISettingsTab
        {
            private IConsoleServices consoleServices;
            private SettingsTabUserControl tabControl;
    
            public HomeServerSettingsExtender(int width, int height, IConsoleServices consoleServices)
            {
                this.consoleServices = consoleServices;
    
                tabControl = new SettingsTabUserControl(width, height, consoleServices);
    
                //Additional setup code here
    
    
            }
    
            public Guid SettingsGuid
            {
                get
                {
                    return new Guid("09988d44-36b2-42e4-afe9-a0f756ee4612");
                }
            }
    
            public Control TabControl
            {
                get
                {
                    return tabControl;
                }
            }
    
            public Bitmap TabImage
            {
                get
                {
                    return Properties.Resources.DefaultToolBarIcon;
                }
            }
    
            public string TabText
            {
                get
                {
                    return "Weather@Home";
                }
            }
    
            public bool Commit()
            {
                return false;
            }
    
            public bool GetHelp()
            {
                return false;
            }
        }
    }
    
    

    And here is the Assembly file...
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    
    // General Information about an assembly is controlled through the following 
    // set of attributes. Change these attribute values to modify the information
    // associated with an assembly.
    [assembly: AssemblyTitle("WeatherAtHome")]
    [assembly: AssemblyDescription("Weather Information and Severe Weather Alerts for Windows Home Server")]
    [assembly: AssemblyConfiguration("")]
    [assembly: AssemblyCompany("")]
    [assembly: AssemblyProduct("Weather@Home for WHS")]
    [assembly: AssemblyCopyright("Copyright ©  2009 Robert Stinnett")]
    [assembly: AssemblyTrademark("")]
    [assembly: AssemblyCulture("")]
    
    // Setting ComVisible to false makes the types in this assembly not visible 
    // to COM components.  If you need to access a type in this assembly from 
    // COM, set the ComVisible attribute to true on that type.
    [assembly: ComVisible(false)]
    
    // The following GUID is for the ID of the typelib if this project is exposed to COM
    [assembly: Guid("ac65b3cb-4256-47dc-a010-e98ed72f4113")]
    
    // Version information for an assembly consists of the following four values:
    //
    //      Major Version
    //      Minor Version 
    //      Build Number
    //      Revision
    //
    // You can specify all the values or you can default the Revision and Build Numbers 
    // by using the '*' as shown below:
    [assembly: AssemblyVersion("0.0.0.1")]
    [assembly: AssemblyFileVersion("0.0.0.1")]
    
    

    www.robertstinnett.com
  • 2009年6月3日 5:10Sam WoodMVP用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    So you're creating a Settings tab there - it's only going to show up in the WHS Console Settings dialog box. Is that what you're expecting?

    What's the file name of the assembly you're outputting?
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
  • 2009年6月3日 5:16Robert L. Stinnett 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     包含代码
    Yes, right now for step 1 all I want to do is display a tab in the console. Here is the code for that (again, basic skeleton). Neither way works. The output is called WeatherAtHome.dll
    <br/><br/>using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Data;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.HomeServer.Extensibility;
    
    namespace Microsoft.HomeServer.HomeServerConsoleTab.WeatherAtHome
    {
        public class HomeServerTabExtender : IConsoleTab
        {
            private IConsoleServices consoleServices;
            private MainTabUserControl tabControl;
    
            public HomeServerTabExtender(int width, int height, IConsoleServices consoleServices)
            {
                this.consoleServices = consoleServices;
    
                tabControl = new MainTabUserControl(width, height, consoleServices);
    
                //Additional setup code here
    
    
            }
    
            public Guid SettingsGuid
            {
                get
                {
                    return new Guid("09988d44-36b2-42e4-afe9-a0f756ee4612");
                }
            }
    
            public Control TabControl
            {
                get
                {
                    return tabControl;
                }
            }
    
            public Bitmap TabImage
            {
                get
                {
                    return Properties.Resources.DefaultToolBarIcon;
                }
            }
    
            public string TabText
            {
                get
                {
                    return "Weather@Home";
                }
            }
    
            public bool GetHelp()
            {
                return false;
            }
        }
    }
    
    



    www.robertstinnett.com
  • 2009年6月3日 5:18Sam WoodMVP用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    Try HomeServerConsoleTab.YourAddIn.dll
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/
  • 2009年6月3日 5:25Robert L. Stinnett 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Try HomeServerConsoleTab.YourAddIn.dll
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/

    Thank you!  This worked!  You don't know how many hours I've spent trying to track this down! 
    www.robertstinnett.com
  • 2009年6月3日 5:55Sam WoodMVP用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    No problem, Robert. Glad I could help.
    Tentacle Blog: http://www.tentaclesoftware.com/blog/
    WHS Disk Management: http://www.tentaclesoftware.com/WHSDiskManagement/