473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Windows Usercontrols in Web Forms - Permissions, Security.....

We are trying to create a system where our users will navigate to a web
page, and this web page will reference a Windows User Control which is
then downloaded and run on the users machine.

The User Control is referenced on the web page in the following way

<OBJECT id="RegistryReaderCtrl"
classid="http://localhost/CustomerRegistration/UserCtrlRegistry.dll#UserCtrlRegistry.RegistryRead er"
VIEWASTEXT></OBJECT>
Now this works IF we do the following on the clients machine;

1) Fully trust the assembly using the .NET Configuration Tool

2) Include our site in the Trusted Sites Group and give this group full
access.

(this is because the user control directly access the filesystem on the
clients machine, to read data from it).
However we don't want to have to do this on every client machine.
One approach we considered was the following;

1) Install (using an msi installer) an assembly in the GAC on the
client machine. This assembly would handle all the restricted actions
(such as file IO etc). This assembly has the attribute:

<Assembly: AllowPartiallyTrustedCallers()>

Set so that it can be called from locations which aren't fully trusted.

2) Our Usercontrol now, rather than trying to directly access the
Filesystem on the clients machine, creates an instance of the Type we
added to the GAC.

3) The new type is then used to read from the Filesystem (as it is
trusted because it is in the GAC).

However this second approach doesn't work. We can create an instance of
the type stored in the GAC, but attmpting to call the method within it
throws the same exception as before (request for permission
System.Security.Permissions.FileIOPermission denied).

I can't see why the second approach doesn't work though, any pointers
much appreciated. Code is in VB.net.

Jul 21 '05 #1
0 1105

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

Similar topics

14
by: RL Stevenson | last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100 or more controls bound to 5-10 tables in a database? Pasting all those controls, datasets, data adapters directly onto...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
4
by: Andrew | last post by:
Hey all, I would like to preface my question by stating I am still learning ASP.net and while I am confident in the basics and foundation, the more advanced stuff is still a challenge. Ok....
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
11
by: Crirus | last post by:
I need to derive the Windows.Forms.Control 2 times so I design a class like this Public Class BMControl Inherits System.Windows.Forms.UserControl Public Class MapControl Inherits BMControl
0
by: jamie.fraser | last post by:
We are trying to create a system where our users will navigate to a web page, and this web page will reference a Windows User Control which is then downloaded and run on the users machine. The...
17
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the...
2
by: Budhi Saputra Prasetya | last post by:
Hi, I managed to create a Windows Form Control and put it on my ASP .NET page. I have done the suggestion that is provided by modifying the security settings. From the stack trace, I would...
0
by: Budhi Saputra Prasetya | last post by:
Hi, I still have the same problem with embedding Windows Control. I'll just requote what I posted last time: I managed to create a Windows Form Control and put it on my ASP .NET page. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.