0

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

3
  • Please provide stack trace and sample code. But my first guess would be that your app does not have permissions. Is it running under network account? Commented Jan 17, 2014 at 1:27
  • you are absolutely right, the app doesn't have permissions. I'm not sure how to verify what it's running under. The webApp is deployed under my IIS 7.5; it uses "windows authentication" as this is an internal website, which is only accessible to our Active Directory Users. As for the Stack Trace, this is really not my app. It's a colleague of mine that I'm trying to help. I would've put the entire info in that file in a proper DB structure. I'll get you more info tomorrow. Thanks! :) Commented Jan 17, 2014 at 1:55
  • Could you please share how this code is written Commented May 31, 2022 at 17:57

1 Answer 1

1

enter image description hereYour 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.

  1. In Control Panel, double-click Administrative Tools.

  2. In Administrative Tools, double-click Internet Information Services (IIS) Manager.

  3. In Internet Information Services (IIS) Manager, expand (User account) and click Application Pools.

  4. Right-click DefaultAppPool and click Advanced Settings to display the Advanced Settings dialog box for the application pool.

  5. 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.

  6. 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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the explanation! We resolved the issue by using "UNC" path rather than the "mapped" drive my colleague was using ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.