473,419 Members | 1,983 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,419 software developers and data experts.

Problem running local asp.net app with web site on network share

JR
I have a Web server running on Windows XP. On this Web server, I have a Web
site configured with its home directory on a network share. In the Web site,
there's a virtual folder pointing to a local folder on the Web server
containing an ASP.NET application.

I get a "Failed to start monitoring changes" when I try to run the
application. If I try to debug, I get a message "unable to start debugging
on the Web server".

I put an <identity impersonate=""> section in Web.config specfying a domain
account that has permissions to the share for the Web site and the local
ASP.NET application, but that didn't correct the errors.

I'm running ASP.NET 1.1 and I don't understand why ASP.NET would care about
any files above the virtual folder in the Web site, which again, points to a
local directory.

Of course, I have no problems with the ASP.NET application if I change the
home directory of the Web site to a local folder.

Note: I got this to run once using the <identity> setting, but I commented
it out to confirm it would fail, and now putting it back doesn't allow the
site to run.

Thanks.
Nov 18 '05 #1
8 2457
Take a look at this article:
http://support.microsoft.com/default...b;EN-US;317955

Make sure you have given permissions to the full path to teh virtual
directory.

Hope this helps,
-Jeff
"JR" <jr******@newsgroups.nospam> wrote in message
news:uk****************@TK2MSFTNGP12.phx.gbl...
I have a Web server running on Windows XP. On this Web server, I have a Web site configured with its home directory on a network share. In the Web site, there's a virtual folder pointing to a local folder on the Web server
containing an ASP.NET application.

I get a "Failed to start monitoring changes" when I try to run the
application. If I try to debug, I get a message "unable to start debugging
on the Web server".

I put an <identity impersonate=""> section in Web.config specfying a domain account that has permissions to the share for the Web site and the local
ASP.NET application, but that didn't correct the errors.

I'm running ASP.NET 1.1 and I don't understand why ASP.NET would care about any files above the virtual folder in the Web site, which again, points to a local directory.

Of course, I have no problems with the ASP.NET application if I change the
home directory of the Web site to a local folder.

Note: I got this to run once using the <identity> setting, but I commented
it out to confirm it would fail, and now putting it back doesn't allow the
site to run.

Thanks.


Nov 18 '05 #2
JR
Unfortunately, it didn't.

"Jeff Widmer" <je****@nospam.speakeasy.net> wrote in message
news:u2*****************@tk2msftngp13.phx.gbl...
Take a look at this article:
http://support.microsoft.com/default...b;EN-US;317955

Make sure you have given permissions to the full path to teh virtual
directory.

Hope this helps,
-Jeff
"JR" <jr******@newsgroups.nospam> wrote in message
news:uk****************@TK2MSFTNGP12.phx.gbl...
I have a Web server running on Windows XP. On this Web server, I have a Web
site configured with its home directory on a network share. In the Web

site,
there's a virtual folder pointing to a local folder on the Web server
containing an ASP.NET application.

I get a "Failed to start monitoring changes" when I try to run the
application. If I try to debug, I get a message "unable to start debugging on the Web server".

I put an <identity impersonate=""> section in Web.config specfying a

domain
account that has permissions to the share for the Web site and the local
ASP.NET application, but that didn't correct the errors.

I'm running ASP.NET 1.1 and I don't understand why ASP.NET would care

about
any files above the virtual folder in the Web site, which again, points to a
local directory.

Of course, I have no problems with the ASP.NET application if I change

the home directory of the Web site to a local folder.

Note: I got this to run once using the <identity> setting, but I commented it out to confirm it would fail, and now putting it back doesn't allow the site to run.

Thanks.

Nov 18 '05 #3
Hi JR,

I have performed some tests on my side. I can also reproduce this error
message.

Actually, the cause for the error message is in Windows XP, ASP.NET
application run with the work process aspnet_wp.exe, which by default use
the local "ASPNET" account. Since it is only a local account, we can't add
it to the UNC folder. This will cause the error message.

To trouble-shoot this error, we can try the following methods:

Method 1:
----------

We can set the account for aspnet_wp.exe to local system, and then add the
computer as one account to the UNC folder.

1. Locate the "machine.config" file.

