server.mappath and network shares

J

JR

My IIS Web site has a virtual directory called content mapped to a network
share. If the home directory of the Web site is c:\inetpub\wwwroot and the
virtual directory maps to the network share \\myserver\content,
Server.MapPath is returning c:\inetpub\wwwroot\content rather than
\\myserver\content.

I've tried adding
<identity impersonate="true" userName="name" password="password"/>

to the web.config file in order to make sure the identity of the account
accessing network resources has appropriate rights, but that doesn't change
the path returned by MapPath.

Does anyone know what's wrong?
 
S

Steven Cheng[MSFT]

Hi Jay,

I'm viewing the thread and found that it is a duplicated one with another
post(has the same title) in this newsgroup. I've posted a reply and
provided some of my test results in that thread. Would you please have a
check there. Also, if you have any questoins, please feel free to post in
either ones. 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top