473,396 Members | 1,777 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,396 software developers and data experts.

Acces files on remote server - problem

Hi,

on a fileserver I have several images en xml-files that I need to access.
In web.config I have this section
<appSettings>
<add Key="Remote" value="//000.000.000.000" />
</appSettings>
In my codebehind, there is this code
strRemote = ConfigurationManager.AppSettings["Remote"];
Without any problem I can browse, consult, read and open all files on my
remote server. But I cannot write to it. So no files can be updated...
this is the error I get
"unauthorizedaccesException"
"Access to the path '\\000.000.000.000\myFile.xml' is denied."

Yet I have added the correct rights to the server(ASP.NET machine account,
Guest Account for Internet acces - IUSR_myPc)
So there should be something else
but what

anyone?
Dec 7 '06 #1
3 2326
There is also a permission on the share itself... Have you checked this one
?

--
Patrice

"benoit" <be****@discussions.microsoft.coma écrit dans le message de news:
A3**********************************@microsoft.com...
Hi,

on a fileserver I have several images en xml-files that I need to access.
In web.config I have this section
<appSettings>
<add Key="Remote" value="//000.000.000.000" />
</appSettings>
In my codebehind, there is this code
strRemote = ConfigurationManager.AppSettings["Remote"];
Without any problem I can browse, consult, read and open all files on my
remote server. But I cannot write to it. So no files can be updated...
this is the error I get
"unauthorizedaccesException"
"Access to the path '\\000.000.000.000\myFile.xml' is denied."

Yet I have added the correct rights to the server(ASP.NET machine account,
Guest Account for Internet acces - IUSR_myPc)
So there should be something else
but what

anyone?


Dec 7 '06 #2
Is this is an existing file (in particular accessed before you try to
overwrite it ?). If yes try to see if creating a brand new file would work
(file used by IIS are AFAIK locked for a short period of time after their
use i.e. you might not be able to delete a file you just have displayed
through the web site)...

Double check also under which identity your web app is running to make sure
(are you using just anonymous authentication ?, also the default account is
not the same under IIS5/IIS6)...

Good luck.

--
Patrice

"benoit" <be****@discussions.microsoft.coma écrit dans le message de news:
E9**********************************@microsoft.com...
Yes I did..
I think i checked every possible access posibility and gave a lot of
rights
strange thing is that if i try this on my local machine, by using the IP
of
my computer it wil not work, but if I use "C:\mapping", then there is no
problem
"Patrice" wrote:
>There is also a permission on the share itself... Have you checked this
one
?

--
Patrice

"benoit" <be****@discussions.microsoft.coma écrit dans le message de
news:
A3**********************************@microsoft.com...
Hi,

on a fileserver I have several images en xml-files that I need to
access.
In web.config I have this section
<appSettings>
<add Key="Remote" value="//000.000.000.000" />
</appSettings>
In my codebehind, there is this code
strRemote = ConfigurationManager.AppSettings["Remote"];
Without any problem I can browse, consult, read and open all files on
my
remote server. But I cannot write to it. So no files can be updated...
this is the error I get
"unauthorizedaccesException"
"Access to the path '\\000.000.000.000\myFile.xml' is denied."

Yet I have added the correct rights to the server(ASP.NET machine
account,
Guest Account for Internet acces - IUSR_myPc)
So there should be something else
but what

anyone?




Dec 7 '06 #3
Yeah, the builtin ASPNET account won't have access to anything out on
your network. If you want to access remote files, you'll need to put
an Identity Imersonate tag into your web.config, and run the whole
application as a specified user. It's not a very elegant solution, and
often causes as many headaches as it solves (such as encouraging you to
put the username/password in cleartext in the web.config), but MS still
hasn't offered a way around it. It's been a problem from day one.

Good luck!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

---
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/

Dec 7 '06 #4

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

Similar topics

7
by: Wardeaux | last post by:
Hey all, I'm hitting a wall... We have many daily reports generated on another server, need to present list of available files and allow user to download desired files from aspx page... any...
0
by: GrantMagic | last post by:
Hi I am currently trying to use a test machine to access web site files on a remote machine. Once set up IIS with the files pointing to a share on the remote machine, i try view the default...
3
by: frederik | last post by:
Hi The website have to show subdirectories on a network drive. I use the following code: string directories; directories=Directory.GetDirectories(_Path); ....
1
by: bruce.1 | last post by:
I'm trying to figure a way for a remote user -- using ASP.NET -- to share files on a local office LAN. The remote user would go to an ASP.NET website (on the LAN), mark the files they want, and...
1
by: Roger Hembury | last post by:
Hi All, Hope you can help / point me in the right direction with a little problem. I have a VB6 created active X dll which is downloaded to the client using <object> </object> so that I can...
2
by: AAJ | last post by:
Hi all I have a few questions about file locations with VS2005, localhost WidowsXP and remotehost Server2003, and I wonder if anyone can help me get started 1) If I build a web site on my...
3
by: jason | last post by:
I've been playing around with new (for 2.0) membershp functionality. I was able to build a simple login form that secures a directory on a project I built locally on my development desktop. ...
0
by: cxian | last post by:
Hi all, I am quite a beginner in PHP and happens that I have a problem with accessing remote files that gets me frustrated for two weeks now. This site I have running on PHP provide to download video...
0
by: cxian | last post by:
Hi again! I am going really desperate on this problem that I have in downloads. Please somebody who have a better idea to solve things out, please help. Just like I mentioned. I have a site that...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.