2. Make a backup of this file.

3. Locate the following in this config file:

<processModel ... userName="machine" password="AutoGenerate"... >

4. Change "machine" to "SYSTEM".

5. Add the computer as one account to the UNC folder with appropriate
permission (or just "Full Control" permission).

Note: To add one computer as one account, make sure to check "Computers"
for "Object Type" when adding accounts.

Method 2:
----------

We can also specify one domain user account for aspnet_wp.exe, which has
appropriate permission to the UNC folder.

1. Locate the following in the machine.config file:

<processModel ... userName="machine" password="AutoGenerate"... >

2. Change the user name and password like following:

userName="DomainName\username" password="password"

3. Add the account to the UNC folder with appropriate permission (or just
"Full Control" permission).

For more information with the steps and the permission needed for this new
account, please refer to the following Knowledge Base articles from
Microsoft:

324393 HOW TO: Install the .NET Framework on a Cluster
http://support.microsoft.com/?id=324393

317012 INFO: Process and Request Identity in ASP.NET
http://support.microsoft.com/?id=317012

Have a nice day!

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
JR
Steven, I can't investigate #1 because that won't work for our production
system. AS STATED IN MY INITIAL POST, I tried a variant of #2, making the
change in Web.config because machine.config changes will not be allowed in
our production environment.

Any idea as to why setting the <identity impersonate=""> setting in
Web.config to a domain account that has permission to the network share
isn't working?

-J

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:iL**************@cpmsftngxa10.phx.gbl...
Hi JR,

I have performed some tests on my side. I can also reproduce this error
message.

Actually, the cause for the error message is in Windows XP, ASP.NET
application run with the work process aspnet_wp.exe, which by default use
the local "ASPNET" account. Since it is only a local account, we can't add
it to the UNC folder. This will cause the error message.

To trouble-shoot this error, we can try the following methods:

Method 1:
----------

We can set the account for aspnet_wp.exe to local system, and then add the
computer as one account to the UNC folder.

1. Locate the "machine.config" file.

2. Make a backup of this file.

3. Locate the following in this config file:

<processModel ... userName="machine" password="AutoGenerate"... >

4. Change "machine" to "SYSTEM".

5. Add the computer as one account to the UNC folder with appropriate
permission (or just "Full Control" permission).

Note: To add one computer as one account, make sure to check "Computers"
for "Object Type" when adding accounts.

Method 2:
----------

We can also specify one domain user account for aspnet_wp.exe, which has
appropriate permission to the UNC folder.

1. Locate the following in the machine.config file:

<processModel ... userName="machine" password="AutoGenerate"... >

2. Change the user name and password like following:

userName="DomainName\username" password="password"

3. Add the account to the UNC folder with appropriate permission (or just
"Full Control" permission).

For more information with the steps and the permission needed for this new
account, please refer to the following Knowledge Base articles from
Microsoft:

324393 HOW TO: Install the .NET Framework on a Cluster
http://support.microsoft.com/?id=324393

317012 INFO: Process and Request Identity in ASP.NET
http://support.microsoft.com/?id=317012

Have a nice day!

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5
Hi JR,

Thank you for the response. Regarding on the issue, we're
finding proper resource to assist you and we will update as soon as posible.

Regards,

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 18 '05 #6
Hi JR,

After some further analisis, I would like to explain the steps when running
the ASP.NET web application under our scenario. I believe this is helpful
for us to further understand the problem.

When we start the web application at the sub directory, it is attempting to
access the share because the configuration system is looking for a
web.config file at the root. When the process model is set to "machine",
then it tries to use the UNC account password to login, and it is failing.
I have also tried to grant "Everyone" with "Full Control" permission of the
shared folder. However, the same error message still appeared. When the
account is "system", it does not use the UNC account, and the machine has
access to the remote share.

We can find that ASP.NET has not tried to check the web.config in the sub
directory at this time. Therefore the Impersonate settings in the sub
directory will not take effect.

Actually, to access the remote shared root when starting the web
application, we need to make sure the ASP.NET work process has the
permission. This is the reason that we need to modify the <processModel> in
machine.config file.

