473,399 Members | 2,858 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,399 software developers and data experts.

Directory Permission Grumbles!

I have an ASP.net application which needs to retreive images from
multiple remote machines. It is reterieveing images generated by a web
cam service on those machines. All of these machines, including the
development machine are running on the same windows user account. On
the development machine, the app works great.

The other client machines run into directory permission problems when
attemptiong to browse the directory the images are located. When the
this happens, the client is prompted for the username and password of
the development machine (they are the same account...definetly do not
want this prompt)??? but even if they provide the correct username and
password an unauthorized acces exception is encountered:

---------------------------------------------------------------
Access to the path "\\remotedirectory\c$\SQC\" is denied.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the
path "\\remotedirectory\c$\SQC\" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS
5 or Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user
(typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in
Explorer, choose "Properties" and select the Security tab. Click "Add"
to add the appropriate user or group. Highlight the ASP.NET account,
and check the boxes for the desired access.

Source Error:
Line 45: Dim Files() As String =
StationDir.GetFiles("\\" & Station & "\c$\SQC\", "myimage.jpg")
Line 46:
Line 47: If Not Files.Length > 0 Then
Source File: C:\Inetpub\wwwroot\WebApplicationTest\QueueCam.asp x.vb
Line: 45

Stack Trace:
[UnauthorizedAccessException: Access to the path
"\\remotedirectory\c$\SQC\" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalGetFileDirectoryNames( String fullPath,
String userPath, Boolean file) +229
System.IO.Directory.InternalGetFiles(String path, String userPath,
String searchPattern) +24
System.IO.Directory.GetFiles(String path, String searchPattern) +477
WebApplicationTest.QueueCam.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\WebApplicationTest\QueueCam.asp x.vb:45
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
-------------------------------------------------------------

The error message is quite informative...I have tried impersonation set
to true and false, I have tried granting the ASP.NET user permission to
the requested directory and file. But still the same security problem
on client machines only. Does someone have any info they could share on
this or a resource to point me to? Why is it asking for a username and
password to the web server? Thanks in advance for your time!

-Jeremy

Nov 19 '05 #1
0 1206

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

Similar topics

10
by: See Sharp | last post by:
Hello all, I have a set of admin pages which are put in a subfolder called admin inside my application folder. I want to limit access to these admin pages. How can I do this? In Linux, I can...
7
by: Jaydeep | last post by:
Hi, Anybody knows how to create virtual directory programmatically under root directory ofcourse from code-behind. I am developing web-based application where I need to create a folder and making...
2
by: ykgoh | last post by:
Hi. I've a problem of being able to create and remove a directory but unable to write a file inside the created directory for some strange reason. I suspect that this problem could be vaguely...
2
by: anand | last post by:
When create a new directory on a remote machine it works when impersonate="true" credential is given . Is there any other method that a proper access can be given to create a directory . iT would...
3
by: Lucky | last post by:
Hi guys, after long long time. i'm back again with another problem. this time i think the problem is very very interesting and i really need you help on this. i'm trying to connect to the...
1
by: Jerome | last post by:
Hi everybody, I need to remove access to a shared directory before to execute a process on the directory. And put back the access on it after the execution. So I wanted to set the permission...
1
by: Matt F | last post by:
I need to create a folder in code, and also set sharing to being shared to everyone with full control (or some such variation of security) What I'm doing now is: If Not...
5
by: Kurda Yon | last post by:
I want to create a publicly accessible php page which will generate images (with the GD library) and store them in some directory. For this I have to change the permission of directory (it has to...
0
by: phil469 | last post by:
I'm having an issue when trying to read a file in a user's homedir from a cgi script. I have a virtual host section in my httpd.conf file which I'll include. The cgi script is a very basic script...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.