User Control Security in 2.0 aspx

N

Norsoft

I have a .Net 1.1 application which is downloaded into an aspx page. It is a
dll which inherits from System.Windows.Forms.UserControl. 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(SecurityAction.RequestMinimum, Name =
"LocalIntranet")]
[assembly: UIPermissionAttribute(SecurityAction.RequestMinimum, Window =
UIPermissionWindow.SafeSubWindows)]

At the class level I apply;
[UIPermissionAttribute(SecurityAction.Assert)]
[PermissionSet(SecurityAction.Assert)

What do I need to do to enable it to load in a PC with the 2.0 Framework
installed.

Thanks!
Pete Bourget
 
S

Steven Cheng[MSFT]

Hi Norsoft,

Thanks for your posting. Regarding on this issue, I've also found your
another former thread with the same question in this group. I've posted my
repsonse there. I'd appreciate if you have a look there. Also, if you feel
it convenient that we continue to discuss in that thread, please feel free
to post there.

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" <[email protected]>
| Subject: User Control Security in 2.0 aspx
| Date: Tue, 15 Nov 2005 06:37:02 -0800
| Lines: 23
| 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: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comcast.net 67.181.77.42
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358244
| X-Tomcat-NG: microsoft.public.dotnet.framework.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.UserControl. 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(SecurityAction.RequestMinimum, Name =
| "LocalIntranet")]
| [assembly: UIPermissionAttribute(SecurityAction.RequestMinimum, Window =
| UIPermissionWindow.SafeSubWindows)]
|
| At the class level I apply;
| [UIPermissionAttribute(SecurityAction.Assert)]
| [PermissionSet(SecurityAction.Assert)
|
| What do I need to do to enable it to load in a PC with the 2.0 Framework
| installed.
|
| Thanks!
| Pete Bourget
|
|
|
 
N

Norsoft

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: PrintingPermissionAttribute(SecurityAction.RequestMinimum, Level
= PrintingPermissionLevel.DefaultPrinting)]

but it still won't work.
Peter Bourget

Steven Cheng said:
Hi Norsoft,

Thanks for your posting. Regarding on this issue, I've also found your
another former thread with the same question in this group. I've posted my
repsonse there. I'd appreciate if you have a look there. Also, if you feel
it convenient that we continue to discuss in that thread, please feel free
to post there.

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" <[email protected]>
| Subject: User Control Security in 2.0 aspx
| Date: Tue, 15 Nov 2005 06:37:02 -0800
| Lines: 23
| 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: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: c-67-181-77-42.hsd1.ca.comcast.net 67.181.77.42
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358244
| X-Tomcat-NG: microsoft.public.dotnet.framework.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.UserControl. 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(SecurityAction.RequestMinimum, Name =
| "LocalIntranet")]
| [assembly: UIPermissionAttribute(SecurityAction.RequestMinimum, Window =
| UIPermissionWindow.SafeSubWindows)]
|
| At the class level I apply;
| [UIPermissionAttribute(SecurityAction.Assert)]
| [PermissionSet(SecurityAction.Assert)
|
| What do I need to do to enable it to load in a PC with the 2.0 Framework
| installed.
|
| Thanks!
| Pete Bourget
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top