Error while running a virtual site by using a mapped drive

  • Thread starter Sriram Mallajyosula
  • Start date
S

Sriram Mallajyosula

Hi,

I am not sure whether this is the correct newsgroup where I am posting the
question.

I am currently using Citrix as a solution for connecting to a remote server
on which Windows Server 2003 Standard Edition is the operating system. I have
created a new virtual site on that machine for which the home directory is a
mapped drive on my network. (Example T:\ = \\machine1\share1). When I try to
browse my ASP.Net application I get the below error. Also I am unable to open
the web project in my VS.Net IDE

"Server cannot access application directory 'T:\InetPub\wwwroot\'. The
directory does not exist or is not accessible because of security settings."

Is it that I cannot have a mapped drive as a home directory. Should you
require any further information please do not hesitate to ask me.

Thanks in advance.

Regards,
Sriram Mallajyosula
 
S

Steven Cheng[MSFT]

Hello Sriram,

From your description, you have an ASP.NET (2.0?) application hosted on
IIS6/win2003 std server. And the IIS virtual directory is pointing to a
remote file share. However, when you try browsing or opening the
applciation in VS 2005, you got the following error, correct?

"Server cannot access application directory 'T:\InetPub\wwwroot\'. The
directory does not exist or is not accessible because of security settings."

Based on my experience, there are some possible things that can cause this
error:

** the virtual directory is not existing or accessible, for example, you
create a virtual dir pointing to a folder under a given user's user
profile(document_settings\userxxx\xxxx). Here is a web thread describe on
this:

http://blog.danbartels.com/archive/2005/04/22/579.aspx

** the IIS process doesn't have sufficient permission to access the
physical path of the virtual directory.

According to your scenario, you can check the two cases, if the virtual
directory is a well accessible UNC share, it is likely that the permission
is not correctly configured for the virtual directory's UNC share.

Generally, we should take care of the following things when hosting an
ASP.NET 2.0 web application in IIS which point to a UNC share

1.The UNC share is well accessible by the server machine(where the ASP.NET
application is hosted in IIS)

2. The UNC shared folder has two permission settings:
** the NTFS access permission
** the UNC share folder's access permission

You need to make sure a certain account(generally domain account for remote
machines scenario) have sufficient perssion to read/modify that UNC
share(and have sufficient permission on NTFS setting)

3. In the remote server's IIS virtual directory, when you set the home
directory to a UNC share, you can configure a "Connect As..." account for
it. This account is used by IIS to access the remove UNC share. As
mentioned in #2, you need to select an account(commonly a powerful domain
account) which has sufficient permission on the UNC share.

I've performed some tests in my local environment and ASP.NET 2.0 web
app(from a remove UNC share on a xp box) can works well in VS 2005(through
both IIS hosted or VS 2005 test server hosted cases). There is no
additional configuration requirement except the above things I mentioned.

Here are some IIS UNC share mapping related KB articles:

http://support.microsoft.com/kb/280383/en-us

http://support.microsoft.com/kb/257174/en-us

Hope this helps you.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Sriram Mallajyosula

Hi Steven,

I am using ASP.Net 1.1 , Visual Studio.Net 2003 and Visual Sourcesafe 6.0 on
the Windows 2003 server.

Regards,
Sriram Mallajyosula
 
S

Steven Cheng[MSFT]

Thanks for your quick reply Sriram,

For ASP.NET 1.1, all the other things I mentioned still fits your
scenario(and only IIS is supported for the host server).

One additional things we need to check for ASP.NET 1.1 is the code access
security. When you configure the IIS virtual directory to a mapped UNC
share, since the file is loaded from remote UNC, according to the .NET
CAS(code access security), it will be evaluated as Local Intranet zone
rather than Local computer. Thus, your ASP.NET application can not run with
trust level as "Full"(the default setting). To verify whether the problem
you encounter is CAS issue, you can temporarily turn off the .NET CAS by
using the following command(in vs 2003 command prompt)

caspol -s off


#Code Access Security Policy Tool (Caspol.exe)
http://msdn.microsoft.com/library/en-us/cptools/html/cpgrfCodeAccessSecurity
PolicyUtilityCaspolexe.asp?frame=true

You can verify from the checklist in my last reply to see whether any of
them fit your scenario.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Sriram Mallajyosula

Hi Steven,

I would try this out and keep you posted after I test this solution. Thanks
for your help.

Regards,
Sriram Mallajyosula
 
S

Steven Cheng[MSFT]

Sure, Sriram,

If you got any progress or meet any further problem, please feel free to
post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello Sriram,

Have you got any further progress on this? If there is anything else need
help ,please don't hesitate to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top