By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,719 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,719 IT Pros & Developers. It's quick & easy.

Unable to Open a new asp.net web service

P: n/a

I am doing development work on an asp.net app and a web service on a Win XP
Pro SP2 development workstation, using vs.net 2003. For reasons that I
wont try to explain here, I recently moved the application files from
/inetpub/wwwrooot to a directory within "my documents", and I changed the
home directory within IIS accordingly.

However, now when I try to open a new Web Service project in vs.net, I get a
dialog box with this error: "Microsoft Development Environment, The Web
server reported the following error when attempting to create or open the
Web project located at the following URL: http://localhost/test/WebService1.
"HTTP/1.1 500 Internal Server Error".

From Googling newsgroups, I see that one likely solution would be to grant
the ASPNET process access rights to the target directory (read, list folder
contents, r&e). I tried that, but no luck. Another article described the
need to grant these rights sequentially to each level of the directory from
my target all the way up to c:\. I tried that, but no luck.

I also noticed that existing asp.net pages that worked fine in their old
locations in /inetput/wwwroot do not work in their new locations, even after
going into IIS and creating new "applications" for them. When I try to load
one of those asp.net pages, I get an error message in the browser which I
cut-and-pasted below.

What could be the cause and solution?

Thanks, Bruce
-------------------------------

Server Error in '/' Application.

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

Server cannot access application directory 'C:\Documents and
Settings\bruce\My Documents\HomePage\Inetpub\wwwroot\'. The directory does
not exist or is not accessible because of security settings.
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.Web.HttpException: Server cannot access
application directory 'C:\Documents and Settings\bruce\My
Documents\HomePage\Inetpub\wwwroot\'. The directory does not exist or is not
accessible because of security settings.

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:

