Can not access files on different computer

O

Orit

My solution has an ASP.NET app , a Web Service and a NET dll .
The ASP.NET application calls to WebService’s methods , which calls
the dll’s methods .
One of the functions of the dll is accessing files , which are located
on different computer. The path is UNC path and it exists . It has the
following code :

If My.Computer.FileSystem.FileExists(Path) Then
‘ read the image
End if

If the application is run directly from Visual Studio 2008 , it works
just fine and the FileExists returns true.
However, the same code running on the same machine under IIS fails.

When I had problems accessing some files on local machine from my
ASP.NET application before , I simply assigned ASPNET user to those
directories , and it worked fine .

However, since the files that should be accessed in the dll are
located on different machine, I can not do this .
I believe this is something to do with permissions.
It looks like I need to use ASP.NET impersonation. Is that right ? Is
there any good totorial explaining ALL steps that should be done ?
I found out that I need to add the “identity” line in my Web.Config .
I did it as following , but it didn’t help :
<configuration>
<system.web>
<identity impersonate="true" userName="my user name" password="the
user password"/>
</system.web>
</configuration>

My questions are :

What should I do in addition to writing this “identity" line in
Web.Config ?
I use FORMS ASP.NET authentication . Is that OK ?
What IIS Authentication should I use? Where I define it ?
If I use impersonation, what user name should I use? Where it should
be configured and what roles / permissions it should have?
Should it be domain user? Local User?
What config files should I change ( Web.Config , Machine.config ?
Something elase ? )


Any advices would be appreciated !!!!

Thanks , Orit .
 

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

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top