Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / October 2003

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
todd - 14 Oct 2003 19:59 GMT
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("","","")
Rodrigo - 14 Oct 2003 20:11 GMT
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

> 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
[quoted text clipped - 38 lines]
>
> <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 - 16 Oct 2003 19:53 GMT
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

> Does the client side have the correct permissions ?
> I had the same problem and had to give full trust on intranet to make it
[quoted text clipped - 60 lines]
> > parent.document.getElementById("ImportObject");
> > ImportObject.Import("","","")

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.