Solved

Asp.net Web Application trying to write to UNC virtual directory on another member server

Posted on 2007-11-20
4
431 Views
Last Modified: 2013-11-07
Currently we have a virtual directory setup on our web server, and it is pointing to a unc share on a member server.  

I.E Server A has Virtual Directory 1 pointing to a share on Server B.

We have created a domain user account, and given full control permissions to the share.  We also have taken advantage of the "Connect As" option in IIS 6.0.  
We can see the contents of the share when browsing the virtual directory in IIS manager, but when trying to upload a file to the directory we are presented with the following error.  "Access to the path \\localhost\scandocs\rready is denied".  Our virtual directory is the scandocs portion and the rready portion is pulled from login on the web site.  What should happen is if there is no directory matching the user that is logged in it should create the parent i.e rready and then put the uploaded file under that directory.  If the directory already exists it should write the file under the existing directory.  
This works neither when trying to write a new directory or using an existing.  

Also it is very important to note that on our development machine (windows xp) everything works as it should, and that we have multiple websites using host headers.  With that said we do have the virtual under the default website in IIS.  We do not have a host header setup for that though.  Any help will be greatly appreciated.
0
Comment
Question by:c2csurveys
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 20322381
check that the IUSER_MACHINENAME account has access to the share - that is the account that the asp.net process runs under and it needs permissions to do any file access.
0
 

Author Comment

by:c2csurveys
ID: 20322426
I am not sure as to where you are talking about.  If you mean the anonymous access account on the remote share, then it will not resolve in our domain.  If I go to the remote share and try an advanced find throughout the domain it cannot find the account.
0
 

Author Comment

by:c2csurveys
ID: 20329998
Does anyone know of a command in asp.net that will directly access a virtual directory?
0
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
ID: 20378292
the asp.net web application needs to run under a user account, and that user account needs to have access to the share. because the share is located on the local machine you should be able to check the permissions of that location and add the IUSER_MACHINENAME user to have access to it. the account is on the local machine and not the domain.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now