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

Where is the built-in ASP.NET account?

I've reinstalled my Windows 2003 server and VS2003 without much luck on
finding this ASP.NET account. Using IIS 6.0.

My c# application requires access to read a file (C:\\Test.jpg) from the
file system.

Got the following error:

***********
General access denied error

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: General access denied
error

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 IIS6) 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
appopriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.

*******

I tried impersonation by putting the following in the web.config file of my
application: the user has administrative privileges

<identity impersonate="true" userName="username" password="password" />

That didn't work. Kept receiving the same above error.

I then found the following to try to recreate the ASP.NET account using the
run command:

%systemroot%\Microsoft.NET\Framework\v1.1.4322\asp net_regiis.exe /i

that didn't work either

Could anyone help me with this? Is there a solution on finding this ASP.NET
account?

I'm using II 6.0

Any suggestions would be appreciated.

Thanks.

bebop

Nov 19 '05 #1
3 1709
re:
Could anyone help me with this?
Is there a solution on finding this ASP.NET account?
Right click the folder for which you want to
grant permissions for, using Windows Explorer.

Select "Properties", and then click the "Security" tab.
Click "Add", and then click "Advanced".

Click "Find Now".
Scroll down to the "NETWORK SERVICE" account
( Careful. There's also a "NETWORK" account. Don't pick that one.)

Double-click the "NETWORK SERVICE" account to
add it to the account list allowed access to that folder.

Assign the desired permissions by checking "Allow" or "Deny".
OK your way out of there.

The default account for ASP.NET under IIS 6.0 is "NETWORK SERVICE".

If you're impersonating a different account, select that one instead.


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

"cwbp17" <cw****@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com... I've reinstalled my Windows 2003 server and VS2003 without much luck on
finding this ASP.NET account. Using IIS 6.0.

My c# application requires access to read a file (C:\\Test.jpg) from the
file system.

Got the following error:

***********
General access denied error

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: General access denied
error

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 IIS6) 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
appopriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.

*******

I tried impersonation by putting the following in the web.config file of my
application: the user has administrative privileges

<identity impersonate="true" userName="username" password="password" />

That didn't work. Kept receiving the same above error.

I then found the following to try to recreate the ASP.NET account using the
run command:

%systemroot%\Microsoft.NET\Framework\v1.1.4322\asp net_regiis.exe /i

that didn't work either

Could anyone help me with this? Is there a solution on finding this ASP.NET
account?

I'm using II 6.0

Any suggestions would be appreciated.

Thanks.

bebop

Nov 19 '05 #2
So, this built-in ASP.NET account doesn't exist in Windows Server 2003 using
IIS 6.0?

I tried your suggestion, gave Network Service account full control of the
folder and still receive the same error message.

Should I reinstall and see if that helps?

bebop

"Juan T. Llibre" wrote:
re:
Could anyone help me with this?
Is there a solution on finding this ASP.NET account?


Right click the folder for which you want to
grant permissions for, using Windows Explorer.

Select "Properties", and then click the "Security" tab.
Click "Add", and then click "Advanced".

Click "Find Now".
Scroll down to the "NETWORK SERVICE" account
( Careful. There's also a "NETWORK" account. Don't pick that one.)

Double-click the "NETWORK SERVICE" account to
add it to the account list allowed access to that folder.

Assign the desired permissions by checking "Allow" or "Deny".
OK your way out of there.

The default account for ASP.NET under IIS 6.0 is "NETWORK SERVICE".

If you're impersonating a different account, select that one instead.


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

"cwbp17" <cw****@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
I've reinstalled my Windows 2003 server and VS2003 without much luck on
finding this ASP.NET account. Using IIS 6.0.

My c# application requires access to read a file (C:\\Test.jpg) from the
file system.

Got the following error:

***********
General access denied error

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: General access denied
error

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 IIS6) 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
appopriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.

*******

I tried impersonation by putting the following in the web.config file of my
application: the user has administrative privileges

<identity impersonate="true" userName="username" password="password" />

That didn't work. Kept receiving the same above error.

I then found the following to try to recreate the ASP.NET account using the
run command:

%systemroot%\Microsoft.NET\Framework\v1.1.4322\asp net_regiis.exe /i

that didn't work either

Could anyone help me with this? Is there a solution on finding this ASP.NET
account?

I'm using II 6.0

Any suggestions would be appreciated.

Thanks.

bebop


Nov 19 '05 #3
re:
So, this built-in ASP.NET account doesn't exist
in Windows Server 2003 using IIS 6.0?
Yes, it does exist.

