473,549 Members | 2,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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...defin etly 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 "\\remotedirect ory\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.Unauthor izedAccessExcep tion: Access to the
path "\\remotedirect ory\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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user
(typically IUSR_MACHINENAM E) 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.GetF iles("\\" & Station & "\c$\SQC\", "myimage.jp g")
Line 46:
Line 47: If Not Files.Length > 0 Then
Source File: C:\Inetpub\wwwr oot\WebApplicat ionTest\QueueCa m.aspx.vb
Line: 45

Stack Trace:
[UnauthorizedAcc essException: Access to the path
"\\remotedirect ory\c$\SQC\" is denied.]
System.IO.__Err or.WinIOError(I nt32 errorCode, String str) +393
System.IO.Direc tory.InternalGe tFileDirectoryN ames(String fullPath,
String userPath, Boolean file) +229
System.IO.Direc tory.InternalGe tFiles(String path, String userPath,
String searchPattern) +24
System.IO.Direc tory.GetFiles(S tring path, String searchPattern) +477
WebApplicationT est.QueueCam.Pa ge_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwr oot\WebApplicat ionTest\QueueCa m.aspx.vb:45
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +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 1212

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

Similar topics

10
3586
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 password protect the directory, so that whenever a page within the admin subfolder is accessed for the first time, an authentication window pops up...
7
2381
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 this folder as virtual directory in IIS. I know in ASP how to do it. Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root")...
2
4895
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 linked to Safe mode being set to On since my site is using shared server hosting and probably insufficient/incorrect Unix file permission. Below is...
2
975
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 be helpful if i get the steps to do it . expecting the reply soon
3
11277
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 Active Directory. for that i've added one linked server to connect to the active directory. and then query like this: adding linked server:
1
4458
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 of the Everyone user to Deny, execute my process, and restore the permission to Allow. There is the NET SHARE command, but it's to create or...
1
3460
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 System.IO.Directory.Exists(My.Application.Info.DirectoryPath & "\NewTestFolder") Then
5
2169
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 be writable for everybody). However, as far as I understand, this will allow everybody to put in the directory whatever files. I would like that...
0
6838
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 written in Perl just for testing. I believe I need to find the correct <Directory> entry or some other Directive in Apache to make this work, but I've...
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7723
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
7817
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...
0
6051
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5375
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
5092
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
3504
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
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
771
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.