472,344 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,344 software developers and data experts.

How to get system.IO access to UNC resources using virtual directory configuration SERVER SIDE?

I got stumpped on this a while back and used a workaround that
involved the "same local username/pwd on both servers" method. Now
I'd like to find a cleaner method....

The setup:
A webApp (lets say C:\WebApp\) with a subordinate virtual directory
(./Images) using an UNC path (e.g. \\ImageServer\Images\ ) to a remote
directory, using pre-defined credientials configured via IIS manager
or directoryservices using UNCUserName and UNCPassword. The
configuration works fine, as the Client-Side can browse ./Images just
fine using the configured credentials. programmatic acces from
code-behind is another story...

The problem:
in code-behind, using the system.io namespace objects require the
physical path (\\ImageServer\Images\). But the current user (say
IUSR_Machinename) doesn't have access to this (or any other remote)
resource for security purposes. Opening a file from the raw UNC
bypasses the virtual directory's configuration and attempts access
using the current user context.

How can I get to the resources of a virtual directory from the server
side?
Am I missing something with system.IO or maybe a totally different
namespace?

any help or comments (no matter how brutal) will be greatly
appreciated...
Dwaine
Nov 18 '05 #1
0 1311

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

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure...
1
by: Leonid | last post by:
Hello I have VC++ .NET 2003 ATL Server project. In one of its method I need to write some information in a local txt file. This txt file and this...
7
by: Peter Afonin | last post by:
Hello, I'm using this code to access a network share from an asp.net page: Dim dir As DirectoryInfo = New...
8
by: A P | last post by:
Hi! I'm using ASP.Net Web Matrix on my PC and wanting to publish the files to our server. I try to copy (thru explorer) the files but it didn't...
8
by: Michael | last post by:
I am running a web server (IIS) on Windows 2003 SP 1. My ASP.NET C# applications run fine. However, my application is a combination of Classic...
10
by: Eric | last post by:
Hello, I have some server side includes on a Classic asp page that look something like: <!-- #include virtual="/includes/file1.asp"--> <!--...
2
by: =?Utf-8?B?c2FtMDFt?= | last post by:
I have a remoting application that was developed on a Windows XP SP2 machine with VS2005 SP1. I finally got everything deployed using Wix 3.0, and...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.