473,581 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control Security on .Net 2.0

I have a .Net 1.1 application which is downloaded into an aspx page. It is a
dll which inherits from System.Windows. Forms.UserContr ol. It works fine on a
PC with only the 1.1 Framework. However, the control will not load on a PC
with the 2.0 Framework installed. I know that IE will use the newest
framework so I assume it is a security issue.

At the assembly level I apply the following attributes;
[assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
"LocalIntranet" )]
[assembly: UIPermissionAtt ribute(Security Action.RequestM inimum, Window =
UIPermissionWin dow.SafeSubWind ows)]

At the class level I apply;
[UIPermissionAtt ribute(Security Action.Assert)]
[PermissionSet(S ecurityAction.A ssert)

What do I need to do to enable it to load in a PC with the 2.0 Framework
installed.
Thanks!
Nov 19 '05 #1
5 2051
Hi Norsoft,

Welcome to ASPNET newsgroup.
As for the IE host winform control scenario, yes, the IE by default will
load the latest installed dotnet framework on the client machine. And as
for the CAS permission, we can just use the .NET 2.0's configuration wizard
to add a code group for our winform control(by URL path or strong-name...)
on the clientside machine. I think that's just like what we do in .net 1.1
environment. What's the permissions you used to grant to your control in
..net 1.1 CAS configuation?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Norsoft" <no*****@newsgr oup.nospam>
| Subject: User Control Security on .Net 2.0
| Date: Mon, 14 Nov 2005 15:26:30 -0800
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3581 02
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| I have a .Net 1.1 application which is downloaded into an aspx page. It
is a
| dll which inherits from System.Windows. Forms.UserContr ol. It works fine
on a
| PC with only the 1.1 Framework. However, the control will not load on a
PC
| with the 2.0 Framework installed. I know that IE will use the newest
| framework so I assume it is a security issue.
|
| At the assembly level I apply the following attributes;
| [assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
| "LocalIntranet" )]
| [assembly: UIPermissionAtt ribute(Security Action.RequestM inimum, Window =
| UIPermissionWin dow.SafeSubWind ows)]
|
| At the class level I apply;
| [UIPermissionAtt ribute(Security Action.Assert)]
| [PermissionSet(S ecurityAction.A ssert)
|
| What do I need to do to enable it to load in a PC with the 2.0 Framework
| installed.
| Thanks!
|
|
|

Nov 19 '05 #2
Ok, if you see my other post I could not see this message. I have fixed that
problem by deleting all messages and reloading them. Anyway, let me post the
info I put in the other one.

Thanks for the reply. I had posted the same question on the 14th but the
Outlook Express news reader will not see it, even if I do a search, so I
would appreciate it if you would add your reply here.

I have been using the 1.1 application for a long time but this model seems
incredibly fragile. I found part of my problem to be I defined one of my
class variables as "private JLReport m_JLReport = null;" This will stop the
app from loading in a web page with .Net 2.0. If I define it as "private
JLReport m_JLReport ;" (no =null) then it loads. Also, I have some problem
with a call to a web service, If you change almost anything the app won't
load.

What I did was create a new web application with just the form and no
functionality. That worked, then I started adding chunks of code from the
app until it failed. This is a really poor way to build an application.

Isn't there any way to drop into the debugger so you can see where it fails?

Right now I have a problem with printing permissions. When I try to set the
printer name on the PrintDocument class I get a security exception say it
could not get the permissions required. I use the attribute
[assembly: PrintingPermiss ionAttribute(Se curityAction.Re questMinimum, Level
= PrintingPermiss ionLevel.Defaul tPrinting)] but it still won't work.
Peter Bourget

Now as to your reply, we did not have to create a code group on the clients
machine. We used the 1.1 Wizards to Adjust .Net Security so the Trusted
Sites had Full Trust. I don't see the equivalent Wizard for .Net 2.0. I
will look into code groups and see if they will work.
Peter Bourget

"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:20******** *****@TK2MSFTNG XA02.phx.gbl...
Hi Norsoft,

Welcome to ASPNET newsgroup.
As for the IE host winform control scenario, yes, the IE by default will
load the latest installed dotnet framework on the client machine. And as
for the CAS permission, we can just use the .NET 2.0's configuration
wizard
to add a code group for our winform control(by URL path or strong-name...)
on the clientside machine. I think that's just like what we do in .net 1.1
environment. What's the permissions you used to grant to your control in
net 1.1 CAS configuation?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Norsoft" <no*****@newsgr oup.nospam>
| Subject: User Control Security on .Net 2.0
| Date: Mon, 14 Nov 2005 15:26:30 -0800
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3581 02
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| I have a .Net 1.1 application which is downloaded into an aspx page. It
is a
| dll which inherits from System.Windows. Forms.UserContr ol. It works fine
on a
| PC with only the 1.1 Framework. However, the control will not load on a
PC
| with the 2.0 Framework installed. I know that IE will use the newest
| framework so I assume it is a security issue.
|
| At the assembly level I apply the following attributes;
| [assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
| "LocalIntranet" )]
| [assembly: UIPermissionAtt ribute(Security Action.RequestM inimum, Window =
| UIPermissionWin dow.SafeSubWind ows)]
|
| At the class level I apply;
| [UIPermissionAtt ribute(Security Action.Assert)]
| [PermissionSet(S ecurityAction.A ssert)
|
| What do I need to do to enable it to load in a PC with the 2.0 Framework
| installed.
| Thanks!
|
|
|

Nov 20 '05 #3
Thanks for your followup Peter,

Yes, since the IE hosted winform control are hosted in Internet explore
process, we can not perform managed debugging on it. As far as I know, for
IE host control, we have the IE host log for general troubleshooting :

#HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet
Explorer
http://support.microsoft.com/default...b;en-us;313892

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Norsoft" <no*****@newsgr oup.nospam>
| References: <e#************ **@TK2MSFTNGP10 .phx.gbl>
<20************ *@TK2MSFTNGXA02 .phx.gbl>
| Subject: Re: User Control Security on .Net 2.0
| Date: Wed, 16 Nov 2005 10:26:37 -0800
| Lines: 103
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uM************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3586 56
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Ok, if you see my other post I could not see this message. I have fixed
that
| problem by deleting all messages and reloading them. Anyway, let me post
the
| info I put in the other one.
|
| Thanks for the reply. I had posted the same question on the 14th but the
| Outlook Express news reader will not see it, even if I do a search, so I
| would appreciate it if you would add your reply here.
|
| I have been using the 1.1 application for a long time but this model seems
| incredibly fragile. I found part of my problem to be I defined one of my
| class variables as "private JLReport m_JLReport = null;" This will stop
the
| app from loading in a web page with .Net 2.0. If I define it as "private
| JLReport m_JLReport ;" (no =null) then it loads. Also, I have some problem
| with a call to a web service, If you change almost anything the app won't
| load.
|
| What I did was create a new web application with just the form and no
| functionality. That worked, then I started adding chunks of code from the
| app until it failed. This is a really poor way to build an application.
|
| Isn't there any way to drop into the debugger so you can see where it
fails?
|
| Right now I have a problem with printing permissions. When I try to set
the
| printer name on the PrintDocument class I get a security exception say it
| could not get the permissions required. I use the attribute
| [assembly: PrintingPermiss ionAttribute(Se curityAction.Re questMinimum,
Level
| = PrintingPermiss ionLevel.Defaul tPrinting)] but it still won't work.
| Peter Bourget
|
| Now as to your reply, we did not have to create a code group on the
clients
| machine. We used the 1.1 Wizards to Adjust .Net Security so the Trusted
| Sites had Full Trust. I don't see the equivalent Wizard for .Net 2.0. I
| will look into code groups and see if they will work.
| Peter Bourget
|
| "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| news:20******** *****@TK2MSFTNG XA02.phx.gbl...
| > Hi Norsoft,
| >
| > Welcome to ASPNET newsgroup.
| > As for the IE host winform control scenario, yes, the IE by default will
| > load the latest installed dotnet framework on the client machine. And as
| > for the CAS permission, we can just use the .NET 2.0's configuration
| > wizard
| > to add a code group for our winform control(by URL path or
strong-name...)
| > on the clientside machine. I think that's just like what we do in .net
1.1
| > environment. What's the permissions you used to grant to your control in
| > net 1.1 CAS configuation?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Norsoft" <no*****@newsgr oup.nospam>
| > | Subject: User Control Security on .Net 2.0
| > | Date: Mon, 14 Nov 2005 15:26:30 -0800
| > | Lines: 21
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| > | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3581 02
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | I have a .Net 1.1 application which is downloaded into an aspx page.
It
| > is a
| > | dll which inherits from System.Windows. Forms.UserContr ol. It works
fine
| > on a
| > | PC with only the 1.1 Framework. However, the control will not load on
a
| > PC
| > | with the 2.0 Framework installed. I know that IE will use the newest
| > | framework so I assume it is a security issue.
| > |
| > | At the assembly level I apply the following attributes;
| > | [assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
| > | "LocalIntranet" )]
| > | [assembly: UIPermissionAtt ribute(Security Action.RequestM inimum,
Window =
| > | UIPermissionWin dow.SafeSubWind ows)]
| > |
| > | At the class level I apply;
| > | [UIPermissionAtt ribute(Security Action.Assert)]
| > | [PermissionSet(S ecurityAction.A ssert)
| > |
| > | What do I need to do to enable it to load in a PC with the 2.0
Framework
| > | installed.
| > | Thanks!
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #4
Thanks!
I'll take a look at it and see if it helps. I have opened an incident with
MSFT on this. I bypassed my printing code and also have trouble with my
imaging section. Microsoft really needs to put out some clear information on
the security issues and how to deal with them for these controls loaded in
IE. There is just way too much information on security and it is way too
spread out. While there is a lot of info the usual suggestion seems to be
"keep trying different things until it works". There should be clear,
concise step by step walkthroughs on how to diagnose and determine the
security required and how to configure and code so it works. Just saying I
may have to create a policy is not sufficient. Even if I wanted to put a
custom policy on thousands of PC during deployment I would still have to
figure out what has to be in that policy by trial and error.

"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:N$******** ******@TK2MSFTN GXA02.phx.gbl.. .
Thanks for your followup Peter,

Yes, since the IE hosted winform control are hosted in Internet explore
process, we can not perform managed debugging on it. As far as I know, for
IE host control, we have the IE host log for general troubleshooting :

#HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet
Explorer
http://support.microsoft.com/default...b;en-us;313892

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Norsoft" <no*****@newsgr oup.nospam>
| References: <e#************ **@TK2MSFTNGP10 .phx.gbl>
<20************ *@TK2MSFTNGXA02 .phx.gbl>
| Subject: Re: User Control Security on .Net 2.0
| Date: Wed, 16 Nov 2005 10:26:37 -0800
| Lines: 103
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uM************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3586 56
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Ok, if you see my other post I could not see this message. I have fixed
that
| problem by deleting all messages and reloading them. Anyway, let me post
the
| info I put in the other one.
|
| Thanks for the reply. I had posted the same question on the 14th but the
| Outlook Express news reader will not see it, even if I do a search, so I
| would appreciate it if you would add your reply here.
|
| I have been using the 1.1 application for a long time but this model
seems
| incredibly fragile. I found part of my problem to be I defined one of my
| class variables as "private JLReport m_JLReport = null;" This will stop
the
| app from loading in a web page with .Net 2.0. If I define it as "private
| JLReport m_JLReport ;" (no =null) then it loads. Also, I have some
problem
| with a call to a web service, If you change almost anything the app
won't
| load.
|
| What I did was create a new web application with just the form and no
| functionality. That worked, then I started adding chunks of code from
the
| app until it failed. This is a really poor way to build an application.
|
| Isn't there any way to drop into the debugger so you can see where it
fails?
|
| Right now I have a problem with printing permissions. When I try to set
the
| printer name on the PrintDocument class I get a security exception say
it
| could not get the permissions required. I use the attribute
| [assembly: PrintingPermiss ionAttribute(Se curityAction.Re questMinimum,
Level
| = PrintingPermiss ionLevel.Defaul tPrinting)] but it still won't work.
| Peter Bourget
|
| Now as to your reply, we did not have to create a code group on the
clients
| machine. We used the 1.1 Wizards to Adjust .Net Security so the Trusted
| Sites had Full Trust. I don't see the equivalent Wizard for .Net 2.0. I
| will look into code groups and see if they will work.
| Peter Bourget
|
| "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| news:20******** *****@TK2MSFTNG XA02.phx.gbl...
| > Hi Norsoft,
| >
| > Welcome to ASPNET newsgroup.
| > As for the IE host winform control scenario, yes, the IE by default
will
| > load the latest installed dotnet framework on the client machine. And
as
| > for the CAS permission, we can just use the .NET 2.0's configuration
| > wizard
| > to add a code group for our winform control(by URL path or
strong-name...)
| > on the clientside machine. I think that's just like what we do in .net
1.1
| > environment. What's the permissions you used to grant to your control
in
| > net 1.1 CAS configuation?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Norsoft" <no*****@newsgr oup.nospam>
| > | Subject: User Control Security on .Net 2.0
| > | Date: Mon, 14 Nov 2005 15:26:30 -0800
| > | Lines: 21
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| > | Path:
TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3581 02
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | I have a .Net 1.1 application which is downloaded into an aspx page.
It
| > is a
| > | dll which inherits from System.Windows. Forms.UserContr ol. It works
fine
| > on a
| > | PC with only the 1.1 Framework. However, the control will not load
on
a
| > PC
| > | with the 2.0 Framework installed. I know that IE will use the newest
| > | framework so I assume it is a security issue.
| > |
| > | At the assembly level I apply the following attributes;
| > | [assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
| > | "LocalIntranet" )]
| > | [assembly: UIPermissionAtt ribute(Security Action.RequestM inimum,
Window =
| > | UIPermissionWin dow.SafeSubWind ows)]
| > |
| > | At the class level I apply;
| > | [UIPermissionAtt ribute(Security Action.Assert)]
| > | [PermissionSet(S ecurityAction.A ssert)
| > |
| > | What do I need to do to enable it to load in a PC with the 2.0
Framework
| > | installed.
| > | Thanks!
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #5
Thanks for your followup and the feedback Norsoft,

Yes, I agree with you that currently as for IE hosting managed code
reference is quite unsufficient. We also often meet such problems which
lead us to troubleshooting from basic CAS checking.... And there seems
only some individual techincal articles discussing on IE hosting and
related security ...... So I'll also recommend you submit this request
through the new MS product feedback:

# MSDN Product Feedback Center
http://lab.msdn.microsoft.com/produc...k/default.aspx

In addition, for such CAS related application(exe cuting managed code in
Partial Trust environment...) , we'll suggest design the security policy and
analyize the code permission from start and often evaluate the permission
sets required. There exist some tool in .NET framework SDK like the
permview.exe for .net 1.0/1.1 and the permCalc.exe for .NET 2.0 which can
help calculate the permissions our assemblies require....

Thanks again for your posting.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Norsoft" <no*****@newsgr oup.nospam>
| References: <e#************ **@TK2MSFTNGP10 .phx.gbl>
<20************ *@TK2MSFTNGXA02 .phx.gbl>
<uM************ **@tk2msftngp13 .phx.gbl>
<N$************ **@TK2MSFTNGXA0 2.phx.gbl>
| Subject: Re: User Control Security on .Net 2.0
| Date: Fri, 18 Nov 2005 06:58:33 -0800
| Lines: 188
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <Og************ **@TK2MSFTNGP11 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP11.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3592 22
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Thanks!
| I'll take a look at it and see if it helps. I have opened an incident
with
| MSFT on this. I bypassed my printing code and also have trouble with my
| imaging section. Microsoft really needs to put out some clear information
on
| the security issues and how to deal with them for these controls loaded
in
| IE. There is just way too much information on security and it is way too
| spread out. While there is a lot of info the usual suggestion seems to be
| "keep trying different things until it works". There should be clear,
| concise step by step walkthroughs on how to diagnose and determine the
| security required and how to configure and code so it works. Just saying
I
| may have to create a policy is not sufficient. Even if I wanted to put a
| custom policy on thousands of PC during deployment I would still have to
| figure out what has to be in that policy by trial and error.
|
| "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| news:N$******** ******@TK2MSFTN GXA02.phx.gbl.. .
| > Thanks for your followup Peter,
| >
| > Yes, since the IE hosted winform control are hosted in Internet explore
| > process, we can not perform managed debugging on it. As far as I know,
for
| > IE host control, we have the IE host log for general troubleshooting :
| >
| > #HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet
| > Explorer
| > http://support.microsoft.com/default...b;en-us;313892
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | From: "Norsoft" <no*****@newsgr oup.nospam>
| > | References: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| > <20************ *@TK2MSFTNGXA02 .phx.gbl>
| > | Subject: Re: User Control Security on .Net 2.0
| > | Date: Wed, 16 Nov 2005 10:26:37 -0800
| > | Lines: 103
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <uM************ **@tk2msftngp13 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| > | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
| > | Xref: TK2MSFTNGXA02.p hx.gbl
| > microsoft.publi c.dotnet.framew ork.aspnet:3586 56
| > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > |
| > | Ok, if you see my other post I could not see this message. I have
fixed
| > that
| > | problem by deleting all messages and reloading them. Anyway, let me
post
| > the
| > | info I put in the other one.
| > |
| > | Thanks for the reply. I had posted the same question on the 14th but
the
| > | Outlook Express news reader will not see it, even if I do a search,
so I
| > | would appreciate it if you would add your reply here.
| > |
| > | I have been using the 1.1 application for a long time but this model
| > seems
| > | incredibly fragile. I found part of my problem to be I defined one of
my
| > | class variables as "private JLReport m_JLReport = null;" This will
stop
| > the
| > | app from loading in a web page with .Net 2.0. If I define it as
"private
| > | JLReport m_JLReport ;" (no =null) then it loads. Also, I have some
| > problem
| > | with a call to a web service, If you change almost anything the app
| > won't
| > | load.
| > |
| > | What I did was create a new web application with just the form and no
| > | functionality. That worked, then I started adding chunks of code from
| > the
| > | app until it failed. This is a really poor way to build an
application.
| > |
| > | Isn't there any way to drop into the debugger so you can see where it
| > fails?
| > |
| > | Right now I have a problem with printing permissions. When I try to
set
| > the
| > | printer name on the PrintDocument class I get a security exception
say
| > it
| > | could not get the permissions required. I use the attribute
| > | [assembly: PrintingPermiss ionAttribute(Se curityAction.Re questMinimum,
| > Level
| > | = PrintingPermiss ionLevel.Defaul tPrinting)] but it still won't work.
| > | Peter Bourget
| > |
| > | Now as to your reply, we did not have to create a code group on the
| > clients
| > | machine. We used the 1.1 Wizards to Adjust .Net Security so the
Trusted
| > | Sites had Full Trust. I don't see the equivalent Wizard for .Net 2.0.
I
| > | will look into code groups and see if they will work.
| > | Peter Bourget
| > |
| > | "Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
| > | news:20******** *****@TK2MSFTNG XA02.phx.gbl...
| > | > Hi Norsoft,
| > | >
| > | > Welcome to ASPNET newsgroup.
| > | > As for the IE host winform control scenario, yes, the IE by default
| > will
| > | > load the latest installed dotnet framework on the client machine.
And
| > as
| > | > for the CAS permission, we can just use the .NET 2.0's configuration
| > | > wizard
| > | > to add a code group for our winform control(by URL path or
| > strong-name...)
| > | > on the clientside machine. I think that's just like what we do in
..net
| > 1.1
| > | > environment. What's the permissions you used to grant to your
control
| > in
| > | > net 1.1 CAS configuation?
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | > --------------------
| > | > | From: "Norsoft" <no*****@newsgr oup.nospam>
| > | > | Subject: User Control Security on .Net 2.0
| > | > | Date: Mon, 14 Nov 2005 15:26:30 -0800
| > | > | Lines: 21
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | > | X-RFC2646: Format=Flowed; Original
| > | > | Message-ID: <e#************ **@TK2MSFTNGP10 .phx.gbl>
| > | > | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| > | > | NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comc ast.net 67.181.77.42
| > | > | Path:
| > TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP10.phx. gbl
| > | > | Xref: TK2MSFTNGXA02.p hx.gbl
| > | > microsoft.publi c.dotnet.framew ork.aspnet:3581 02
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| > | > |
| > | > | I have a .Net 1.1 application which is downloaded into an aspx
page.
| > It
| > | > is a
| > | > | dll which inherits from System.Windows. Forms.UserContr ol. It works
| > fine
| > | > on a
| > | > | PC with only the 1.1 Framework. However, the control will not
load
| > on
| > a
| > | > PC
| > | > | with the 2.0 Framework installed. I know that IE will use the
newest
| > | > | framework so I assume it is a security issue.
| > | > |
| > | > | At the assembly level I apply the following attributes;
| > | > | [assembly: PermissionSet(S ecurityAction.R equestMinimum, Name =
| > | > | "LocalIntranet" )]
| > | > | [assembly: UIPermissionAtt ribute(Security Action.RequestM inimum,
| > Window =
| > | > | UIPermissionWin dow.SafeSubWind ows)]
| > | > |
| > | > | At the class level I apply;
| > | > | [UIPermissionAtt ribute(Security Action.Assert)]
| > | > | [PermissionSet(S ecurityAction.A ssert)
| > | > |
| > | > | What do I need to do to enable it to load in a PC with the 2.0
| > Framework
| > | > | installed.
| > | > | Thanks!
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
311
by: dave | last post by:
I have an application/component that updates an individual's active directory information. The current application finds the active directory entry via the following.. Dim entry As DirectoryEntry = New DirectoryEntry("LDAP://" & m_DomainName, m_Username, m_Password, AuthenticationTypes.FastBind Dim ds As New DirectorySearcher(entry Dim...
6
1885
by: George Economos | last post by:
I am trying to display a user control contained within an c++ assembly in internet explorer. When I create an equivalent user control in c#, it displays just fine. Before I get into specifics, is it possible to do the same with a c++ user control or is this another example of c++ being a second class citizen in ..NET? ..NET 1.1
2
2160
by: Danny Bloodworth | last post by:
I have a usercontrol (login.ascx) that is very simple. It accepts input through two textboxes, and then the user clicks an Imagebutton to submit. I have a parent form that checks the page security (security level needed) against current user security (stored in the context object) and if user security >= level needed to view page then...
5
3098
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to impersonate a user and obtain network credentials using the DuplicateTokenEx call with appropriate parameters even though the call seems to not...
1
3347
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is comprised of a DataGrid may have separate permissions for adding, deleting and updating a news item. Problem Up until now, I have been implementing...
8
2256
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
5
4072
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names...
2
15057
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have been able to find the cause of the problem, and will describe it here first textually and then through a code example. The purpose of what I am...
4
2474
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried unsuccessfully in creating the whole pane as a user control and have succeeded in adding the pane and then dynamically adding the content which is a user...
0
7868
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8149
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8175
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6553
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5674
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5364
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.