RE: IE Hosted UserControl - javascript interaction not working.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
    ... control could not be loaded. ... complete picture and generated the xml for the permission set and used CASPOL ... 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.
    ... I should be able to have a much reduced permission set - I just cannot figure ... public delegate void SubmitClickedHandler; ... public interface ReactDeviceRegistrationCOMIncoming ... Do you mean that the usercontrol couldn't be loaded when you change the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Difference between Full Trust and Everything
    ... What is the difference between Full Trust and Everything in .NET security ... Set the new code group to use the permission set Everything ... So what is in Full Trust that is not in Everything? ...
    (microsoft.public.dotnet.security)
  • Stack walk
    ... The level of trust to a unique assembly is defined in the permission set. ... The permission set is therefore of high importance. ... Could you say that the stack walk is crucial, ...
    (microsoft.public.dotnet.security)