Reputation: 747
Let's say I have deployed my mvc4.5 web app to Server1 in my network
Is there a way to access/read data from FileA.zzz that sits on Server2 in my Network from my mvc4.5 web application?
For example, in my Model, I want to read a file, by pointing to "x:\folder1\folder2\FileA.zzz"
x is a mapped drive that points to Server2
Currently I'm getting an error saying the file is not accessible
Thanks in Advance
Upvotes: 0
Views: 1194
Reputation: 10576
Your web application uses application pool to run. Application pool has identity (user account that is used to run application.) You need to change identity of your application pool to user that has required permissions. By default your app will use default app pool. Use IIS Manager to update that.
Instruction about how to do it you can find here: http://msdn.microsoft.com/en-us/library/ee523018(v=bts.10).aspx Procedures
To configure the credentials for the default application pool 1. Click Start, then Settings, and click Control Panel.
In Control Panel, double-click Administrative Tools.
In Administrative Tools, double-click Internet Information Services (IIS) Manager.
In Internet Information Services (IIS) Manager, expand (User account) and click Application Pools.
Right-click DefaultAppPool and click Advanced Settings to display the Advanced Settings dialog box for the application pool.
Modify the identity for the application pool by clicking the ellipsis (…) button next to Identity under the Process Model section of the Advanced Settings dialog box.
In the Application Pool Identity dialog box, select the Custom Account option, click Set, and specify an account that has access to the BizTalk Server databases. Click OK until you exit the Advanced Settings dialog box.
Upvotes: 1