.NET Applet

G

Guest

Hi there,
I managed to create a '.NET applet' which runs inside a browser just like
the JAVA ones used to do. I compiled it using .NET framework 1.1 (to a .dll)
and I reference to it from an HTML page using the OBJECT tag.

The applet works when I preview the HTML page within Visual Studio, but
unfortunately it does not when I try to access that very same page using
another browser window, by entering the full URL of the page.

It looks like the applet gets loaded on to the browser page, but it won't
start. I checked security permissions and also IIS execution privileges on
the folder containing my .dll. I can't get it to work outside VS, it only
works when I right-click on the 'preview in browser' item on the HTML file.

The code on the HTML page is as follows:
<OBJECT id="myID"
height="300"
width="150"
classid="http://server/demoControl4.dll#demoControl.myControl"
VIEWASTEXT>
</OBJECT>

Can you please help? I'd like to thank you in advance for all the help you
could provide, I can't seem to make this thing work in any way.

Cheers,
-andre
 
B

Bryan Phillips

Change the assembly's trust level to Full Trust. Make sure that your
Internet Explorer security settings for the zone are not set to High.
 
G

Guest

Hi Bryan, thank you for your reply. I thought it had something to do with
that, but I am not sure how to set the assembly's trust level to full trust.
Should it be done on the server where it is stored or both on the server and
the client machine? Either way, what are the steps involved? I am sorry for
such a terribly simple question but I have really never played around
security settings of assemblies and really could use some help from an expert
like you.

Thanks again for your help.

Best,
-andre
 
B

Bryan Phillips

The trust level needs to be changed on the client. To do this, open.Net
2.0 Configuration from the Administrative Tools in Control Panel.

Once .Net 2.0 configuration opens, click "Configure Code Access Security
Policy" then click "Increase Assembly Trust". Follow the steps in the
wizard to select your assembly and set it to Full Trust.



--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net
 

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

Top