473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help - Writing Web Control to Access the Local FileSystem

Hi,

We have a need to write a web control that access the local filesystem
and creates a set of hyperlinks based on the files contained within a
directory (this will then be used in a sharepoint web part).

Don't know a lot about this stuff, but have written an ActiveX control
that, when used on a Windows form, works correctly, however when used
on a web application gives the following error:

Request for the permission of type
'System.Securit y.Permissions.F ileIOPermission , mscorlib,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= xxxxxxxxxx' failed.

Can anyone explain what is happening here, and how I resolve this
issue?

Not knowing alot about this, I am not sure if this approach is the best
one. If anyone has ideas about other (better) ways that we could
achieve this, please let me know.

Many Thanks,

Nigel

Jan 4 '07 #1
1 1786
welcome to the sandbox.

I'm not a web-OCX guru, but I suggest that this could cause huge
security issues, allowing (depending on the features exposed) random
pages (e.g. intranet?) to exploit your control to browse any user's
file system. I suggest you take a look at:
http://msdn.microsoft.com/msdnmag/issues/02/06/rich/ (search for the
phrase "File system access is the big one").

There may be some solutions involving signing the code with a a valid
(chained) certificate and assigning the required permissions (not
ideal, as not very site-specific), or possibly trusting the site
(worse) - or maybe some caspol hacks...

No simple answer for you, though

Marc
Jan 4 '07 #2

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

Similar topics

4
3256
by: Ian U | last post by:
Hello, I'm looking for a "Set Up Your Permissions 101" in response to the above error, which I get on a local IIS5.1 installation, when I'm trying to view Live Data / preview an ASP file from within Dreamweaver MX. I get the above error, which is 'dealt with' in http://support.microsoft.com/default.aspx?scid=kb;en-us;174943 , but I'm not...
0
1203
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer to a remote computer. do i have to copy them from the local computer to the remote computer then delete them fromt the local computer after undo-ing...
8
1438
by: Rose Chambers | last post by:
How can I insert preformatted text from a file on the web server into a table's cell? And then swapped the text in response to an onClick event. Something like this......... <table> <tr><td> <img name="swap_grph" src="http://www.mydomain.com/graphs/piechart1.jpg"> </tr></td><tr><td>
3
1994
by: StupidScript | last post by:
Hi, I want to deliver subscripted content to users on CD. They then place the CD into their CD drive and navigate to my site. Once logged in, I want to be able to draw content from the CD and incorporate it with content from my server. I understand that access to the user's filesystem is not normal or even allowed by default. However I...
8
5459
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
2
1342
by: Joergen Bech | last post by:
Trying to write an xml file from within a Session. Works fine if I do it in the Application_Start event of Global.asax, but not in the Page_Load event of an aspx page. If I give "Everyone" write permissions to the folder/file, everything works fine (on my local development machine), but this is not an option on the production server, which...
1
3698
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am...
0
1492
by: Carlos Lozano | last post by:
Hi, I will appreciate any insights to set the right permissions to a Windows Forms Control that is embedded in an html document. The control will be downloaded by the html doc to the local system to do its job. It requires file system and registry access rights (read/write). One of the problems is that restricted users will open the html...
0
1403
by: Freddie | last post by:
this is surely the wrong group, but you guys have been so helpful in the past ... i want to use the new forms authentication in asp.net 2.0 with sql server 2005 dev edition so i created a login with administrator priviles in the DBMS and gave all filesystem permissions to the aspnet account(this is Win 2k Pro, also tried another account...
0
7924
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
8125
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...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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...
1
5513
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
5219
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...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1221
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.