Client Side, User Control "Object Doesn't support this property or method"

Discussion in 'ASP .Net' started by todd, Oct 14, 2003.

  1. todd

    todd Guest

    Hi all. I inherited this code from a contractor. It is a .NET user
    control that runs on the client side (ie) on machines with the
    framework installed. I have been mucking around to get it work for a
    couple of days now, and am growign really frustrated. I need to
    expose an Import method on the ImportControl and have it accesible to
    javascrip in the browser.

    If I remove the InterfaceType and ClassInterface attributes, compile
    and then view the typelib created by tlbexp, it does not show any
    methods on the class. If I add the attributes, the methods are
    listed... ...but when I invoke throuhg the web nothing works. The err
    is: "Object doesn't support method or porperty"

    ....PLEASE HELP ME... Thank you -- code posted below

    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    public interface IImportControl
    {
    string Import(string workingDirPath, string fileName, string
    fileType) ;
    }

    [ClassInterface(ClassInterfaceType.None)]
    public class ImportControl : System.Windows.Forms.Control,
    IImportControl
    {
    private System.ComponentModel.Container components = null;
    public ImportControl()
    {
    InitializeComponent();
    }

    public string Import(string workingDirPath, string fileName, string
    fileType)
    {
    return "" ;
    }
    }

    CLIENT SIDE

    <OBJECT id="ExportObject"
    data="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRSBIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0JPRFk+PC9IVE1MPg0K"
    classid="clah.dll#clah.ImportControl" VIEWASTEXT>
    </OBJECT>

    parent.document.getElementById("ImportObject");
    ImportObject.Import("","","")
    todd, Oct 14, 2003
    #1
    1. Advertising

  2. todd

    Rodrigo Guest

    Does the client side have the correct permissions ?
    I had the same problem and had to give full trust on intranet to make it
    work
    To make this check .Net Wizards on Adjust .net Security choose "Make changes
    to this computer" and give full trust to Local Intranet.

    I think this is your problem ;)

    Best Regards Rodrigo


    "todd" <> wrote in message
    news:...
    > Hi all. I inherited this code from a contractor. It is a .NET user
    > control that runs on the client side (ie) on machines with the
    > framework installed. I have been mucking around to get it work for a
    > couple of days now, and am growign really frustrated. I need to
    > expose an Import method on the ImportControl and have it accesible to
    > javascrip in the browser.
    >
    > If I remove the InterfaceType and ClassInterface attributes, compile
    > and then view the typelib created by tlbexp, it does not show any
    > methods on the class. If I add the attributes, the methods are
    > listed... ...but when I invoke throuhg the web nothing works. The err
    > is: "Object doesn't support method or porperty"
    >
    > ...PLEASE HELP ME... Thank you -- code posted below
    >
    > [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    > public interface IImportControl
    > {
    > string Import(string workingDirPath, string fileName, string
    > fileType) ;
    > }
    >
    > [ClassInterface(ClassInterfaceType.None)]
    > public class ImportControl : System.Windows.Forms.Control,
    > IImportControl
    > {
    > private System.ComponentModel.Container components = null;
    > public ImportControl()
    > {
    > InitializeComponent();
    > }
    >
    > public string Import(string workingDirPath, string fileName, string
    > fileType)
    > {
    > return "" ;
    > }
    > }
    >
    > CLIENT SIDE
    >
    > <OBJECT id="ExportObject"
    >

    data="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRS
    BIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SF
    RNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaH
    RtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMj
    gwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0
    JPRFk+PC9IVE1MPg0K"
    > classid="clah.dll#clah.ImportControl" VIEWASTEXT>
    > </OBJECT>
    >
    > parent.document.getElementById("ImportObject");
    > ImportObject.Import("","","")
    Rodrigo, Oct 14, 2003
    #2
    1. Advertising

  3. todd

    test Guest


    >-----Original Message-----
    >Hi all. I inherited this code from a contractor. It is

    a .NET user
    >control that runs on the client side (ie) on machines

    with the
    >framework installed. I have been mucking around to get

    it work for a
    >couple of days now, and am growign really frustrated. I

    need to
    >expose an Import method on the ImportControl and have it

    accesible to
    >javascrip in the browser.
    >
    >If I remove the InterfaceType and ClassInterface

    attributes, compile
    >and then view the typelib created by tlbexp, it does not

    show any
    >methods on the class. If I add the attributes, the

    methods are
    >listed... ...but when I invoke throuhg the web nothing

    works. The err
    >is: "Object doesn't support method or porperty"
    >
    >....PLEASE HELP ME... Thank you -- code posted below
    >
    >[InterfaceType(ComInterfaceType.InterfaceIsDual)]
    >public interface IImportControl
    >{
    > string Import(string workingDirPath, string

    fileName, string
    >fileType) ;
    >}
    >
    >[ClassInterface(ClassInterfaceType.None)]
    >public class ImportControl : System.Windows.Forms.Control,
    >IImportControl
    >{
    > private System.ComponentModel.Container components

    = null;
    > public ImportControl()
    > {
    > InitializeComponent();
    > }
    >
    > public string Import(string workingDirPath, string

    fileName, string
    >fileType)
    > {
    > return "" ;
    > }
    >}
    >
    >CLIENT SIDE
    >
    ><OBJECT id="ExportObject"
    >data="data:application/x-

    oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRSBIVE1MIF
    BVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FT
    iI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1U
    eXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTI
    iPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMjI2IiBuYW
    1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L
    0JPRFk+PC9IVE1MPg0K"
    > classid="clah.dll#clah.ImportControl" VIEWASTEXT>
    ></OBJECT>
    >
    >parent.document.getElementById("ImportObject");
    >ImportObject.Import("","","")
    >.
    >
    test, Oct 14, 2003
    #3
  4. todd

    todd Guest

    Yes it was permissioned correctly on the client side. The issue was
    the server Execute permissions were set to scripts and executables.
    As a result IIS was trying to run the dll request as an ISAPI
    extension, rather than just serve the binary to the client.

    Thank you though

    "Rodrigo" <> wrote in message news:<>...
    > Does the client side have the correct permissions ?
    > I had the same problem and had to give full trust on intranet to make it
    > work
    > To make this check .Net Wizards on Adjust .net Security choose "Make changes
    > to this computer" and give full trust to Local Intranet.
    >
    > I think this is your problem ;)
    >
    > Best Regards Rodrigo
    >
    >
    > "todd" <> wrote in message
    > news:...
    > > Hi all. I inherited this code from a contractor. It is a .NET user
    > > control that runs on the client side (ie) on machines with the
    > > framework installed. I have been mucking around to get it work for a
    > > couple of days now, and am growign really frustrated. I need to
    > > expose an Import method on the ImportControl and have it accesible to
    > > javascrip in the browser.
    > >
    > > If I remove the InterfaceType and ClassInterface attributes, compile
    > > and then view the typelib created by tlbexp, it does not show any
    > > methods on the class. If I add the attributes, the methods are
    > > listed... ...but when I invoke throuhg the web nothing works. The err
    > > is: "Object doesn't support method or porperty"
    > >
    > > ...PLEASE HELP ME... Thank you -- code posted below
    > >
    > > [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    > > public interface IImportControl
    > > {
    > > string Import(string workingDirPath, string fileName, string
    > > fileType) ;
    > > }
    > >
    > > [ClassInterface(ClassInterfaceType.None)]
    > > public class ImportControl : System.Windows.Forms.Control,
    > > IImportControl
    > > {
    > > private System.ComponentModel.Container components = null;
    > > public ImportControl()
    > > {
    > > InitializeComponent();
    > > }
    > >
    > > public string Import(string workingDirPath, string fileName, string
    > > fileType)
    > > {
    > > return "" ;
    > > }
    > > }
    > >
    > > CLIENT SIDE
    > >
    > > <OBJECT id="ExportObject"
    > >

    > data="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRS
    > BIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SF
    > RNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaH
    > RtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMj
    > gwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0
    > JPRFk+PC9IVE1MPg0K"
    > > classid="clah.dll#clah.ImportControl" VIEWASTEXT>
    > > </OBJECT>
    > >
    > > parent.document.getElementById("ImportObject");
    > > ImportObject.Import("","","")
    todd, Oct 16, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roman
    Replies:
    0
    Views:
    4,018
    Roman
    Jan 4, 2004
  2. zdrakec
    Replies:
    0
    Views:
    548
    zdrakec
    Sep 26, 2007
  3. Joe
    Replies:
    3
    Views:
    546
  4. JohnE
    Replies:
    1
    Views:
    1,030
    JohnE
    Mar 9, 2010
  5. shank
    Replies:
    5
    Views:
    118
    Chris Barber
    Oct 31, 2003
Loading...

Share This Page