Reputation: 3305
Don't considered this as exact duplicate of this
I am developing asp.net site in vs 2010. I need to get the MyDocuments Path for some storing purpose. So I used the following.
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
It works when I run my site in VS. But if I run on IIS(locally), it returns empty value.
So tried to set AppPoolIdentity to LocalSystem
. But that is also not worked.
How to overcome this situation? Please advice me.
Upvotes: 0
Views: 203
Reputation: 6269
That seems a strange place to place documents considering your using NetworkServices or LocalSystem for the AppPool. Why not place a path within the web.config file?
Upvotes: 1