Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client Side, User Control "Object Doesn't support this property or method"

Reply
Thread Tools

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

 
 
todd
Guest
Posts: n/a
 
      10-14-2003
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,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQR SBIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJ hbnNpdGlvbmFsLy9FTiI+DQo8SFRNTD48SEVBRD4NCjxNRVRBI Gh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQ vaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY 29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMjI2IiBuYW1lPUd FTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvU D48L0JPRFk+PC9IVE1MPg0K"
classid="clah.dll#clah.ImportControl" VIEWASTEXT>
</OBJECT>

parent.document.getElementById("ImportObject");
ImportObject.Import("","","")
 
Reply With Quote
 
 
 
 
Rodrigo
Guest
Posts: n/a
 
      10-14-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> 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,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQR S
BIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJh bnNpdGlvbmFsLy9FTiI+DQo8SF
RNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1U eXBlIGNvbnRlbnQ9InRleHQvaH
RtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29u dGVudD0iTVNIVE1MIDYuMDAuMj
gwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9E WT4NCjxQPiZuYnNwOzwvUD48L0
JPRFk+PC9IVE1MPg0K"
> classid="clah.dll#clah.ImportControl" VIEWASTEXT>
> </OBJECT>
>
> parent.document.getElementById("ImportObject");
> ImportObject.Import("","","")



 
Reply With Quote
 
 
 
 
test
Guest
Posts: n/a
 
      10-14-2003

>-----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,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQR SBIVE1MIF
BVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlv bmFsLy9FT
iI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29 udGVudC1U
eXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3 dzLTEyNTI
iPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xM jI2IiBuYW
1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNw OzwvUD48L
0JPRFk+PC9IVE1MPg0K"
> classid="clah.dll#clah.ImportControl" VIEWASTEXT>
></OBJECT>
>
>parent.document.getElementById("ImportObject");
>ImportObject.Import("","","")
>.
>

 
Reply With Quote
 
todd
Guest
Posts: n/a
 
      10-16-2003
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) m...
> > 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,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQR S
> BIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJh bnNpdGlvbmFsLy9FTiI+DQo8SF
> RNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1U eXBlIGNvbnRlbnQ9InRleHQvaH
> RtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29u dGVudD0iTVNIVE1MIDYuMDAuMj
> gwMC4xMjI2IiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9E WT4NCjxQPiZuYnNwOzwvUD48L0
> JPRFk+PC9IVE1MPg0K"
> > classid="clah.dll#clah.ImportControl" VIEWASTEXT>
> > </OBJECT>
> >
> > parent.document.getElementById("ImportObject");
> > ImportObject.Import("","","")

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Control to Control Other User Control Jonathan Wood ASP .Net 4 02-02-2010 03:41 PM
User control is GridView causing Object doesn't support this property or method exception Joe ASP .Net 3 12-10-2007 01:03 AM
feeding a SQLDataSource embedded in an .ascx user control a custom property assigned to that control ASP .Net 4 07-16-2006 12:20 PM
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
Modifying a property of a control contained in a user control Nathan Sokalski ASP .Net 1 09-16-2005 12:59 PM



Advertisments