Ask a Question related to ASP.NET Security, Design and Development.
-
Lei Jiang #1
Falied to grand permission when host a .NET control in IE web page
I have a winform control hosted in IE web page. When the client side is
Win2000, the page works ok. However, when I view the page from Win2003, it
shows nothing. I could find some error message from the "Temporary Internet
Files" folder :
***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
Zone: 3
Assembly Name: Flag.DWM.dll
Type Name: Flag.DWM.TabDWMControl
----- Thrown Exception -----
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.IO.FileLoadException: Failed to
grant required minimum permissions to assembly 'MagicLibrary,
Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Required
permissions can not be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
checkExecutionPermission)
at Flag.DWM.TabDWMControl..ctor()
--- End of inner exception stack trace ---
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32 dwFlag,
Int32 dwZone, String pURL, String uniqueIdString, String link, String
licenses)
Pages from other web site can be correctly viewed in my Win2003 machine.I
checked the MagicLibrary.dll and found it has a lot of interop code to
access User32.dll and GDI32.dll. Is that the reason? How to configure my
machine to view the page?Thanks!
Lei Jiang Guest
-
Can only connect to home page after host switch
We switched hosting companies for a client site. We set up a new Contribute connection key but we can only edit the home page. Any of the other... -
Passign Javascript From User Control to Parent(host) Page
Good Afternoon I am hoping for some help for a problem i am struggling with. I am using a Parent Page to Dynamically load my user Controls based... -
Permission denied on ASP Page
Hi, last week I moved the folder of my Intranet application to another disk of the same server. After this change all the ASP page return this... -
Finding grand total
Hi, I have the following table: NAME varchar(10) V1 integer V2 integer V3 integer Values in the table are like: -
user control making changes to host page
After you add the user control, look into the Page.FindControls method. The UserControl has a reference to the page it is on through Page. HTH,... -
M. Zeeshan Mustafa #2
Re: Falied to grand permission when host a .NET control in IE web page
Lei,
On your windows 2003 box, you have to set permissions
for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
your system under .NET Framework.
First have a look at:
[url]http://support.microsoft.com/?id=311295[/url]
and do this:
<quote>
1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
2.. Expand each element in the following path:
My Computer/Runtime Security Policy/Machine/Code Groups/All
Code/LocalIntranet_Zone
Right-click the LocalIntranet_Zone node, and then click new.
3.. Name the new code group TestVBNetCtrl, and then click Next to display
the Choose a condition type dialog box.
4.. Select URL as the condition type, and then type [url]http://ServerName/*[/url] in
the URL box.
5.. Click Next to proceed to the Assign a Permission Set to the Code Group
dialog box.
6.. Click Use existing permission set, click FullTrust, and then click
Next to finish.
</quote>
--
Hope this helps,
Zeeshan Mustafa, MCSD
"Lei Jiang" <code@263.net> wrote in message
news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...Internet> I have a winform control hosted in IE web page. When the client side is
> Win2000, the page works ok. However, when I view the page from Win2003, it
> shows nothing. I could find some error message from the "Temporary> Files" folder :
>
> ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
>
>
>
> URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> Zone: 3
> Assembly Name: Flag.DWM.dll
> Type Name: Flag.DWM.TabDWMControl
>
>
>
> ----- Thrown Exception -----
>
>
> System.Reflection.TargetInvocationException: Exception has been thrown by
> the target of an invocation. ---> System.IO.FileLoadException: Failed to
> grant required minimum permissions to assembly 'MagicLibrary,
> Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> PublicKeyToken=null' ---> System.Security.Policy.PolicyException: Required
> permissions can not be acquired.
> at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> PermissionSet& denied, Boolean checkExecutionPermission)
> at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> checkExecutionPermission)
> at Flag.DWM.TabDWMControl..ctor()
> --- End of inner exception stack trace ---
> at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
> typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32 dwFlag,
> Int32 dwZone, String pURL, String uniqueIdString, String link, String
> licenses)
>
> Pages from other web site can be correctly viewed in my Win2003 machine.I
> checked the MagicLibrary.dll and found it has a lot of interop code to
> access User32.dll and GDI32.dll. Is that the reason? How to configure my
> machine to view the page?Thanks!
>
>
>
M. Zeeshan Mustafa Guest
-
Lei Jiang #3
Re: Falied to grand permission when host a .NET control in IE web page
Of course I have configured that. It can't solve the problem.
All the Win2000 client can run it after being configured(just as stated in
the document), but Win2003 client failed in the same situation.
"M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
news:eJhD7b1YEHA.2844@TK2MSFTNGP12.phx.gbl...display> Lei,
>
> On your windows 2003 box, you have to set permissions
> for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
> your system under .NET Framework.
>
> First have a look at:
> [url]http://support.microsoft.com/?id=311295[/url]
>
> and do this:
>
> <quote>
> 1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
> 2.. Expand each element in the following path:
> My Computer/Runtime Security Policy/Machine/Code Groups/All
> Code/LocalIntranet_Zone
>
> Right-click the LocalIntranet_Zone node, and then click new.
> 3.. Name the new code group TestVBNetCtrl, and then click Next toin> the Choose a condition type dialog box.
> 4.. Select URL as the condition type, and then type [url]http://ServerName/*[/url]Group> the URL box.
> 5.. Click Next to proceed to the Assign a Permission Set to the Codeit> dialog box.
> 6.. Click Use existing permission set, click FullTrust, and then click
> Next to finish.
> </quote>
>
> --
> Hope this helps,
> Zeeshan Mustafa, MCSD
>
>
> "Lei Jiang" <code@263.net> wrote in message
> news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...> > I have a winform control hosted in IE web page. When the client side is
> > Win2000, the page works ok. However, when I view the page from Win2003,by> Internet> > shows nothing. I could find some error message from the "Temporary> > Files" folder :
> >
> > ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
> >
> >
> >
> > URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> > Zone: 3
> > Assembly Name: Flag.DWM.dll
> > Type Name: Flag.DWM.TabDWMControl
> >
> >
> >
> > ----- Thrown Exception -----
> >
> >
> > System.Reflection.TargetInvocationException: Exception has been thrownRequired> > the target of an invocation. ---> System.IO.FileLoadException: Failed to
> > grant required minimum permissions to assembly 'MagicLibrary,
> > Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> > File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> > PublicKeyToken=null' ---> System.Security.Policy.PolicyException:dwFlag,> > permissions can not be acquired.
> > at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> > PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> > PermissionSet& denied, Boolean checkExecutionPermission)
> > at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> > PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> > PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> > checkExecutionPermission)
> > at Flag.DWM.TabDWMControl..ctor()
> > --- End of inner exception stack trace ---
> > at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
> > typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> > at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32machine.I> > Int32 dwZone, String pURL, String uniqueIdString, String link, String
> > licenses)
> >
> > Pages from other web site can be correctly viewed in my Win2003>> > checked the MagicLibrary.dll and found it has a lot of interop code to
> > access User32.dll and GDI32.dll. Is that the reason? How to configure my
> > machine to view the page?Thanks!
> >
> >
> >
>
>
>
Lei Jiang Guest
-
M. Zeeshan Mustafa #4
Re: Falied to grand permission when host a .NET control in IE web page
The problem is as it clearly states in error message that permissions
by Flag.DWM.dll cannot be granted (inherited) to MagicLibrary.
Only fully trusted callers (assemblies) can use strong named assemblies,
unless AllowPartiallyTrustedCallersAttribute is used in sn assemblies
to allow partially trusted callers.
If you give partial trust to your assembly, and your
assembly is calling an assembly which is Full-Trust only assembly,
you may receive exception.
Try giving full-trust permissions to MagicLibrary explicitly...
--
Hope this helps,
Zeeshan Mustafa, MCSD
"Lei Jiang" <code@263.net> wrote in message
news:%23KR$3$1YEHA.2216@TK2MSFTNGP10.phx.gbl...[url]http://ServerName/*[/url]>
> Of course I have configured that. It can't solve the problem.
>
> All the Win2000 client can run it after being configured(just as stated in
> the document), but Win2003 client failed in the same situation.
>
> "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> news:eJhD7b1YEHA.2844@TK2MSFTNGP12.phx.gbl...> display> > Lei,
> >
> > On your windows 2003 box, you have to set permissions
> > for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
> > your system under .NET Framework.
> >
> > First have a look at:
> > [url]http://support.microsoft.com/?id=311295[/url]
> >
> > and do this:
> >
> > <quote>
> > 1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
> > 2.. Expand each element in the following path:
> > My Computer/Runtime Security Policy/Machine/Code Groups/All
> > Code/LocalIntranet_Zone
> >
> > Right-click the LocalIntranet_Zone node, and then click new.
> > 3.. Name the new code group TestVBNetCtrl, and then click Next to> > the Choose a condition type dialog box.
> > 4.. Select URL as the condition type, and then typeis> in> Group> > the URL box.
> > 5.. Click Next to proceed to the Assign a Permission Set to the Code> > dialog box.
> > 6.. Click Use existing permission set, click FullTrust, and then click
> > Next to finish.
> > </quote>
> >
> > --
> > Hope this helps,
> > Zeeshan Mustafa, MCSD
> >
> >
> > "Lei Jiang" <code@263.net> wrote in message
> > news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...> > > I have a winform control hosted in IE web page. When the client sideWin2003,> > > Win2000, the page works ok. However, when I view the page fromto> it> by> > Internet> > > shows nothing. I could find some error message from the "Temporary> > > Files" folder :
> > >
> > > ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
> > >
> > >
> > >
> > > URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> > > Zone: 3
> > > Assembly Name: Flag.DWM.dll
> > > Type Name: Flag.DWM.TabDWMControl
> > >
> > >
> > >
> > > ----- Thrown Exception -----
> > >
> > >
> > > System.Reflection.TargetInvocationException: Exception has been thrown> > > the target of an invocation. ---> System.IO.FileLoadException: FailedString> Required> > > grant required minimum permissions to assembly 'MagicLibrary,
> > > Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> > > File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> > > PublicKeyToken=null' ---> System.Security.Policy.PolicyException:> > > permissions can not be acquired.
> > > at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> > > PermissionSet& denied, Boolean checkExecutionPermission)
> > > at System.Security.SecurityManager.ResolvePolicy(Evid ence evidence,
> > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> > > PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> > > checkExecutionPermission)
> > > at Flag.DWM.TabDWMControl..ctor()
> > > --- End of inner exception stack trace ---
> > > at System.AppDomain.CreateComInstanceFrom(String assemblyFile,my> dwFlag,> > > typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> > > at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32> machine.I> > > Int32 dwZone, String pURL, String uniqueIdString, String link, String
> > > licenses)
> > >
> > > Pages from other web site can be correctly viewed in my Win2003> > > checked the MagicLibrary.dll and found it has a lot of interop code to
> > > access User32.dll and GDI32.dll. Is that the reason? How to configure>> >> > > machine to view the page?Thanks!
> > >
> > >
> > >
> >
> >
> >
>
M. Zeeshan Mustafa Guest
-
Lei Jiang #5
Re: Falied to grand permission when host a .NET control in IE web page
Thanks. But none of these assemblies is strong named assembly.
BTW: How to give full-trust permissions to MagicLibrary explicitly?
"M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
news:#o6qvc2YEHA.556@tk2msftngp13.phx.gbl...in> The problem is as it clearly states in error message that permissions
> by Flag.DWM.dll cannot be granted (inherited) to MagicLibrary.
>
> Only fully trusted callers (assemblies) can use strong named assemblies,
> unless AllowPartiallyTrustedCallersAttribute is used in sn assemblies
> to allow partially trusted callers.
>
> If you give partial trust to your assembly, and your
> assembly is calling an assembly which is Full-Trust only assembly,
> you may receive exception.
>
> Try giving full-trust permissions to MagicLibrary explicitly...
>
> --
> Hope this helps,
> Zeeshan Mustafa, MCSD
>
>
> "Lei Jiang" <code@263.net> wrote in message
> news:%23KR$3$1YEHA.2216@TK2MSFTNGP10.phx.gbl...> >
> > Of course I have configured that. It can't solve the problem.
> >
> > All the Win2000 client can run it after being configured(just as statedclick> [url]http://ServerName/*[/url]> > the document), but Win2003 client failed in the same situation.
> >
> > "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> > news:eJhD7b1YEHA.2844@TK2MSFTNGP12.phx.gbl...> > display> > > Lei,
> > >
> > > On your windows 2003 box, you have to set permissions
> > > for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
> > > your system under .NET Framework.
> > >
> > > First have a look at:
> > > [url]http://support.microsoft.com/?id=311295[/url]
> > >
> > > and do this:
> > >
> > > <quote>
> > > 1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
> > > 2.. Expand each element in the following path:
> > > My Computer/Runtime Security Policy/Machine/Code Groups/All
> > > Code/LocalIntranet_Zone
> > >
> > > Right-click the LocalIntranet_Zone node, and then click new.
> > > 3.. Name the new code group TestVBNetCtrl, and then click Next to> > > the Choose a condition type dialog box.
> > > 4.. Select URL as the condition type, and then type> > in> > Group> > > the URL box.
> > > 5.. Click Next to proceed to the Assign a Permission Set to the Code> > > dialog box.
> > > 6.. Click Use existing permission set, click FullTrust, and thenthrown> is> > > Next to finish.
> > > </quote>
> > >
> > > --
> > > Hope this helps,
> > > Zeeshan Mustafa, MCSD
> > >
> > >
> > > "Lei Jiang" <code@263.net> wrote in message
> > > news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...
> > > > I have a winform control hosted in IE web page. When the client side> Win2003,> > > > Win2000, the page works ok. However, when I view the page from> > it> > > > shows nothing. I could find some error message from the "Temporary
> > > Internet
> > > > Files" folder :
> > > >
> > > > ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
> > > >
> > > >
> > > >
> > > > URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> > > > Zone: 3
> > > > Assembly Name: Flag.DWM.dll
> > > > Type Name: Flag.DWM.TabDWMControl
> > > >
> > > >
> > > >
> > > > ----- Thrown Exception -----
> > > >
> > > >
> > > > System.Reflection.TargetInvocationException: Exception has beenFailed> > by> > > > the target of an invocation. ---> System.IO.FileLoadException:evidence,> to> > Required> > > > grant required minimum permissions to assembly 'MagicLibrary,
> > > > Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> > > > File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> > > > PublicKeyToken=null' ---> System.Security.Policy.PolicyException:> > > > permissions can not be acquired.
> > > > at System.Security.SecurityManager.ResolvePolicy(Evid encedenyPset,> > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSetevidence,> > > > PermissionSet& denied, Boolean checkExecutionPermission)
> > > > at System.Security.SecurityManager.ResolvePolicy(Evid encedenyPset,> > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSetString> String> > > > PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> > > > checkExecutionPermission)
> > > > at Flag.DWM.TabDWMControl..ctor()
> > > > --- End of inner exception stack trace ---
> > > > at System.AppDomain.CreateComInstanceFrom(String assemblyFile,> > dwFlag,> > > > typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> > > > at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32> > > > Int32 dwZone, String pURL, String uniqueIdString, String link,to> > machine.I> > > > licenses)
> > > >
> > > > Pages from other web site can be correctly viewed in my Win2003> > > > checked the MagicLibrary.dll and found it has a lot of interop codeconfigure> > > > access User32.dll and GDI32.dll. Is that the reason? How to> my>> >> > > > machine to view the page?Thanks!
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
>
>
Lei Jiang Guest
-
M. Zeeshan Mustafa #6
Re: Falied to grand permission when host a .NET control in IE web page
Give full trust permissions to your assembly, and it should
be inherited by MagicLibrary.
--
Hope this helps,
Zeeshan Mustafa, MCSD
"Lei Jiang" <code@263.net> wrote in message
news:uAJv0w2YEHA.1356@TK2MSFTNGP09.phx.gbl...stated>
> Thanks. But none of these assemblies is strong named assembly.
>
> BTW: How to give full-trust permissions to MagicLibrary explicitly?
>
>
>
>
> "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> news:#o6qvc2YEHA.556@tk2msftngp13.phx.gbl...> > The problem is as it clearly states in error message that permissions
> > by Flag.DWM.dll cannot be granted (inherited) to MagicLibrary.
> >
> > Only fully trusted callers (assemblies) can use strong named assemblies,
> > unless AllowPartiallyTrustedCallersAttribute is used in sn assemblies
> > to allow partially trusted callers.
> >
> > If you give partial trust to your assembly, and your
> > assembly is calling an assembly which is Full-Trust only assembly,
> > you may receive exception.
> >
> > Try giving full-trust permissions to MagicLibrary explicitly...
> >
> > --
> > Hope this helps,
> > Zeeshan Mustafa, MCSD
> >
> >
> > "Lei Jiang" <code@263.net> wrote in message
> > news:%23KR$3$1YEHA.2216@TK2MSFTNGP10.phx.gbl...> > >
> > > Of course I have configured that. It can't solve the problem.
> > >
> > > All the Win2000 client can run it after being configured(just asCode> in> > [url]http://ServerName/*[/url]> > > the document), but Win2003 client failed in the same situation.
> > >
> > > "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> > > news:eJhD7b1YEHA.2844@TK2MSFTNGP12.phx.gbl...
> > > > Lei,
> > > >
> > > > On your windows 2003 box, you have to set permissions
> > > > for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
> > > > your system under .NET Framework.
> > > >
> > > > First have a look at:
> > > > [url]http://support.microsoft.com/?id=311295[/url]
> > > >
> > > > and do this:
> > > >
> > > > <quote>
> > > > 1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
> > > > 2.. Expand each element in the following path:
> > > > My Computer/Runtime Security Policy/Machine/Code Groups/All
> > > > Code/LocalIntranet_Zone
> > > >
> > > > Right-click the LocalIntranet_Zone node, and then click new.
> > > > 3.. Name the new code group TestVBNetCtrl, and then click Next to
> > > display
> > > > the Choose a condition type dialog box.
> > > > 4.. Select URL as the condition type, and then type> > > in
> > > > the URL box.
> > > > 5.. Click Next to proceed to the Assign a Permission Set to theside> click> > > Group
> > > > dialog box.
> > > > 6.. Click Use existing permission set, click FullTrust, and then> > > > Next to finish.
> > > > </quote>
> > > >
> > > > --
> > > > Hope this helps,
> > > > Zeeshan Mustafa, MCSD
> > > >
> > > >
> > > > "Lei Jiang" <code@263.net> wrote in message
> > > > news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...
> > > > > I have a winform control hosted in IE web page. When the clientcode> thrown> > is> > Win2003,> > > > > Win2000, the page works ok. However, when I view the page from> > > it
> > > > > shows nothing. I could find some error message from the "Temporary
> > > > Internet
> > > > > Files" folder :
> > > > >
> > > > > ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
> > > > >
> > > > >
> > > > >
> > > > > URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> > > > > Zone: 3
> > > > > Assembly Name: Flag.DWM.dll
> > > > > Type Name: Flag.DWM.TabDWMControl
> > > > >
> > > > >
> > > > >
> > > > > ----- Thrown Exception -----
> > > > >
> > > > >
> > > > > System.Reflection.TargetInvocationException: Exception has been> Failed> > > by
> > > > > the target of an invocation. ---> System.IO.FileLoadException:> evidence,> > to> > > > > grant required minimum permissions to assembly 'MagicLibrary,
> > > > > Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> > > > > File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> > > > > PublicKeyToken=null' ---> System.Security.Policy.PolicyException:
> > > Required
> > > > > permissions can not be acquired.
> > > > > at System.Security.SecurityManager.ResolvePolicy(Evid ence> denyPset,> > > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet> evidence,> > > > > PermissionSet& denied, Boolean checkExecutionPermission)
> > > > > at System.Security.SecurityManager.ResolvePolicy(Evid ence> denyPset,> > > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet> String> > String> > > > > PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> > > > > checkExecutionPermission)
> > > > > at Flag.DWM.TabDWMControl..ctor()
> > > > > --- End of inner exception stack trace ---
> > > > > at System.AppDomain.CreateComInstanceFrom(String assemblyFile,> > > > > typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> > > > > at Microsoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32
> > > dwFlag,
> > > > > Int32 dwZone, String pURL, String uniqueIdString, String link,> > > > > licenses)
> > > > >
> > > > > Pages from other web site can be correctly viewed in my Win2003
> > > machine.I
> > > > > checked the MagicLibrary.dll and found it has a lot of interop> to> configure> > > > > access User32.dll and GDI32.dll. Is that the reason? How to>> > my> >> > > > > machine to view the page?Thanks!
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
M. Zeeshan Mustafa Guest
-
Lei Jiang #7
Re: Falied to grand permission when host a .NET control in IE web page
I have give full-trust permissions to the site where the assemblies come
from, that's not enough?
The biggest problem is : why the applications runs in Win2000 smoothly, but
can't be load in Win2003?
"M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
news:Oc8XX72YEHA.1652@TK2MSFTNGP09.phx.gbl...assemblies,> Give full trust permissions to your assembly, and it should
> be inherited by MagicLibrary.
>
> --
> Hope this helps,
> Zeeshan Mustafa, MCSD
>
>
> "Lei Jiang" <code@263.net> wrote in message
> news:uAJv0w2YEHA.1356@TK2MSFTNGP09.phx.gbl...> >
> > Thanks. But none of these assemblies is strong named assembly.
> >
> > BTW: How to give full-trust permissions to MagicLibrary explicitly?
> >
> >
> >
> >
> > "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> > news:#o6qvc2YEHA.556@tk2msftngp13.phx.gbl...> > > The problem is as it clearly states in error message that permissions
> > > by Flag.DWM.dll cannot be granted (inherited) to MagicLibrary.
> > >
> > > Only fully trusted callers (assemblies) can use strong namedto> stated> > > unless AllowPartiallyTrustedCallersAttribute is used in sn assemblies
> > > to allow partially trusted callers.
> > >
> > > If you give partial trust to your assembly, and your
> > > assembly is calling an assembly which is Full-Trust only assembly,
> > > you may receive exception.
> > >
> > > Try giving full-trust permissions to MagicLibrary explicitly...
> > >
> > > --
> > > Hope this helps,
> > > Zeeshan Mustafa, MCSD
> > >
> > >
> > > "Lei Jiang" <code@263.net> wrote in message
> > > news:%23KR$3$1YEHA.2216@TK2MSFTNGP10.phx.gbl...
> > > >
> > > > Of course I have configured that. It can't solve the problem.
> > > >
> > > > All the Win2000 client can run it after being configured(just as> > in> > > > the document), but Win2003 client failed in the same situation.
> > > >
> > > > "M. Zeeshan Mustafa" <zeeshan@no-spm.please.zeeshan.net> дÈëÏûÏ¢
> > > > news:eJhD7b1YEHA.2844@TK2MSFTNGP12.phx.gbl...
> > > > > Lei,
> > > > >
> > > > > On your windows 2003 box, you have to set permissions
> > > > > for 'http://10.147.130.245/dwmweb/Flag.DWM.dll' to execute on
> > > > > your system under .NET Framework.
> > > > >
> > > > > First have a look at:
> > > > > [url]http://support.microsoft.com/?id=311295[/url]
> > > > >
> > > > > and do this:
> > > > >
> > > > > <quote>
> > > > > 1.. Start the .NET Framework configuration tool, Mscorcfg.msc.
> > > > > 2.. Expand each element in the following path:
> > > > > My Computer/Runtime Security Policy/Machine/Code Groups/All
> > > > > Code/LocalIntranet_Zone
> > > > >
> > > > > Right-click the LocalIntranet_Zone node, and then click new.
> > > > > 3.. Name the new code group TestVBNetCtrl, and then click Next"Temporary> Code> > > > display
> > > > > the Choose a condition type dialog box.
> > > > > 4.. Select URL as the condition type, and then type
> > > [url]http://ServerName/*[/url]
> > > > in
> > > > > the URL box.
> > > > > 5.. Click Next to proceed to the Assign a Permission Set to the> side> > click> > > > Group
> > > > > dialog box.
> > > > > 6.. Click Use existing permission set, click FullTrust, and then> > > > > Next to finish.
> > > > > </quote>
> > > > >
> > > > > --
> > > > > Hope this helps,
> > > > > Zeeshan Mustafa, MCSD
> > > > >
> > > > >
> > > > > "Lei Jiang" <code@263.net> wrote in message
> > > > > news:ekD9uLyYEHA.3688@TK2MSFTNGP12.phx.gbl...
> > > > > > I have a winform control hosted in IE web page. When the client> > > is
> > > > > > Win2000, the page works ok. However, when I view the page from
> > > Win2003,
> > > > it
> > > > > > shows nothing. I could find some error message from theSystem.Security.Policy.PolicyException:> > thrown> > > > > Internet
> > > > > > Files" folder :
> > > > > >
> > > > > > ***** IEHOST Error Log (Tuesday, 06 July 2004 14:14) *****
> > > > > >
> > > > > >
> > > > > >
> > > > > > URL: [url]http://10.147.130.245/dwmweb/Flag.DWM.dll[/url]
> > > > > > Zone: 3
> > > > > > Assembly Name: Flag.DWM.dll
> > > > > > Type Name: Flag.DWM.TabDWMControl
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- Thrown Exception -----
> > > > > >
> > > > > >
> > > > > > System.Reflection.TargetInvocationException: Exception has been> > Failed> > > > by
> > > > > > the target of an invocation. ---> System.IO.FileLoadException:> > > to
> > > > > > grant required minimum permissions to assembly 'MagicLibrary,
> > > > > > Version=1.7.4.0, Culture=neutral, PublicKeyToken=null'.
> > > > > > File name: 'MagicLibrary, Version=1.7.4.0, Culture=neutral,
> > > > > > PublicKeyToken=null' --->assemblyFile,> > evidence,> > > > Required
> > > > > > permissions can not be acquired.
> > > > > > at System.Security.SecurityManager.ResolvePolicy(Evid ence> > denyPset,> > > > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet> > evidence,> > > > > > PermissionSet& denied, Boolean checkExecutionPermission)
> > > > > > at System.Security.SecurityManager.ResolvePolicy(Evid ence> > denyPset,> > > > > > PermissionSet reqdPset, PermissionSet optPset, PermissionSet> > > > > > PermissionSet& denied, Int32& grantedIsUnrestricted, Boolean
> > > > > > checkExecutionPermission)
> > > > > > at Flag.DWM.TabDWMControl..ctor()
> > > > > > --- End of inner exception stack trace ---
> > > > > > at System.AppDomain.CreateComInstanceFrom(StringMicrosoft.IE.SecureFactory.CreateInstanceWithSecur ity(Int32> > > String
> > > > > > typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
> > > > > > at> code> > String> > > > dwFlag,
> > > > > > Int32 dwZone, String pURL, String uniqueIdString, String link,> > > > > > licenses)
> > > > > >
> > > > > > Pages from other web site can be correctly viewed in my Win2003
> > > > machine.I
> > > > > > checked the MagicLibrary.dll and found it has a lot of interop>> > to> > configure> > > > > > access User32.dll and GDI32.dll. Is that the reason? How to> >> > > my
> > > > > > machine to view the page?Thanks!
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
Lei Jiang Guest



Reply With Quote