[HttpException (0x80004005): Server cannot access application directory
'C:\Documents and Settings\bruce\My Documents\HomePage\Inetpub\wwwroot\'.
The directory does not exist or is not accessible because of security
settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +263

[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +983
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Nov 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi Bruce,

Thanks for your posting. I've also noticed and replied you in another
thread named:

"How to open an asp.net project in vs.net when no .sln is available"

After reading your this thread, I think the problem is much more complex
than I've expected earlier. First, as for moving IIS site's home directory
to a certain dir under MyDocument folder, this is really a dangerous action
which make me feel very nervous. This will cause many problems , such as :

1. the folders under document settings are far from qualify for being used
as web site's home dir, most accounts won't have the suffiecient
permissions to access them. And ASP.NET will need access permissions from
the root of site to the app's dir or sub dirs to do some monitoring works

2. Since the MyDocument folder is under the per user(account) available
location, when different users logon, they'll even be unable to access
them.

So I strongly recommend that you choose some other public folders to be
your site's HOME DIR. Choose another ordinary folder and the following
article maybe helpful:

HOW TO: Use File Share Mode for a Share Other Than the Default wwwroot$
Share
http://support.microsoft.com/default...b;en-us;320265

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2

P: n/a
The problem is the security on the files in the My Documents folder. The
ASPNET account doesn't have access to the files so ASP.NET won't be able
to read them. Put your files elsewhere or change the security on the file
to allow the ASP.NET account to read them.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I am doing development work on an asp.net app and a web service on a
Win XP Pro SP2 development workstation, using vs.net 2003. For
reasons that I wont try to explain here, I recently moved the
application files from /inetpub/wwwrooot to a directory within "my
documents", and I changed the home directory within IIS accordingly.

However, now when I try to open a new Web Service project in vs.net, I
get a dialog box with this error: "Microsoft Development Environment,
The Web server reported the following error when attempting to create
or open the Web project located at the following URL:
http://localhost/test/WebService1. "HTTP/1.1 500 Internal Server
Error".

From Googling newsgroups, I see that one likely solution would be to
grant the ASPNET process access rights to the target directory (read,
list folder contents, r&e). I tried that, but no luck. Another
article described the need to grant these rights sequentially to each
level of the directory from my target all the way up to c:\. I tried
that, but no luck.

I also noticed that existing asp.net pages that worked fine in their
old locations in /inetput/wwwroot do not work in their new locations,
even after going into IIS and creating new "applications" for them.
When I try to load one of those asp.net pages, I get an error message
in the browser which I cut-and-pasted below.

What could be the cause and solution?

Thanks, Bruce
-------------------------------
Server Error in '/' Application.

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

Server cannot access application directory 'C:\Documents and
Settings\bruce\My Documents\HomePage\Inetpub\wwwroot\'. The directory
does
not exist or is not accessible because of security settings.
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.Web.HttpException: Server cannot access
application directory 'C:\Documents and Settings\bruce\My
Documents\HomePage\Inetpub\wwwroot\'. The directory does not exist or
is not accessible because of security settings.

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:

[HttpException (0x80004005): Server cannot access application
directory
'C:\Documents and Settings\bruce\My
Documents\HomePage\Inetpub\wwwroot\'.
The directory does not exist or is not accessible because of security
settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +263
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +983
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)
+128
----------------------------------------------------------------------
---------- Version Information: Microsoft .NET Framework
Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


Nov 19 '05 #3

P: n/a
Steven,
Point taken. I'm just going to leave the files withing their default
location.
Thanks,
Bruce

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:$Z**************@TK2MSFTNGXA01.phx.gbl...
Hi Bruce,

Thanks for your posting. I've also noticed and replied you in another
thread named:

"How to open an asp.net project in vs.net when no .sln is available"

After reading your this thread, I think the problem is much more complex
than I've expected earlier. First, as for moving IIS site's home directory
to a certain dir under MyDocument folder, this is really a dangerous
action
which make me feel very nervous. This will cause many problems , such as
:

1. the folders under document settings are far from qualify for being
used
as web site's home dir, most accounts won't have the suffiecient
permissions to access them. And ASP.NET will need access permissions from
the root of site to the app's dir or sub dirs to do some monitoring works

2. Since the MyDocument folder is under the per user(account) available
location, when different users logon, they'll even be unable to access
them.

So I strongly recommend that you choose some other public folders to be
your site's HOME DIR. Choose another ordinary folder and the following
article maybe helpful:

HOW TO: Use File Share Mode for a Share Other Than the Default wwwroot$
Share
http://support.microsoft.com/default...b;en-us;320265

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

P: n/a
Steven,
Point taken. I'm just going to leave the files withing their default
location.
Thanks,
Bruce

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:$Z**************@TK2MSFTNGXA01.phx.gbl...
Hi Bruce,

Thanks for your posting. I've also noticed and replied you in another
thread named:

"How to open an asp.net project in vs.net when no .sln is available"

After reading your this thread, I think the problem is much more complex
than I've expected earlier. First, as for moving IIS site's home directory
to a certain dir under MyDocument folder, this is really a dangerous
action
which make me feel very nervous. This will cause many problems , such as
:

1. the folders under document settings are far from qualify for being
used
as web site's home dir, most accounts won't have the suffiecient
permissions to access them. And ASP.NET will need access permissions from
the root of site to the app's dir or sub dirs to do some monitoring works

2. Since the MyDocument folder is under the per user(account) available
location, when different users logon, they'll even be unable to access
them.

So I strongly recommend that you choose some other public folders to be
your site's HOME DIR. Choose another ordinary folder and the following
article maybe helpful:

HOW TO: Use File Share Mode for a Share Other Than the Default wwwroot$
Share
http://support.microsoft.com/default...b;en-us;320265

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #5

P: n/a
Thanks for your reply.

The default loation is ok. Also, if you have interesting, you can try
creating a new site on some other normal disk and test through the KB I
provided in the last message. That can also help us get a clearer view of
such problem.

Thanks,
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #6

P: n/a
Thanks for your reply.

The default loation is ok. Also, if you have interesting, you can try
creating a new site on some other normal disk and test through the KB I
provided in the last message. That can also help us get a clearer view of
such problem.

Thanks,
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.