473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\I mages\ ) to a remote
directory, using pre-defined credientials configured via IIS manager
or directoryservic es 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_Machinenam e) 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 1375

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

Similar topics

9
4944
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 great (see attached file, test.php). When my webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
3
3482
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 sites. Perhaps, that it is so, although I know of no site that has this prohibition, and I have uploaded DAPs to various sites and used them from those sites. I do not understand why any site manager would prohibit DAPs. To the best of my knowledge DAPs, as HTM files, are merely hosted on the...
1
2354
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 ATL Server are on the same ‘C: \’ drive. When I tried it I just get ERROR_ACCESS_DENIED error from GetLastError function. What do I need to modify to let this ATL Server to write on local hard drive? Is it file’s access permission or ATL Server security settings Thanks a lot for hel ...
7
4780
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 DirectoryInfo("\\10.0.0.150\FormLib\") Dim files() As FileInfo = dir.GetFiles("*.eps") When I try to do it, I get this error: System.UnauthorizedAccessException: Access to the path
8
1830
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 work! I receive Runtime Error: Server Error in '/' Application. ---------------------------------------------------------------------------- ----
8
10773
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 ASP and C#. For some reason when you attempt to access the Classic ASP components of the application you are presented with this useless error message: "The system cannot find the file specified" The ASP.NET applications are contained within one directory, for instance...
10
18875
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"--> <!-- #include virtual="/includes/file2.asp" --> <!-- #include virtual="/includes/file3.asp" --> <!-- #include virtual="/includes/file4.asp" --> <!-- #include virtual="/includes/file5.asp" -->
2
11002
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 it works great. Problem is, when I install the msi on a W23 server SP2, I get the following error: System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation....
0
7883
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8251
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6674
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5839
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.