473,372 Members | 825 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,372 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 1102

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?

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.