|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
IE C# ActiveX without permissonsIE as following: <OBJECT id="myControl1" name="myControl1" classid="ClassLibrary1.dll#ClassLibrary1.Class2" width="0" height="0"> </OBJECT> The class is created and runs Ok until the following line string path = Path.GetTempPath() + "Executable.exe"; Where it throws an Exception message like this: "Request of the permission of type ' System.Security.Permissions.EnvironmentPermission, mscorlib, Versino=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5....' failed" What I have to do to grant the correct permissions for the assembly? Thanks Mauro Asprea See http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx for a
general explanation of the issue and http://blogs.msdn.com/shawnfa/archive/2003/06/26/57026.aspx for some additional details that are pertinent to IE-hosted assemblies. Show quoteHide quote "Brutus" <mauroasp***@gmail.com> wrote in message news:1163094357.255115.280120@b28g2000cwb.googlegroups.com... > Hi, I'm porting a VB ActiveX to C# .Net. The C# ActiveX is called from > IE as following: > > <OBJECT id="myControl1" name="myControl1" > classid="ClassLibrary1.dll#ClassLibrary1.Class2" width="0" height="0"> > </OBJECT> > > The class is created and runs Ok until the following line > > string path = Path.GetTempPath() + "Executable.exe"; > > Where it throws an Exception message like this: > > "Request of the permission of type ' > System.Security.Permissions.EnvironmentPermission, mscorlib, > Versino=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5....' failed" > > What I have to do to grant the correct permissions for the assembly? > > Thanks > > Mauro Asprea > Thanks! I read the entire thread but now I'm a bit confused. It's
possible or not to have the required permissions to execute the .Net Assembly without change anything on the client side?? I don't understand why in VB the permissions are granted for the Win32 GetTempPath and not for .Net?? On 13 nov, 20:14, "Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote: Show quoteHide quote > Seehttp://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspxfor a > general explanation of the issue andhttp://blogs.msdn.com/shawnfa/archive/2003/06/26/57026.aspxfor some > additional details that are pertinent to IE-hosted assemblies. > > "Brutus" <mauroasp***@gmail.com> wrote in messagenews:1163094357.255115.280***@b28g2000cwb.googlegroups.com... > > > Hi, I'm porting a VB ActiveX to C# .Net. The C# ActiveX is called from > > IE as following: > > > <OBJECT id="myControl1" name="myControl1" > > classid="ClassLibrary1.dll#ClassLibrary1.Class2" width="0" height="0"> > > </OBJECT> > > > The class is created and runs Ok until the following line > > > string path = Path.GetTempPath() + "Executable.exe"; > > > Where it throws an Exception message like this: > > > "Request of the permission of type ' > > System.Security.Permissions.EnvironmentPermission, mscorlib, > > Versino=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5....' failed" > > > What I have to do to grant the correct permissions for the assembly? > > > Thanks > > > Mauro Asprea
Winform: Call a vbscript with elevated privileges
FullTrust on network drive Why am I getting errors when I want to rebuild the TreeView contro Login error when opening a deployed project User creation.... Forms Authentication with Active Directory, login control crashes Impersonation testing Security Exception Is there a function that I can call to validate a domain? How to show the windows 'Connect To' dialog from C# |
|||||||||||||||||||||||