|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
½º¸¶Æ® Ŭ¶óÀÌ¾ðÆ®¿¡¼ÀÇ °·ÂÇÑ À̸§ ÀÎÁõ ¹®Á¦¾È³çÇϼ¼¿ä?
½º¸¶Æ® Ŭ¶óÀÌ¾ðÆ®¸¦ °³¹ßÇϰí ÀÖ½À´Ï´Ù.
°·ÂÇÑ À̸§ Ű snk Çϳª¸¦ ¸¸µé°í,
AssemblyInfo.cs ÆÄÀÏ¿¡ ¾Æ·¡¿Í °°ÀÌ Å° ÆÄÀÏÀ» Ãß°¡Çϰí,
ºÎºÐ ½Å·Ú È£ÃâÀÚ°¡ Á¢±ÙÇÒ ¼ö ÀÖ°Ô ¼³Á¤Çß½À´Ï´Ù.
[assembly: AssemblyKeyFile(@"..\..\mykey.snk")]
[assembly: AllowPartiallyTrustedCallers]
±×¸®°í ³ª¼ ·±Å¸ÀÓ º¸¾È Á¤Ã¥¿¡ ÄÄÇ»ÅÍ¿¡
ÄÚµå±×·ì¿¡ All_Code ¾Æ·¡¿¡
Internet_Zone ¾Æ·¡¿¡ »õ ÄÚµå ±×·ìÀ» ¸¸µé°í, ¸â¹ö
Á¶°ÇÀ» °·ÂÇÑ À̸§À¸·Î ¼³Á¤Çϰí, °·ÂÇÑ À̸§À¸·Î
Á¦°¡ ¸¸µç ½º¸¶Æ® Ŭ¶óÀ̾ðÆ®ÀÇ °ø°³Å° °ªÀ» ºÒ·¯¿Â
ÈÄ, ±ÇÇÑÁýÇÕÀº FullTrust ·Î Çß½À´Ï´Ù.
±×¸®°í³ª¼ ¿Ã¸®°í ºê¶ó¿ìÁ®·Î ¿¸é Internet_Zone º¸¾È
Á¤Ã¥¿¡ À§¹ÝµÇÁö ¾Ê´Â°ÍÀº Àß Ç¥½ÃµË´Ï´Ù.
ÇÏÁö¸¸, Process.Start()¸¦ Çϸé SecurityPermissionExceptionÀÌ
³ª°í,
WebClient ¿¡¼ÀÇ ´Ù¸¥ »çÀÌÆ® Á¢±ÙÇÏ·ÁÇϸé,
WebPermissionException ÀÌ ³ª°í,
¸¶ÀÌÅ©·Î¼ÒÇÁÆ® À¥ºê¶ó¿ìÁ® COM - AxWebbrowser À» ¿Ã¸®¸é
UIPermissionException À̳ª,
SecurityPermissionExceptionÀÌ ³³´Ï´Ù.
±×·¡¼ Namespace ¹Ù·Î ¾Æ·¡¿¡
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
ÀÌ·¸°Ô ÇØÁÖ¸é, Process.Start() ³ª WebClient ÂÊÀº Exception ÀÌ
¾È³ª´Âµ¥, AxWebbrowser ÂÊÀº º¸¾È°ü·Ã Exception ÀÌ ³³´Ï´Ù.
±×¸®°í [PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
ÀÌ°É ¾²¸é ·±Å¸ÀÓ º¸¾È Á¤Ã¥¿¡ FullTrust ¸¦ ¾ÈÁáÀ» ¶§,
Assembly ·ÎµùºÎÅÍ Â÷´ÜµÇ¾î¼ ȸ鿡 ¿ÀºêÁ§Æ® Ç¥½Ã¸¸
³ª¿Í¼,
Ŭ·¡½º Àü¿ª ¸â¹ö º¯¼ö·Î
private PermissionSet permissionSet = new
PermissionSet(PermissionState.Unrestricted);
ÀÌ·¸°Ô ¸¸µé°í,
Process.Start()³ª WebClient ÂÊ ½ÇÇà ¹Ù·Î Àü¿¡
permissionSet.Assert(); ÇÏ¸é º¸¾È Exception ¾øÀÌ ¼öÇàµÇÁö¸¸,
AxWebbrowser ´Â ¸¶Âù°¡Áö·Î ¾ÈµË´Ï´Ù.
µµ´ëü ¾î¶»°Ô Çϸé SmartClient ÀÇ UserControl ÀÌ
·ÎµùµÇ¸é¼ ºÎÅÍ
FullTrust ·Î ¸ðµç Äڵ带 ½ÇÇàÇÒ ¼ö ÀÖÀ»±î¿ä? ¶Ç
FullTrust ±ÇÇÑÀÌ µî·Ï µÇ¾îÀÖÁö ¾ÊÀ¸¸é ¾È³»¸¦ ÇØÁÖ°í
½ÍÀºµ¥, [PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
ÀÌ ¹æ¹ýÀ¸·Î ¾ÈµÉ°Å °°Àºµ¥ ¾î¶»°Ô ÇØ¾ßÇϳª¿ä?
´äº¯ ºÎʵ右´Ï´Ù.¤Ñ¤Ì
Michael,
I feel that what you wrote is something very interesting! However I did not find any way to read it and I have no idea what you were tyring to say. No encoding/decoders could help. I must find out what you wrote! :) Please please please write it again in a world known encoding :) Thank you !!! "Michael \(michka\) Kaplan [MS]" wrote: Ŭ¶óÀÌ¾ðÆ®¸¦>¾È³çÇü¼¿ä? > >½º¸¶Æ® °³¹ßÇðàÀÖ½À´Ã´Ù. > Ç󪸦 ¸¸µé°ÃÂ,>°Â·ÂÇÑ À̸§ Ű snk > °°ÀÌ Ű ÆÄÀÃÂÀ»>AssemblyInfo.cs ÆÄÀÿ¡ ¾Æ·¡¿àÃß°¡ÇðÃÂ, >ºÎºà½Å·Ú È£ÃâÀÚ°¡ â±ÙÇÒ ¼ö ÀÖ°Ãâ€Ã‚¼Â³Ã¤Çß½À´Ã´Ù. > º¸¾È ä忡>[assembly: AssemblyKeyFile(@"..\..\mykey.snk")] >[assembly: AllowPartiallyTrustedCallers] > > >±×¸®°à³ª¼ ·±Å¸ÀÓ ÄÄÇ»Åÿ¡ >ÄÚµå±×·ì¿¡ All_Code ¾Æ·¡¿¡>Internet_Zone ¾Æ·¡¿¡ »õ ÄÚµå ±×·ìÀ» ¸¸µé°ÃÂ, ¸â¹ö>ö°ÇÀ» °Â·ÂÇÑ À̸§À¸·Î ¼³Ã¤ÇðÃÂ,°Â·ÂÇÑ À̸§À¸·Î >æ°¡ ¸¸µç ½º¸¶Æ® Ŭ¶óÀ̾ðÆ®Àǰø°³Å° °ªÀ» ºÒ·¯¿Â >ÈÄ, 񀀥ÃÂýÇÕÀº FullTrust ·Î Çß½À´Ã´Ù.> ºê¶ó¿ìî·Î ¿Â¸é Internet_Zone>±×¸®°Ã³ª¼ ¿Ã¸®°àº¸¾È >ä忡 À§¹ÃµÇÃÂö ¾Ê´Â°ÃÂ˼ ÀßÇ¥½ÃµË´Ã´Ù. >ÇÃÂÃÂö¸¸, Process.Start()¸¦ Çøé SecurityPermissionExceptionÀÌ>³ª°ÃÂ, »çÀÌÆ®>WebClient ¿¡¼ÂÂÀÇ ´Ù¸¥ â±ÙÇ÷ÃÂÇøé, >WebPermissionException ÀÌ ³ª°ÃÂ, À¥ºê¶ó¿ìî COM - AxWebbrowser À»>¸¶ÀÌÅ©·Î¼ÒÇÃÂÆ® ¿Ã¸®¸é >UIPermissionException À̳ª, ¾Æ·¡¿¡>SecurityPermissionExceptionÀÌ ³³´Ã´Ù. > >±×·¡¼ Namespace ¹Ù·Î > ³ª WebClient ÂÊÀº Exception ÀÌ>[PermissionSet(SecurityAction.Assert, Name = "FullTrust")] > >ÀÌ·¸°ÆÇØÃÂÖ¸é, Process.Start() >¾È³ª´Âµ¥, AxWebbrowser ÂÊÀº º¸¾È°ü·Ã Exception À̳³´Ã´Ù. > º¸¾È ä忡 FullTrust ¸¦>±×¸®°à[PermissionSet(SecurityAction.Assert, Name = "FullTrust")] >À̰É ¾²¸é ·±Å¸ÀÓ ¾ÈÃÂáÀ» ¶§, >Assembly ·ÎµùºÎÅàÂ÷´ÜµÇ¾î¼ È¸鿡¿ÀºêçƮ Ç¥½Ã¸¸ >³ª¿Ã¼ÂÂ, º¯¼ö·Î> >Ŭ·¡½º Àü¿ª ¸â¹ö >private PermissionSet permissionSet = new ¹Ù·Î Àü¿¡>PermissionSet(PermissionState.Unrestricted); > >ÀÌ·¸°Æ¸¸µé°ÃÂ, > >Process.Start()³ª WebClient ÂʽÇÇà>permissionSet.Assert(); ÇÃÂ¸é º¸¾È Exception ¾øÀÌ ¼öÇàµÇÃÂö¸¸,>AxWebbrowser ´Â ¸¶Âù°¡ÃÂö·Î ¾ÈµË´Ã´Ù.> SmartClient ÀÇ UserControl ÀÌ>µµ´ëü ¾î¶»°ÆÇøé >·ÎµùµÇ¸é¼ ºÎÅà½ÇÇàÇÒ ¼ö> >FullTrust ·Î ¸ðµç Äڵ带 ÀÖÀ»±î¿ä? ¶Ç >FullTrust ±ÇÇÑÀÌ µî·àµÇ¾îÀÖÃÂö ¾ÊÀ¸¸é¾È³»¸¦ ÇØÃÂÖ°à>½ÃÂÀºµ¥, [PermissionSet(SecurityAction.Assert, Name = °°Àºµ¥ ¾î¶»°Ãâ€"FullTrust")] >ÀÌ ¹æ¹ýÀ¸·Î ¾ÈµÉ°Å ÇØ¾ßÇóª¿ä? > ºÎʵ右´Ã´Ù.¤Ñ¤Ì>´äº¯
Show quote
Hide quote
hi~
I made smartclient.
First, I made a StrongNamed Key(snk file).
I add my key file and set allow partiallytrustedcllers.
[assembly: AssemblyKeyFile(@"..\..\mykey.snk")]
[assembly: AllowPartiallyTrustedCallers]
I add new code group under All_Code -> Internet_Zone.
Member condition = strong named.
Strong named key value = my smartclient strong named key value.
Permission Set = FullTrust
and so, I opened my smart client page by internet explorer.
It's so good, if the control isn't against the rules of Internet_Zone
security policy.
but,
I executed Process.Start(), it raise SecurityPermissionException.
I accessed another site by WebClient, it raised WebPermissionException.
AxWebbrowser, it raised UIPermissionException or
SecurityPermissionException.
so I added that code under namespace.
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
so, Process.Start() or WebClient didn't raise Exception.
but AxWebbrowser still raise Exception, it related security.
and I used this code.
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
If I didn't set FullTrust at runtime security policy
, Assembly loading was blocked.
so I edit it to class internal member variable.
private PermissionSet permissionSet = new
PermissionSet(PermissionState.Unrestricted);
before execute Process.Start() or WebClient, I do
permissionSet.Assert();
Security Exception didn't raise.
but AxWebbrowser still raise Security Exception.
How can I run my full code by FullTrust by from smart client loading
time?
I wish to inform my customer, if they haven't full trust permission at
runtime security policy.
but it's impossible by
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
How do I inform it?
Please reply my question...
Lady_A 작성:
> Michael,
> I feel that what you wrote is something very interesting!
> However I did not find any way to read it and I have no idea what you
> were tyring to say.
> No encoding/decoders could help.
> I must find out what you wrote! :)
> Please please please write it again in a world known encoding :)
> Thank you !!!
>
> "Michael \(michka\) Kaplan [MS]" wrote:
> >¾È³çÇü¼¿ä?
> >
> >½º¸¶Æ®
> Ŭ¶óÀÌ¾ðÆ®¸¦
> °³¹ßÇðàÀÖ½À´Ã´Ù.
> >
> >°Â·ÂÇÑ À̸§ Ű snk
> Ç󪸦 ¸¸µé°ÃÂ,
> >
> >AssemblyInfo.cs ÆÄÀÿ¡ ¾Æ·¡¿ÃÂ
> °°ÀÌ Ű ÆÄÀÃÂÀ»
> Ãß°¡ÇðÃÂ,
> >ºÎºà½Å·Ú È£ÃâÀÚ°¡
> â±ÙÇÒ ¼ö ÀÖ°Ãâ€
> ¼³Ã¤Çß½À´Ã´Ù.
> >
> >[assembly: AssemblyKeyFile(@"..\..\mykey.snk")]
> >[assembly: AllowPartiallyTrustedCallers]
> >
> >
> >±×¸®°à³ª¼ ·±Å¸ÀÓ
> º¸¾È ä忡
> ÄÄÇ»Åÿ¡
> >ÄÚµå±×·ì¿¡ All_Code
> ¾Æ·¡¿¡
> >Internet_Zone ¾Æ·¡¿¡ »õ ÄÚµå
> ±×·ìÀ» ¸¸µé°ÃÂ, ¸â¹ö
> >ö°ÇÀ» °Â·ÂÇÑ
> À̸§À¸·Î ¼³Ã¤ÇðÃÂ,
> °Â·ÂÇÑ À̸§À¸·Î
> >æ°¡ ¸¸µç ½º¸¶Æ®
> Ŭ¶óÀ̾ðÆ®ÀÇ
> °ø°³Å° °ªÀ» ºÒ·¯¿Â
> >ÈÄ, 񀀥ÃÂýÇÕÀº FullTrust
> ·Î Çß½À´Ã´Ù.
> >
> >±×¸®°Ã³ª¼ ¿Ã¸®°ÃÂ
> ºê¶ó¿ìî·Î ¿Â¸é Internet_Zone
> º¸¾È
> >ä忡 À§¹ÃµÇÃÂö
> ¾Ê´Â°ÃÂ˼ Àß
> Ç¥½ÃµË´Ã´Ù.
> >ÇÃÂÃÂö¸¸, Process.Start()¸¦ Çøé
> SecurityPermissionExceptionÀÌ
> >³ª°ÃÂ,
> >WebClient ¿¡¼ÂÂÀÇ ´Ù¸¥
> »çÀÌÆ®
> â±ÙÇ÷ÃÂÇøé,
> >WebPermissionException ÀÌ ³ª°ÃÂ,
> >¸¶ÀÌÅ©·Î¼ÒÇÃÂÆ®
> À¥ºê¶ó¿ìî COM - AxWebbrowser À»
> ¿Ã¸®¸é
> >UIPermissionException À̳ª,
> >SecurityPermissionExceptionÀÌ ³³´Ã´Ù.
> >
> >±×·¡¼ Namespace ¹Ù·Î
> ¾Æ·¡¿¡
> >
> >[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
> >
> >ÀÌ·¸°ÆÇØÃÂÖ¸é, Process.Start()
> ³ª WebClient ÂÊÀº Exception ÀÌ
> >¾È³ª´Âµ¥, AxWebbrowser ÂÊÀº
> º¸¾È°ü·Ã Exception ÀÌ
> ³³´Ã´Ù.
> >
> >±×¸®°à[PermissionSet(SecurityAction.Assert, Name =
> "FullTrust")]
> >ÀÌ°É ¾²¸é ·±Å¸ÀÓ
> º¸¾È ä忡 FullTrust ¸¦
> ¾ÈÃÂáÀ» ¶§,
> >Assembly ·ÎµùºÎÅÃÂ
> Â÷´ÜµÇ¾î¼ È¸鿡
> ¿ÀºêçƮ Ç¥½Ã¸¸
> >³ª¿Ã¼ÂÂ,
> >
> >Ŭ·¡½º Àü¿ª ¸â¹ö
> º¯¼ö·Î
> >private PermissionSet permissionSet = new
> >PermissionSet(PermissionState.Unrestricted);
> >
> >ÀÌ·¸°Æ¸¸µé°ÃÂ,
> >
> >Process.Start()³ª WebClient ÂʽÇÇÃÂ
> ¹Ù·Î Àü¿¡
> >permissionSet.Assert(); ÇÃÂ¸é º¸¾È Exception
> ¾øÀÌ ¼öÇàµÇÃÂö¸¸,
> >AxWebbrowser ´Â ¸¶Âù°¡ÃÂö·Î
> ¾ÈµË´Ã´Ù.
> >
> >µµ´ëü ¾î¶»°ÆÇøé
> SmartClient ÀÇ UserControl ÀÌ
> >·ÎµùµÇ¸é¼ ºÎÅÃÂ
> >
> >FullTrust ·Î ¸ðµç Äڵ带
> ½ÇÇàÇÒ ¼ö
> ÀÖÀ»±î¿ä? ¶Ç
> >FullTrust ±ÇÇÑÀÌ µî·ÃÂ
> µÇ¾îÀÖÃÂö ¾ÊÀ¸¸é
> ¾È³»¸¦ ÇØÃÂÖ°ÃÂ
> >½ÃÂÀºµ¥, [PermissionSet(SecurityAction.Assert, Name =
> "FullTrust")]
> >ÀÌ ¹æ¹ýÀ¸·Î ¾ÈµÉ°Å
> °°Àºµ¥ ¾î¶»°Ãâ€
> ÇØ¾ßÇóª¿ä?
> >
> >´äº¯
> ºÎʵ右´Ã´Ù.¤Ñ¤Ì
>
>
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com
Michael,
Somehow this is getting posted under the wrong thread. I have asked a question and this somehow got to be the reply of my question, while, of course, there is no connection. Unfortunately I have no answer re your question. However I think you need to make sure that your question got posted to the newsgroups you intented it to be posted and not a a reply to someone else'e question. I hope someone would be able to help you! Thank you, Alexandra. Show quoteHide quote "Michael \(michka\) Kaplan [MS]" wrote: >hi~ > >I made smartclient. > >First, I made a StrongNamed Key(snk file). > >I add my key file and set allow partiallytrustedcllers. > >[assembly: AssemblyKeyFile(@"..\..\mykey.snk")] >[assembly: AllowPartiallyTrustedCallers] > >I add new code group under All_Code -> Internet_Zone. >Member condition = strong named. >Strong named key value = my smartclient strong named key value. >Permission Set = FullTrust > >and so, I opened my smart client page by internet explorer. >It's so good, if the control isn't against the rules of Internet_Zone >security policy. >but, >I executed Process.Start(), it raise SecurityPermissionException. >I accessed another site by WebClient, it raised WebPermissionException. >AxWebbrowser, it raised UIPermissionException or >SecurityPermissionException. > >so I added that code under namespace. > >[PermissionSet(SecurityAction.Assert, Name = "FullTrust")] > >so, Process.Start() or WebClient didn't raise Exception. > >but AxWebbrowser still raise Exception, it related security. > >and I used this code. > >[PermissionSet(SecurityAction.Assert, Name = "FullTrust")] > >If I didn't set FullTrust at runtime security policy >, Assembly loading was blocked. > >so I edit it to class internal member variable. > >private PermissionSet permissionSet = new >PermissionSet(PermissionState.Unrestricted); > >before execute Process.Start() or WebClient, I do >permissionSet.Assert(); > >Security Exception didn't raise. >but AxWebbrowser still raise Security Exception. > >How can I run my full code by FullTrust by from smart client loading >time? > >I wish to inform my customer, if they haven't full trust permission at >runtime security policy. > >but it's impossible by > >[PermissionSet(SecurityAction.Assert, Name = "FullTrust")] > >How do I inform it? > >Please reply my question... >
Other interesting topics
thread problem
running c# executable.... How can a parent know if a child control chages Saving TIF Image from the Internet Questions on DLinq [OT?] Who has .NET 1.1 and doesn't know it? How to Cancel a "non cancellable" Event .NET 2.0: code access security / authentication C# prototype of C: structure includes void** Enum vs Constants performance |
|||||||||||||||||||||||