473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 3525
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.