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

  • Thread starter Thread starter Daniel
  • Start date Start date
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?
 
if i add

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

to my web config i just get error 500
 
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.
--
 
Back
Top