469,898 Members | 1,581 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

UnauthorizedAccessException upon access to an ASP>NET web service

I am developing an ASP.NET web service application. It works fine on my
WinXP Prof development machine. But when I send it to a Windows Server 2003
system I get the following error (attached below).

I suppose I have some kind of permissions issue on the server? What
recommendations can anyone propose?

Thanks,
-- Bruce

Server Error in '/firstWebSvs' Application.
--------------------------------------------------------------------------------

Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary
ASP.NET Files\firstwebsvs\41aa9288\50d8dfa7" 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
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" 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:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String path)
+632
System.IO.Directory.CreateDirectory(String path) +195
System.Web.Compilation.PreservedAssemblyEntry.DoFi rstTimeInit(HttpContext
context) +85
System.Web.Compilation.PreservedAssemblyEntry.Ensu reFirstTimeInit(HttpContext
context) +97
System.Web.Compilation.PreservedAssemblyEntry.GetP reservedAssemblyEntry(HttpContext
context, String virtualPath, Boolean fApplicationFile) +29
System.Web.UI.TemplateParser.GetParserCacheItemFro mPreservedCompilation()
+91
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApp licationType(String
inputFile, HttpContext context, ApplicationFileParser& parser) +168
System.Web.HttpApplicationFactory.CompileApplicati on(HttpContext context)
+43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +170
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +414


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573
Nov 19 '05 #1
4 2705
Hi Bruce,

Make sure you give that temp directory (Temporary ASP.NET Files) full access
for the Network Service or whatever account your Application Pool in IIS 6
runs under. Actually I think ASP.NET install sets up the NETWORK SERVICE
account automatically but not any others you might get assigned with an ISP
Web Site and custom Application Pool for your site.

Hope this helps,

+++ Rick ---
"Bruce" <br***@coding-r-us.com> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I am developing an ASP.NET web service application. It works fine on my
WinXP Prof development machine. But when I send it to a Windows Server 2003 system I get the following error (attached below).

I suppose I have some kind of permissions issue on the server? What
recommendations can anyone propose?

Thanks,
-- Bruce

Server Error in '/firstWebSvs' Application.
-------------------------------------------------------------------------- ------
Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary
ASP.NET Files\firstwebsvs\41aa9288\50d8dfa7" 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
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" 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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
System.IO.Directory.CreateDirectory(String path) +195
System.Web.Compilation.PreservedAssemblyEntry.DoFi rstTimeInit(HttpContext context) +85
System.Web.Compilation.PreservedAssemblyEntry.Ensu reFirstTimeInit(HttpContex
t context) +97
System.Web.Compilation.PreservedAssemblyEntry.GetP reservedAssemblyEntry(Http
Context context, String virtualPath, Boolean fApplicationFile) +29
System.Web.UI.TemplateParser.GetParserCacheItemFro mPreservedCompilation() +91
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApp licationType(String
inputFile, HttpContext context, ApplicationFileParser& parser) +168
System.Web.HttpApplicationFactory.CompileApplicati on(HttpContext context) +43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +170
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +414

-------------------------------------------------------------------------- ------ Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Nov 19 '05 #2
Rick,

Thanks.

Actually, this is not an ISP server, but rather a Windows Small Business
Server 2003 server here in my home office. Everything about the setup of
this server is pretty much default configuration. (ASP.NET 1.1, of course,
is simply installed on the server "out of the box.")

Would I normally need to do something special to enable a web service to run
on the server?

To install from the development workstation to the server, I simply used the
vs.net 2003 menu item, "copy project", to move a copy onto the server. As a
result, a new directory was created on the server within inetpub/wwwroot
called /firstWebSvs, which is the same name the directory had on my
development workstation.

Finally, could you explain what you mean by temp directory? ( So far, I
don't seem to use any directory that would be called a temp directory.)

Thanks,
-- Bruce

"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:ui****************@tk2msftngp13.phx.gbl...
Hi Bruce,

Make sure you give that temp directory (Temporary ASP.NET Files) full
access
for the Network Service or whatever account your Application Pool in IIS 6
runs under. Actually I think ASP.NET install sets up the NETWORK SERVICE
account automatically but not any others you might get assigned with an
ISP
Web Site and custom Application Pool for your site.

Hope this helps,

+++ Rick ---
"Bruce" <br***@coding-r-us.com> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I am developing an ASP.NET web service application. It works fine on my
WinXP Prof development machine. But when I send it to a Windows Server

2003
system I get the following error (attached below).

I suppose I have some kind of permissions issue on the server? What
recommendations can anyone propose?

Thanks,
-- Bruce

Server Error in '/firstWebSvs' Application.
--------------------------------------------------------------------------

------

Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary
ASP.NET Files\firstwebsvs\41aa9288\50d8dfa7" 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
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" 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:

An unhandled exception was generated during the execution of the current

web
request. Information regarding the origin and location of the exception

can
be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String

path)
+632
System.IO.Directory.CreateDirectory(String path) +195

