Announcement

Collapse
No announcement yet.

aspx & hsapplication object

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

    aspx & hsapplication object

    I am working on an aspx page and try to get the hsapplication instance. All code I saw does this

    Scheduler.haapplication hs = (Scheduler.hsapplication)Context.Items["Content"]
    However, this always returns null. I actually only see 6 entries in Context.Items and no key "Content" but things like AspSession, ArteryFilter, etc. So how do I get the hsapplication instance.

    #2
    Originally posted by mulu View Post
    I am working on an aspx page and try to get the hsapplication instance. All code I saw does this

    Scheduler.haapplication hs = (Scheduler.hsapplication)Context.Items["Content"]
    However, this always returns null. I actually only see 6 entries in Context.Items and no key "Content" but things like AspSession, ArteryFilter, etc. So how do I get the hsapplication instance.
    Code:
    Dim hs As Scheduler.hsapplication
            '' Get HS object
            hs = Context.Items("Content")
            Response.Write(hs.Version)
    Above works for me. Is your .aspx file located in the HS3 html folder?

    tenholde
    tenholde

    Comment


      #3
      I got this working. I think what made it finally work is copying the dlls to C:\Program Files (x86)\HomeSeer HS3\html\bin. Before I had the bins in C:\Program Files (x86)\HomeSeer HS3\html\[MyProject]\bin.

      Another (additional) potential reason could be that in my project I was referencing HS dlls like HomeSeerAPI.dll that were older than the ones from my HS installation.

      In any case, considering that I have to copy dlls to a different directory and that HS starts everything, I can't really debug the aspx part anymore. I think in Visual Studio you can bind to an existing process. Is that the way to go or is there a better approach to debugging those websites?

      Comment

      Working...
      X