Access files from network share in c# web app

前端 未结 5 743
终归单人心
终归单人心 2020-12-01 11:29

I have a web application that needs to read (and possibly write) files from a network share. I was wondering what the best way to do this would be?

I can\'t give the

5条回答
  •  攒了一身酷
    2020-12-01 12:04

    I've had no problems connecting to network shares transparently as if they were local drives. The only issue you may have is what you mentioned: having the aspnet account gain access to the share. Impersonation is probably the best way to do this.

    You should be able to use any filestream objects to access the network share as long as it has a drive letter on the server machine.

提交回复
热议问题