RE: IE Hosted UserControl - javascript interaction not working.
- From: sunev <sunevnuahs@xxxxxxxxxxxxxxx>
- Date: Thu, 2 Nov 2006 15:11:02 -0800
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 Ihave 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
- Follow-Ups:
- RE: IE Hosted UserControl - javascript interaction not working.
- From: Linda Liu [MSFT]
- RE: IE Hosted UserControl - javascript interaction not working.
- From: Linda Liu [MSFT]
- RE: IE Hosted UserControl - javascript interaction not working.
- Prev by Date: Click Event Handler
- Next by Date: Re: Dynamic Report
- Previous by thread: Click Event Handler
- Next by thread: RE: IE Hosted UserControl - javascript interaction not working.
- Index(es):
Relevant Pages
|