Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / February 2007

Tip: Looking for answers? Try searching our database.

Accessing files on a network share

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lasabo - 28 Feb 2007 08:47 GMT
Hi,

I'm Writing a smart-client application, when running both server and client
on the same machine everthing works fine, but running the client on a
different machine get me into trouble. I have written a very simple
application just to figure out what goes wrong. The only ting it does is
start up the gui and read a file located inn the same directory as the
server. The server is a windows 2003, and .net framework 2.0.

The error I get:
Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

What I've tried to do is give the server a strong name, add it to the .net
configuration with full trust and add the .exe-file to c:\windows\assemby
folder. The public key of that folder matches that of sn -T <server.exe>.
Still I'm getting the same errormessage.

y.s.
lars arve
oscar.acostamontesde@googlemail.com - 28 Feb 2007 11:12 GMT
> Hi,
>
[quoted text clipped - 17 lines]
> y.s.
> lars arve

And why you dont send the file to client when they connect to server,
over http, remoting, tcp? I know is not what you are doing now, but is
a workaround..
Best regards
lasabo - 28 Feb 2007 14:12 GMT
> And why you dont send the file to client when they connect to server,
> over http, remoting, tcp? I know is not what you are doing now, but is
> a workaround..
> Best regards

Hi,

Yes, this would be a workaround, but I need to set up the right permissions,
my next task is to read from a webserver, and this also failes, with the
error:

Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

y.s.
lars arve
Kevin Spencer - 28 Feb 2007 12:51 GMT
The user account under which the application runs must have permission to
read files in the folder it is reading the file from. This would be a domain
account, unless you're using a workgroup, in which case it must be an
account with the same name and password as an account on the target machine
with the necessary permissions. This can also be done via impersonation.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

I had the same problem once. Fixed it using the same solution.

> Hi,
>
[quoted text clipped - 18 lines]
> y.s.
> lars arve
lasabo - 28 Feb 2007 14:33 GMT
Hi,

It turned out I've been misstaken on where to set the full trust, I've been
adjusting the server, while it was on the client the security had to be set.
I ran a etherealtrace and it turned out with no activity towards the server
as the error arised. Everything works as a charm now :) Thanks to everybody
for great input :)

y.s.
lars arve

> The user account under which the application runs must have permission to
> read files in the folder it is reading the file from. This would be a domain
[quoted text clipped - 24 lines]
> > y.s.
> > lars arve

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.