See the table at the bottom of :
http://www.bluevisionsoftware.com/We...=AspNetAccount
to understand the different results when using impersonation or not,
and to get specifics on how to setup a custom ASP.NET account.

Apparently, some of the changes you already made are causing
your server to run ASP.NET under a different account.

Also, see : How To Create a Custom Account to Run ASP.NET
http://msdn.microsoft.com/library/de...l/secmod15.asp

Here's a short file you can use to determine
which account ASP.NET is running as :
-----------------
<%@ 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>
-------------

Just run it, and it will tell you the name of the account you need
to give read permissions to, so it's allowed read C:\\Test.jpg.


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

"cwbp17" <cw****@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com... So, this built-in ASP.NET account doesn't exist in Windows Server 2003 using
IIS 6.0?

I tried your suggestion, gave Network Service account full control of the
folder and still receive the same error message.

Should I reinstall and see if that helps?

bebop

"Juan T. Llibre" wrote:
re:
> Could anyone help me with this?
> Is there a solution on finding this ASP.NET account?


Right click the folder for which you want to
grant permissions for, using Windows Explorer.

Select "Properties", and then click the "Security" tab.
Click "Add", and then click "Advanced".

Click "Find Now".
Scroll down to the "NETWORK SERVICE" account
( Careful. There's also a "NETWORK" account. Don't pick that one.)

Double-click the "NETWORK SERVICE" account to
add it to the account list allowed access to that folder.

Assign the desired permissions by checking "Allow" or "Deny".
OK your way out of there.

The default account for ASP.NET under IIS 6.0 is "NETWORK SERVICE".

If you're impersonating a different account, select that one instead.


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

"cwbp17" <cw****@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
> I've reinstalled my Windows 2003 server and VS2003 without much luck on
> finding this ASP.NET account. Using IIS 6.0.
>
> My c# application requires access to read a file (C:\\Test.jpg) from the
> file system.
>
> Got the following error:
>
> ***********
> General access denied error
>
> 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: General access denied
> error
>
> 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 IIS6) 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
> appopriate user or group. Highlight the ASP.NET account, and check the boxes
> for the desired access.
>
> *******
>
> I tried impersonation by putting the following in the web.config file of my
> application: the user has administrative privileges
>
> <identity impersonate="true" userName="username" password="password" />
>
> That didn't work. Kept receiving the same above error.
>
> I then found the following to try to recreate the ASP.NET account using the
> run command:
>
> %systemroot%\Microsoft.NET\Framework\v1.1.4322\asp net_regiis.exe /i
>
> that didn't work either
>
> Could anyone help me with this? Is there a solution on finding this ASP.NET
> account?
>
> I'm using II 6.0
>
> Any suggestions would be appreciated.
>
> Thanks.
>
> bebop
>
>
>


Nov 19 '05 #4

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

Similar topics

1
by: Alex Elbert | last post by:
Hi I have built dynamic HTMLTable. Now I want to attach it directly to the Email Body - it is already built, so why not to use a ready table. However, I cannot find the way of getting plain HTML...
2
by: R Camarda | last post by:
I used Enterpise manager to make a backup of a SQL Database. When I restored it on another machine, I did not have any of my indexes. I checked the backup wizard and I could not find any reference...
1
by: William | last post by:
Looking for a pre built dotnet corporate or small business website template.
14
by: joshsackett | last post by:
I have a WHERE clause that could be an "=" or a "LIKE" depending upon if the passed variable is populated or not. I would like to know the best way to write the WHERE clause to make it dynamically...
2
by: Matthew Crouch | last post by:
Sorry, more dumb newb questions. I've got part of a page that seems to be rendering just fine. It's built by: function writeTabPanel(){ var tpText = ''; tpText += '<div id="'; tpText +=...
6
by: reez | last post by:
Hi All Ok two questions for ya... 1. I am assuming that websites cannot be compiled into dll's...why would i want to do that? Basically i have a master file that i want to share with other...
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
1
by: Max2006 | last post by:
Hi, I foind that Vertigo built a sample web application built for Microsoft showcasing ASP.NET Ajax (http://www.vertigo.com/Lab.aspx) Can I download that application? Thanks, Max
3
by: drewj840 | last post by:
I built a Windows service that sweeps a set of folders every 60 seconds and puts the files into a SQL Server database. I am creating a second service that will delete this set of folders and recreate...
29
by: canabatz | last post by:
Hello , i got this code that works great , now i want to have it refresh every 4 seconds , where can i put the timer to do that? i realy need help!! thanx!! <script type="text/javascript">...
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: 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
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
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...
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.