Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding Windows control in asp.net page 1

Status
Not open for further replies.

mirirom

Programmer
Jul 21, 2001
110
US
hi,

i've gone through the exercise of creating a windows user control and adding the control to an aspx form by way of the <object> tag as specified on MSDN and a few hundred other posts out there. however, i can't seem to figure out how to get the control to run from our intranet server. when i test locally (127.0.0.1), everything works fine.

things i've ensured:
~ the .dll is up to date and copied into the directory where the aspx page sits.

~ the classid field of the <object> tag is correctly referencing the assembly as well as the full class name such as:
<object id="foo" height="x" width="x"
classid="http:myControl.dll#myNamespace.myControl"></object>

~ the directory and all subs there) on the intranet server have been granted full trust under the LocalIntranet zone (on my client machine)

~ i've even strong named the control's assembly and aditionally flagged it with assembly:AllowPartiallyTrustedCallersAttribute()

anyone have any thoughts as to why this is foobar? many thanks in advance!


..:: mirirom ::..
 
If it's not an ActiveX control, I don't think the client will download it automatically. If it works on the server, I'd try manually installing the control on your clients if possible.

Really, though, if ASP.NET server controls don't suit your needs, you may want to look into developing a fat-client app that uses the control instead.
 
thx for the reply. actually, the client downloads the .dll just fine - in similar fasion to an activeX control, but w/out the supposed security hassle that the latter pose (they can't open, create, delete files, etc).

in my particular case, this is the only windows control that would be used with the web app. it acts as a file dialog, wraps data into xml, and passes it back to the server when the page posts. it's also an intranet app so i don't have to worry about clients w/out the framework.

after further testing, it turns out that it had to do with the port in which the web app was communicating on. during the dev stage, my apps sit on a non-public site with http assigned to a different port. but after publishing to a site where the standard :80 is used, voila, things are fine.

i'm curious now about win2K (domain) security policies that might involve MIME types or file execution in relation to ports. never heard of such a thing. wierd.


..:: mirirom ::..
 
Hmmm. I didn't know that was even possible. Cool stuff.

Star from me.
 
hi Boulder, thx for the star!

you can find quite a bit of material on this subject on the MSDN site (too many to list in fact). you can also google "embed windows control aspx". any yeah, it is cool stuff :)

..:: mirirom ::..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top