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

Permission Issue

I am trying to test some aspx pages on my local system. The code requires a
"db" directory off the root of the web site. In my Inetpub/myproj I added
the directory but cannot figure out how to give the application authority to
write into that directory. I get the error:

System.UnauthorizedAccessException: Access to the path
"c:\inetpub\wwwroot\OfficeApp\db\judgedata.csv " is denied.

In the error information it says to grant ASP.NET write access to a file,
right-click the file in Explorer, choose "Properties" and select the
Security tab. There is no "Security" tab. I must be missing something here?
How do I set that directory to allow asp.net to write to it?

Wayne
Nov 19 '05 #1
9 927
WJ

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Security tab. There is no "Security" tab. I must be missing something
here?


Uncheck the "Use simple file sharing" (bottom option) in the "View" tab of
the "Folder Options" dialog.

John
Nov 19 '05 #2
Thanks for the suggestion but after doing that I still get the same error?

Wayne

"WJ" <Jo*******@HotMail.Com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Security tab. There is no "Security" tab. I must be missing something
here?


Uncheck the "Use simple file sharing" (bottom option) in the "View" tab of
the "Folder Options" dialog.

John

Nov 19 '05 #3
WJ

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Thanks for the suggestion but after doing that I still get the same error?


This only lets you use the "Security" tab on the Windows Explorer. To fix
the error (access denied), you must grant r/w access to the account that
runs your website to the database file where your data resides.

John
Nov 19 '05 #4
John;

Thanks for the clarification. I did that and gave ASP.NET full control of
that directory but it still gives the same error when the code attempts to
create a file in that directory?

Wayne

"WJ" <Jo*******@HotMail.Com> wrote in message
news:Og**************@TK2MSFTNGP15.phx.gbl...

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Thanks for the suggestion but after doing that I still get the same
error?


This only lets you use the "Security" tab on the Windows Explorer. To fix
the error (access denied), you must grant r/w access to the account that
runs your website to the database file where your data resides.

John

Nov 19 '05 #5
WJ

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John;

Thanks for the clarification. I did that and gave ASP.NET full control of
that directory but it still gives the same error when the code attempts to
create a file in that directory?


Check your local website (IIS/MMC) to find out what account is configured
for the web site, then grant FC to that account. Example: If you allow
"Anonymous" access to the web site, then the User Account box likely shows
"IUSR_YourPCName". Try that see what happens.

John
Nov 19 '05 #6
WJ

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John;

Thanks for the clarification. I did that and gave ASP.NET full control of
that directory but it still gives the same error when the code attempts to
create a file in that directory?


Check your local website (IIS/MMC) to find out what account is configured
for the web site, then grant FC to that account. Example: If you allow
"Anonymous" access to the web site, then the User Account box likely shows
"IUSR_YourPCName". Try that see what happens.

John
Nov 19 '05 #7
John;

Thanks for the continued help. I am not sure how to determine which account
is configured for the web site (I thought ASP.NET was always used by VSNET
projects?) I went to Control Panel/Administrative Tools/IIS and Properties
but I don't see how to determine the default user for a web site?

Wayne

"WJ" <Jo*******@HotMail.Com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John;

Thanks for the clarification. I did that and gave ASP.NET full control of
that directory but it still gives the same error when the code attempts
to create a file in that directory?


Check your local website (IIS/MMC) to find out what account is configured
for the web site, then grant FC to that account. Example: If you allow
"Anonymous" access to the web site, then the User Account box likely shows
"IUSR_YourPCName". Try that see what happens.

John

Nov 19 '05 #8
Hi, Wayne.

This all boils down to giving the account ASP.NET is running
under, *whichever account that is* the necessary permissions.

If you have doubts about which account ASP.NET is running under,
just run this short script. It will identify ASP.NET's current identity.

identity.aspx
-------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
--------

Hope this helps...

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uA**************@TK2MSFTNGP12.phx.gbl...
John;

Thanks for the continued help. I am not sure how to determine which account is
configured for the web site (I thought ASP.NET was always used by VSNET projects?) I
went to Control Panel/Administrative Tools/IIS and Properties but I don't see how to
determine the default user for a web site?

Wayne

"WJ" <Jo*******@HotMail.Com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John;

Thanks for the clarification. I did that and gave ASP.NET full control of that
directory but it still gives the same error when the code attempts to create a file in
that directory?


Check your local website (IIS/MMC) to find out what account is configured for the web
site, then grant FC to that account. Example: If you allow "Anonymous" access to the
web site, then the User Account box likely shows "IUSR_YourPCName". Try that see what
happens.

John


Nov 19 '05 #9
Juan;

Thanks for that page. That is a handy little tool to have. It revealed that
the account used is "myMachine/ASPNET" (no ".") I gave that FC but it still
gives me the erron on my local machine - it works fine on my real web site.

Wayne

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:eV**************@TK2MSFTNGP10.phx.gbl...
Hi, Wayne.

This all boils down to giving the account ASP.NET is running
under, *whichever account that is* the necessary permissions.

If you have doubts about which account ASP.NET is running under,
just run this short script. It will identify ASP.NET's current identity.

identity.aspx
-------------
<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
--------

Hope this helps...

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:uA**************@TK2MSFTNGP12.phx.gbl...
John;

Thanks for the continued help. I am not sure how to determine which
account is configured for the web site (I thought ASP.NET was always used
by VSNET projects?) I went to Control Panel/Administrative Tools/IIS and
Properties but I don't see how to determine the default user for a web
site?

Wayne

"WJ" <Jo*******@HotMail.Com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...

"Wayne Wengert" <wa***********@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John;

Thanks for the clarification. I did that and gave ASP.NET full control
of that directory but it still gives the same error when the code
attempts to create a file in that directory?
Check your local website (IIS/MMC) to find out what account is
configured for the web site, then grant FC to that account. Example: If
you allow "Anonymous" access to the web site, then the User Account box
likely shows "IUSR_YourPCName". Try that see what happens.

John



Nov 19 '05 #10

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

Similar topics

11
by: Wayne Wengert | last post by:
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want to display a list of all tables in an Access database. I want to put that list of table names in a listbox so the user...
3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
4
by: jtfaulk | last post by:
I've created an application that I need to launch from a web browser. So I tried these steps: 1. on the install I modified the PATH environmental variable to include the path on the application...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
1
by: Mr.KisS | last post by:
Hi, In my aspx page i use a stocked procedure and in this procedure, there is a SELECT query. And whene the aspx page calls the procedure i get this exception : ...
7
by: Mike L. | last post by:
Hi, I got this 'EXECUTE permission denied on object <mySproc>' error message everytime I try executing my SQL server Sproc. What's this and how to fix this err? many thnaks in advance, mike
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
4
by: Richard MSL | last post by:
I have a simple application in C++ that uses a dll I wrote in C#. It works fine when I run it on C: on my local PC, but when I attempt to run it on the i: drive on my LAN, it gets a loading...
1
by: doctorhardik | last post by:
other interesting thing i observe during my work which i describe below: i am using dotproject2.0.4 on fc3. it is working fine. but i want to generate pdf file report during this time i face...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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...

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.