473,503 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler?

How to access a network file path \\foo\bar.txt from an .aspx and from a
custom IHttpHandler?

How to specify which account that aspx application should use when doing
file IO from network paths?

When I try to open the file from .aspx the file read throws: Logon failure:
Logon failure: unknown user name or bad password.
When I try to open the file from a custom IHttpHandler the file read throws:
Logon failure: unknown user name or bad password.

\\foo\bar.txt grants read access to the group "Everyone" and everyone but my
aspx application are able to read \\foo\bar.txt

How to specify which account that aspx application should use when doing
file IO from network paths?
Mar 15 '06 #1
1 3532
if i add

<identity impersonate="true" userName="domainzzz/userzzz" password="passzzz"
/>

to my web config i just get error 500

"Daniel" <so*******************@yahoo.com> wrote in message
news:ew*************@TK2MSFTNGP10.phx.gbl...
How to access a network file path \\foo\bar.txt from an .aspx and from a
custom IHttpHandler?

How to specify which account that aspx application should use when doing
file IO from network paths?

When I try to open the file from .aspx the file read throws: Logon failure: Logon failure: unknown user name or bad password.
When I try to open the file from a custom IHttpHandler the file read throws: Logon failure: unknown user name or bad password.

\\foo\bar.txt grants read access to the group "Everyone" and everyone but my aspx application are able to read \\foo\bar.txt

How to specify which account that aspx application should use when doing
file IO from network paths?

Mar 15 '06 #2

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

Similar topics

8
11833
by: Lam | last post by:
HI anyone knows how can I open a mapped network file in C#? I try string file = @"T:\file.txt"; it shows me the error: "Could not find a part of the path" but if I copy the file to my C dirve,...
1
1115
by: Rea Peleg | last post by:
Hi all There seem to be a problem when i attempt to add attachment from the client machine to the mail message sent from the web aspx server application. I am using dot net and i expect security...
7
5811
by: zxkuqyb | last post by:
I've written a simple ASP .NET web application that reads a text file and displays it in the web browser. Works fine when reading a local path; but fails with "can not find a part of the path", or...
3
1207
by: Rudy | last post by:
Hello! I know you can save the file path to SQL from where you took a file from, like c:/documents.mypictures. And you would use the sFileName = browsefile.PostedFile.FileName But if I want...
4
1393
by: A.M-SG | last post by:
Hi, I need an aspx's code behind program access to a network folder which is only available for specific active directory user. How can I have that specific aspx code login into the active...
3
7945
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
1
440
by: Daniel | last post by:
How to access a network file path \\foo\bar.txt from an .aspx and from a custom IHttpHandler? How to specify which account that aspx application should use when doing file IO from network paths?...
0
420
by: ary | last post by:
hi all I have a problem with working file when i upload a file in IIS I can'd Delete it. if I try to delete it in debug mode , it successfully worked. my error message "the process...
0
1094
by: ashokformac | last post by:
I am using java on mac os 10.4 i want to access a file on LAN server machine.how can i give the server path...ie for local file i just give direct filename ie .. /system/ashok/temp.txt but...
4
2875
by: GiJeet | last post by:
Every example I see regarding opening a file uses paths like this: FileStream inputStream = new FileStream ("C:\\file.txt", FileMode.Open, FileAccess.Read); Great if the file is always on the...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7348
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...
1
7006
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
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...
1
5021
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...
0
4685
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...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
397
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...

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.