usercontrol DLL in Website can't get local Data from SMS

Kaysetoaster

New member
Joined
Jan 23, 2008
Messages
2
Programming Experience
1-3
Dear Coding-Guru


I'm pretty new to the VB.NET thingy and hope someone is guru-enough to help me with that:

I'm working on a Usercontrol in the Visual Studio 2005 .NET 2 on a VISTA32

I builded a USERCONTROL.DLL with the guidance of this tutorial:
http://http://www.15seconds.com/issue/030610.htm
The DLL catches DATA from the System of the User. I defined an IIS-Webserver on which Scripting is allowed.

When I debug my Control "local" everything works just fine. The generated HTML Code is made up as it should be and the catching of the system data works fine also.

When I call the HTML File I can't read the System Data anymore and the main part of the generated HTML Site is empty. The Communication between the DLL and the HTML File works great. Functioncalls / property -Get/sets work fine.

Here is how I embed the dll in the HTML file (at the end).

HTML:
<object id="myControl" name="myControl" classid="http:ActiveXDotNet.dll#ActiveXDotNet.myControl" width="0" height="0" style="visibility:hidden;" VIEWASTEXT>
</object>



Here is where I call the function of the control to get the HTML-Data (in the javascriptpart in the head of the HTMLfile)

PHP:
function getTable()      
{               
document.getElementById('content').innerHTML = myControl.initData(); 
}


Here is the control: the Functions that starts the build up of the HTMLCode:

VB.NET:
Public Function initData() As String Implements AxMyControl.initData

        Dim aLineIsExpanded As Object

        activeColumn = "-3" 'Column in the table that is sorted... positive number = up... negative number = down
        activeNewStatus = 2 '2 month old software is "NEW"
        activeDisplayStatus = 25 'display all months
        activeSearchString = ""
        expandedLine = "none"
        aLineIsExpanded = False
        displayInstalled = True

        loadData() 'get available installations
        getSimilarEntries() 'search the programsarray for similar displaynames and add additional functions

        rowType = CShort("1") 'Setting first tableline style to "dark"

        Return getHTML().ToString()

    End Function





    Public Function getHTML() As String Implements AxMyControl.getHTML
        Dim give As String
        give = "<h1>Thats rocknroll!!</h1>" + buildTable()
        userText = give
        Return give
    End Function




    Public Function loadData() As String

        On Error Resume Next

        'Declarations
        'Getting Programs
        Dim oUiResource As UIResourceMgr
        oUiResource = New UIResourceMgr

        Dim oPrograms As Programs
        oPrograms = oUiResource.GetAvailableScripts() 'Applications and Scripts = same
        Dim oProgram As ProgramCls

        'Creating Array for programs
        Dim pCount As Short
        pCount = CShort(oPrograms.Count)
        ReDim appsArray(pCount)

        'Array für temporäre Ablage der Kategorien
        Dim categories() As String

        'Kategorien finden
        Dim vCategories() As String
        Dim vCategory As String
....



The Function loadData() catches all available Installation-Objects on the Machine by using the Function getAvailableApplications() of the UIResourceMgr Object. It packs all the Information into an array that is used in the function buildHTML() to build up the HTML-of the Website.


When I debug in the VS2005, the array is filled perfectly and the function initData() returns the right HTML Code.

When I test it on the local IIS 7 Webserver, the array stays untouched and the generic part of the website isn't generated.

On the "Webserver" are all needed DLL Files for the SMSPackaging and the UIResource Manager.


Can anyone please tell me how to debug the DLL when I run the HTML file on my localhost?

Does anybody have an idea why the UIResourceMgr calls of getAvailableApplications don't work when the dll File is called in the internet explorer?

Please Gurus :) help me.
Thanks a lot to everybody.
I need your help
Steffen
 
Back
Top