FileNotFoundException IIS7

前端 未结 3 1505
执念已碎
执念已碎 2021-01-20 01:58

I have a C# Web app that runs perfectly fine in VS2010, but when deployed to an IIS7 server, returns the \"image not found icon\".

The piece of code in question ess

3条回答
  •  青春惊慌失措
    2021-01-20 02:47

    The IIS7 worker process runs under its own credentials. It will access the file as the identity that runs the Application Pool under which your website runs. This is usually ApplicationPoolIdentity or NetworkService. You need to grant that user access to the file in question.

    But if you are really getting a FileNotFoundException that is probably not your problem, so please post the entire stack trace.

提交回复
热议问题