accessing files on intranet

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

Hi!

How can I access files on intranet. I have mapped a
serverfolder to the drive letter G and try to access a
file from ASP.NET, but File.Exists("G:\filename.ext")
returns false. The same code in Windows Forms returns
true, so I guess it has something to do with the
permissions. I set all rights to the IUSR_machinename.
This is enough to make it work locally on C: but not on G:

any suggestions?

/Miro
 
By default, ASP.NET runs as a user that doesn't have
access to the network. In fact, I believe that the
ASPNET user is a local user. TO test out this theory, go
into the machine.config and change the processModel
attribute for user and password to be a user (domain
qualified) and password that does have access to the
network.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
 
Thanks Bruce!

I've tried it but got the same error. What solved this
for me was two things. Uncheck the "anonymous access" in
IIS and insert this:

<identity impersonate="true"/>

into web.config. Anyway I still have trouble making it
work on Novell servers. It works WXP->W2000 and W2000-
W2000 but not W2000->Novell. I'm using windows
authentication with adm rights. Any suggestions on this
one?

/Miro
 
Hi Miro,

Firstly I want to thank Bruce for his great help in this issue.

I apologize for it if there is any misunderstanding. Based on my research
and experience, the following article is useful to this issue.

INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/default.aspx?scid=kb;en-us;306158
"...
Impersonate a Specific User for All the Requests of an ASP.NET Application
To impersonate a specific user for all the requests on all pages of an
ASP.NET application, you can specify the userName and password attributes
in the <identity> tag of the Web.config file for that application. For
example:

<identity impersonate="true" userName="accountname" password="password" />
..."

Please make sure that you are using the administrator account to test this
issue. If I have misunderstood your concern, please feel free to let me
know.

On the other hand, I am not familiar with Novell. If the above solution
does not resolve your problem, please try to contact Novell/Netware for the
help. Thank you for your understanding.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top