[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

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

Daniel

3/15/2006 5:40:00 AM

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?


2 Answers

Daniel

3/15/2006 6:30:00 AM

0

if i add

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

to my web config i just get error 500



"Daniel" <softwareengineer98037@yahoo.com> wrote in message
news:%23sG59J$RGHA.4740@TK2MSFTNGP14.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?
>
>


Egil Hogholt

4/26/2006 7:13:00 PM

0

Hi.
Have you tried this:
- use <identity impersonate="true"/> in Web.config
- configure the user name/password in the "Application Pool" for your site
instead of using the default "Network service"

BTW: Which error do you get? If you access the site on the server you should
get a detailed explanation of what is going wrong.

Cheers,
Egil
"Daniel" <softwareengineer98037@yahoo.com> wrote in message
news:uUzO6l$RGHA.5036@TK2MSFTNGP12.phx.gbl...
> if i add
>
> <identity impersonate="true" userName="domainzzz/userzzz"
> password="passzzz"
> />
>
> to my web config i just get error 500
>

<!-- cut -->

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

<!-- cut -->