System.Web.Compilation.PreservedAssemblyEntry.DoFi rstTimeInit(HttpContext
context) +85

System.Web.Compilation.PreservedAssemblyEntry.Ensu reFirstTimeInit(HttpContex
t
context) +97

System.Web.Compilation.PreservedAssemblyEntry.GetP reservedAssemblyEntry(Http
Context
context, String virtualPath, Boolean fApplicationFile) +29

System.Web.UI.TemplateParser.GetParserCacheItemFro mPreservedCompilation()
+91
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath()
+125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApp licationType(String
inputFile, HttpContext context, ApplicationFileParser& parser) +168
System.Web.HttpApplicationFactory.CompileApplicati on(HttpContext

context)
+43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +170
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)

+414


--------------------------------------------------------------------------

------
Version Information: Microsoft .NET Framework Version:1.1.4322.573;

ASP.NET
Version:1.1.4322.573


Nov 19 '05 #3
I was able to get the web service to work on the server via an article I
found by searching another newsgroup. I needed to give the Local Service
and Network Service accounts Full Control permission to the
%windir%\Microsoft.NET\Framework\v1.1.4322 directories. Is there any
downside (from a security standpoint) to granting these permissions?

Thanks,
Bruce

"Bruce" <br***@coding-r-us.com> wrote in message
news:Ou**************@TK2MSFTNGP14.phx.gbl...
Rick,

Thanks.

Actually, this is not an ISP server, but rather a Windows Small Business
Server 2003 server here in my home office. Everything about the setup of
this server is pretty much default configuration. (ASP.NET 1.1, of
course, is simply installed on the server "out of the box.")

Would I normally need to do something special to enable a web service to
run on the server?

To install from the development workstation to the server, I simply used
the vs.net 2003 menu item, "copy project", to move a copy onto the server.
As a result, a new directory was created on the server within
inetpub/wwwroot called /firstWebSvs, which is the same name the directory
had on my development workstation.

Finally, could you explain what you mean by temp directory? ( So far, I
don't seem to use any directory that would be called a temp directory.)

Thanks,
-- Bruce

"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:ui****************@tk2msftngp13.phx.gbl...
Hi Bruce,

Make sure you give that temp directory (Temporary ASP.NET Files) full
access
for the Network Service or whatever account your Application Pool in IIS
6
runs under. Actually I think ASP.NET install sets up the NETWORK SERVICE
account automatically but not any others you might get assigned with an
ISP
Web Site and custom Application Pool for your site.

Hope this helps,

+++ Rick ---
"Bruce" <br***@coding-r-us.com> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I am developing an ASP.NET web service application. It works fine on my
WinXP Prof development machine. But when I send it to a Windows Server

2003
system I get the following error (attached below).

I suppose I have some kind of permissions issue on the server? What
recommendations can anyone propose?

Thanks,
-- Bruce

Server Error in '/firstWebSvs' Application.
--------------------------------------------------------------------------

------

Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary
ASP.NET Files\firstwebsvs\41aa9288\50d8dfa7" 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
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" 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:

An unhandled exception was generated during the execution of the current

web
request. Information regarding the origin and location of the exception

can
be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET
Files\firstwebsvs\41aa9288\50d8dfa7" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String

path)
+632
System.IO.Directory.CreateDirectory(String path) +195

System.Web.Compilation.PreservedAssemblyEntry.DoFi rstTimeInit(HttpContext
context) +85

System.Web.Compilation.PreservedAssemblyEntry.Ensu reFirstTimeInit(HttpContex
t
context) +97

System.Web.Compilation.PreservedAssemblyEntry.GetP reservedAssemblyEntry(Http
Context
context, String virtualPath, Boolean fApplicationFile) +29

System.Web.UI.TemplateParser.GetParserCacheItemFro mPreservedCompilation()
+91
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath()
+125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.ApplicationFileParser.GetCompiledApp licationType(String
inputFile, HttpContext context, ApplicationFileParser& parser) +168
System.Web.HttpApplicationFactory.CompileApplicati on(HttpContext

context)
+43
System.Web.HttpApplicationFactory.Init(HttpContext context) +485
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +170
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)

+414


--------------------------------------------------------------------------

------
Version Information: Microsoft .NET Framework Version:1.1.4322.573;

ASP.NET
Version:1.1.4322.573



Nov 19 '05 #4
Bruce wrote:
I suppose I have some kind of permissions issue on the server?
What recommendations can anyone propose?


I found these instructions very thorough...
http://msdn.microsoft.com/library/de...l/secmod15.asp
Specifically .NET Accounts and what they should/shouldn't have access
to.
Walks you through step by step on what permissions to assign to what
folders.

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ben Turner | last post: by
3 posts views Thread by Hai Nguyen | last post: by
3 posts views Thread by Ben | last post: by
1 post views Thread by dejavue82 | last post: by
reply views Thread by FxM M | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.