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

D

Daniel

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?
 
D

Daniel

if i add

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

to my web config i just get error 500
 
N

Nick Malik [Microsoft]

You probably also get an error in the event log. Read it. It may be telling
you that the userid or password that you chose is not a valid one, or it may
be providing you with other information.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top