RE: IE Hosted UserControl - javascript interaction not working.




Hi Linda,

Thanks for your reply.

With the try/catch, this is in the page load javascript method which calls
the GetHostName method so it shows an alert informing the user that the
control could not be loaded. This works OK, but I would like to know if it
is possible to have the IE information bar inform the user that the control
could not be loaded, as it does with many ActiveX components that try to
install when I browse the web.

Can you tell me how this is possible as I think I have the original query
sorted now and can get my events raised and handles as well as calling
methods in the control from javascript in the page.

If you could point me in the right direction it would be much appreciated.

Regards,

Shaun
--------------------------
Shaun Venus
--------------------------


"sunev" wrote:

Hi Linda,

I posted a reply the other day from my other alias (I was also given a
subscription to use at my current contract) in which I stated that I still
needed full trust.

Well, I have just got a new desktop there as my old one was doing some
pretty odd things and I can now use my own small permission set (just the top
3 security settings) for my specific URL and it all works great!

Having read the O'Reilly book on .NET Framework Security I had a more
complete picture and generated the xml for the permission set and used CASPOL
to import this and also to generate the Code Group to use it.

I do however have another question (/ problem) ...

When a machine does not have the correct security settings to load the
assembly I've used a try/catch to popup a message telling the user. This is
fine, but it would be nice if I could have the IE6 information bar tell the
user.
Can you shed any light on how this can be achieved, or if it is even
possible (if not how would I make a control that does this)?

Thanks once again,

Shaun


--------------------------
Shaun Venus
--------------------------


"Linda Liu [MSFT]" wrote:

Hi Shaun,

I'm still having some problems with getting the control to load when I
have anything other than Full Trust.

Do you mean that the usercontrol couldn't be loaded when you change the
permission set of the web site other than Full Trust?

As far as I know, the problem that the usercontrol couldn't be loaded has
nothing to do with to the permission set the web site or usercontrol
assembly owns. Instead, there're two factors that may cause the problem.

One is that the 'Execute permissions' property of the virtual directory of
the web site is not set to 'Scripts only' (to set this property, open IIS
Manager, right-click the website, switch to 'Virtual Directory' tab in the
website's Properties page and select 'Scripts only' for the 'Execute
permissions' option).

The other is that you have signed the usercontrol assembly with a strong
named key file but haven't apply AllowParticallyTrustedCallersAttribute to
the assembly.
To apply this attribute to the assembly, add the following code to the
AssemblyInfo.cs file which is under Properties folder in your project.

using System.Security;
[assembly: AllowPartiallyTrustedCallers()]

Please have a check in your project according to the above suggestions. If
these suggestions don't solve your problem, you may follow the steps I
provided in my previous reply, in which the web site is with partial trust.
I have performed a test on these steps and it works.

I look forward to your reply.


Sincerely,
Linda Liu
Microsoft Online Community Support


.



Relevant Pages

  • RE: IE Hosted UserControl - javascript interaction not working.
    ... permission set of the web site other than Full Trust? ... the problem that the usercontrol couldn't be loaded has ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: IE Hosted UserControl - javascript interaction not working.
    ... complete picture and generated the xml for the permission set and used CASPOL ... have anything other than Full Trust. ... permission set of the web site other than Full Trust? ... the problem that the usercontrol couldn't be loaded has ...
    (microsoft.public.dotnet.framework.windowsforms)
  • [NT] Buffer Overrun in TSAC ActiveX Control Could Allow Code Execution
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The Terminal Services Advanced Client web control is an ActiveX ... A security vulnerability results because the control contains an unchecked ... * Customers should install the latest IE cumulative patch. ...
    (Securiteam)
  • [NT] Unchecked buffer in Microsoft Access Snapshot Viewer Could Allow Code Execution
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Microsoft Access Snapshot Viewer, the customer can package the database so ... to visit a malicious Web site that is under the attacker's control. ...
    (Securiteam)
  • Re: Gordon Brown announces push for New World Order in 2009
    ... One sure thing is the proposals for web site ratings are not that at ... all but a cloak for the control of freedom of speech on the internet. ... socialism is like chronic heart disease ... ... invented meaning could be attached and it was. ...
    (uk.politics.misc)