Embedding windows user control in IE

M

Marina

Hi, I created a simple user control. The object tag in the .aspx is:

<OBJECT id="test" widht="100" height="100"
classid="bin/MyDLLName.dll#MyDLLName.MyControlName" VIEWASTEXT>
</OBJECT>

However, the object doesn't show up. I get a '403' in the IIS log. My
intranet security is set to full trust (i am running this locally).

Any ideas about how this is supposed to work? I'm having trouble finding
documentation for any of this.
 
J

John Timney \(Microsoft MVP\)

Hi Marina,

Not my forte at all, but I recall a lecture at MS which mentioned that the
page must be trusted, not the site and that you need to restart your browser
once you add the new trust to it. Might be going a bit daft there
though..........

That aside, your syntax might be a bit off:

<OBJECT id="test" widht="100" height="100"
classid="HTTP:MyDLLName.dll#MyDLLName.MyControlName" VIEWASTEXT>
</OBJECT>

Notice the HTTP in front of the DLL, also you cant reference the bin
directory directly and the virtual directory you deploy the DLL to must only
have script permissions against it.

Hope that helps.......(of course I could be way off on every corner here as
I never do these)

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
 
A

Alvin Bruney [MVP]

I believe CLASSID param takes a hexidecimal 16 digit key, with a param name
which points to the path.
<object classid ="clsid:longstringhere">
<param name="path here">
</object>

if you google for object tag you will find more info i am sure
 
M

Marina

John

What I posted wasn't actually what I had, it was finding the file, just not
giving access to it.

You did nail it right on the head though, when you said that you can't put
it in the bin directory. All I had to do was move it out of there, adjust
the classid appropritely, and it worked! (or at least it showed up, good
enough for me!).

Thanks so much, I just wish there was more documentation available. It is
either non existant or extremely difficult to find, I searched for hours and
could not find an example or a discussion of this.

Thanks!
 
M

Marina

I believe that applies to ActiveX control. For .NET controls, it should be
[DLLName]#[Fully qualified class name]

Alvin Bruney said:
I believe CLASSID param takes a hexidecimal 16 digit key, with a param name
which points to the path.
<object classid ="clsid:longstringhere">
<param name="path here">
</object>

if you google for object tag you will find more info i am sure

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Marina said:
Hi, I created a simple user control. The object tag in the .aspx is:

<OBJECT id="test" widht="100" height="100"
classid="bin/MyDLLName.dll#MyDLLName.MyControlName" VIEWASTEXT>
</OBJECT>

However, the object doesn't show up. I get a '403' in the IIS log. My
intranet security is set to full trust (i am running this locally).

Any ideas about how this is supposed to work? I'm having trouble finding
documentation for any of this.
 
B

bruce barker

you need to change your iis security (mappings) to allow downloads of a
dll. you should make a seperate download directory, rather than use your
apps bin.


-- bruce (sqlwork.com)
 
A

Alvin Bruney [MVP]

Thanks for the correction. Didn't know which one she meant.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Marina said:
I believe that applies to ActiveX control. For .NET controls, it should be
[DLLName]#[Fully qualified class name]

Alvin Bruney said:
I believe CLASSID param takes a hexidecimal 16 digit key, with a param name
which points to the path.
<object classid ="clsid:longstringhere">
<param name="path here">
</object>

if you google for object tag you will find more info i am sure

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Marina said:
Hi, I created a simple user control. The object tag in the .aspx is:

<OBJECT id="test" widht="100" height="100"
classid="bin/MyDLLName.dll#MyDLLName.MyControlName" VIEWASTEXT>
</OBJECT>

However, the object doesn't show up. I get a '403' in the IIS log. My
intranet security is set to full trust (i am running this locally).

Any ideas about how this is supposed to work? I'm having trouble finding
documentation for any of this.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top