Announcement

Collapse
No announcement yet.

Custom interface compilation error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom interface compilation error

    HS,
    I'm working on setting up a custom interface in asp 2, c#.
    I've looked at the test.aspx in the html directory and more or less copied this item, however it stumbles at compilation on the command...

    hs = global::ASP.global_asax.hs;

    Asking if I missed a reference...
    Also, iis doesn't like the hs.version method call either (I assumed this wouldn't work at first glance because 'hs' is type object - am I missing a cast?).
    How do I get the reference to that hs object?
    Thanks,
    Tim W.

    PS. Answering in VB is acceptable, I will happily do the conversion if I can find the answer.

    #2
    Full code and output

    Code:
    private object hs;
    
        protected void Page_Load(object sender, EventArgs e)
        {
            hs = Context.Items["Content"];
    
            if (hs == null)
            {
                //hs = global::ASP.global_asax.hs;
    
                //if (hs == null)
                {
                    Response.Write("Could not get access to HomeSeer object, is HomeSeer running?");
                }
            }
            else
            {
                label1.Text = "Homeseer Versions: " + hs.ToString();
            }
        }
    output:
    Could not get access to HomeSeer object, is HomeSeer running?

    Comment


      #3
      This code will not work with IIS but rather only within in the HS server context. IE HomeSeer 2/html directory
      -Rupp
      sigpic

      Comment


        #4
        HS Application

        That would make more sense.
        If that is the case. What version of asp.net is hs built on?
        Are there any limitations?

        Comment


          #5
          Also

          After directing the browser to test.aspx, I now understand the relationship of the html directory (I thought it was just examples)
          Where are the root files? How would one simply edit the default interface? Or is that loaded into memory as a part of HS?
          Ideally, I would like to keep the default interface for configuration means (possibly rename it to original_interface.aspx), however override the root document (default.aspx) as to always direct the user to our interface.
          Thanks,
          Tim W

          Comment


            #6
            Inside the html directory.....

            There is no definition for hs.version (or any other method/property) for object hs because it is of type object...
            This makes perfect sense to me as to compilation is failing, what doesn't make sense is that from VB you can declare object o, then invoke o.execute_whatever.
            Any help would be much appreciated!

            Comment

            Working...
            X