I understand that it is hard to modify the machine.config on the production
server. However, if the root folder for the web site is one shared folder,
I am afraid that we still need to modify this file. Actually, the two
methods in my last reply both modify the machine.config file.

If there is any further concern, please don't hesitate to let me know.
Otherwise, I suggest that we backup and modify the machine.config according
to the steps in my last reply. Thanks!

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #7
JR
Thanks for the thorough analysis. I'll speak with our production team about
making these changes. Last question: do you have anything that definitively
explains when an ASP.NET applicaition uses the processmodel setting versus
the impersonate setting? It's still not clear in my mind.

Thanks again.

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:xF*************@cpmsftngxa10.phx.gbl...
Hi JR,

After some further analisis, I would like to explain the steps when running the ASP.NET web application under our scenario. I believe this is helpful
for us to further understand the problem.

When we start the web application at the sub directory, it is attempting to access the share because the configuration system is looking for a
web.config file at the root. When the process model is set to "machine",
then it tries to use the UNC account password to login, and it is failing.
I have also tried to grant "Everyone" with "Full Control" permission of the shared folder. However, the same error message still appeared. When the
account is "system", it does not use the UNC account, and the machine has
access to the remote share.

We can find that ASP.NET has not tried to check the web.config in the sub
directory at this time. Therefore the Impersonate settings in the sub
directory will not take effect.

Actually, to access the remote shared root when starting the web
application, we need to make sure the ASP.NET work process has the
permission. This is the reason that we need to modify the <processModel> in machine.config file.

I understand that it is hard to modify the machine.config on the production server. However, if the root folder for the web site is one shared folder,
I am afraid that we still need to modify this file. Actually, the two
methods in my last reply both modify the machine.config file.

If there is any further concern, please don't hesitate to let me know.
Otherwise, I suggest that we backup and modify the machine.config according to the steps in my last reply. Thanks!

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #8
Hi ,

Thanks for your effort and time. I really appreciate it.

Regarding the information when an ASP.NET applicaition uses the
processmodel setting versus the impersonate setting, please refer to the
following information:

When ASP.NET start running, it will parses the configuration file.
Inetinfo.exe, which runs under the System identity, reads the <processModel
/> section. After that, the ASP.NET worker process (Aspnet_wp.exe) reads
the <sessionState/> sections.

If content is hosted on a Universal Naming Convention (UNC) share, the
account that is used to access the UNC share must have permission to read
these keys.

We can find that at this time, the <Impersonate> settings in the web.config
file has not been checked at this point.

For more information, please check the following two Knowledge Base
articles from Microsoft:

329290.KB.EN-US HOW TO: Use the ASP.NET Utility to Encrypt Credentials and
Session State
http://support.microsoft.com/default...B;EN-US;329290

If there is any unclear, please feel free to let me know.

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #9

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

Similar topics

4
by: Derek Timothy | last post by:
Hi folks I have strange problem using cmd.exe from asp code I am trying to save the results of an FTP command into a text file. When I run this command from the command line of the web server it...
1
by: CES | last post by:
All, If anyone has been following my trials over the last week see(Setting up a Web Application on IIS 5.1 and ASP.Net Security Problems). I'm having a problem running a Asp.Net Web...
1
by: JR | last post by:
I have a Web server running on Windows XP. On this Web server, I have a Web site configured with its home directory on a network share. In the Web site, there's a virtual folder pointing to a local...
2
by: flat_ross | last post by:
Hi, I am in a shop where developers are required to work off of a network share. This is so that code is backed up nightly. So I am testing running an ASP.NET Web application with a Class...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
4
by: Jeremy S. | last post by:
We're in the process of writing a new Windows Forms app and the desktop support folks want for it to be run from a network share. I know it's possible (i.e., just have the framework on the clients...
5
by: lmttag | last post by:
ASP.NET 2.0 (C#) application Intranet application (not on the Internet) Using Windows authentication and impersonation Windows Server 2003 (IIS6) Server is a member server on a domain Logged...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
12
by: jcor | last post by:
Hi, I'm using Ubuntu 7.04. I'm writing a sript that sends files via ftp for several destinations. So far I used Net::FTP and it worked fine. My problem is that I need to send files via SFTP...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
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...

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.