I'm trying, through the action of a button on my website, to open a file that is on my company's network. Running the application only through visual studio, the file opens without problems. But when I register it in IIS, this problem happens. Through IIS I can't access the file, this message appears, as shown below:
System.ComponentModel.Win32Exception: 'The specified network password is not correct'
For the network drives to be visible to me on my computer, every time I turn on the computer, I must enter the network username and password novel: Client for Open Enterprise Server 2 SP4 (IR7a). After login, the network drives appear. In one of these units is where I want to access a file through my website. I believe the problem is in the configuration of IIS. I configured authentication in IIS to be anonymous. I don't know how to configure it differently.
Would anyone know how to solve this problem?
Thank you very much in advance.
An addendum:
These are the mapped drives. I want to access the file of one of them through IIS:
Mapped drives
Addendum 2:
I found that I can't access local documents through IIS either. I can see the error through debug, with VS configuration in IIS Local. If I configure in visual studio for it to run the application in IIS Local, the document access problem occurs. I can't open the files through the button on my website. As shown in the picture in the link: IIS configuration
When I open IIS, and I click on the page link, as shown: Internet Information Service Manager - IIS, access problem occurs.
If I'm running Visual Studio with IIS Local configured, I can debug and see the problem.
If I run Visual Studio in IIS Express, I can access and open the files through the click of the button on my website, normally.
I just don't want to have to do this every time I need to run my site.
I want my site to work without needing to run visual studio.