locked
Can't delete file from custom Web User Control RRS feed

  • Question

  • User70877451 posted

    I do have the same code (File.Delete(FilePath)) in either page code-behind and in my custom Web User Control.
    The code in code-behind works perfect. But the same code in  my custom Web User Control doesn't delete the file.
    Even over that, it doesn't write any information in my LOG file in the same folder (my project folder).
    Any ideas why does it happened? (I spent last 3 hours trying to fix it and feel like I'm going insane!).

    Friday, January 13, 2012 3:12 AM

Answers

  • User70877451 posted

    I found solution.
    I just completely delete VS2010, all the components, SQL server & staff. Deleted IIS as well.

    After the reinstallation everything works perfect.
    Have no idea where the problem was.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 30, 2012 5:09 AM

All replies

  • User1315229986 posted

    Does the folder in which you are trying to delete/modify file has write access to ASPNET user

    Friday, January 13, 2012 3:18 AM
  • User70877451 posted

    Yep. It does.
    As I said, code either work or not depending on the place of apearence.

    Friday, January 13, 2012 5:31 AM
  • User70877451 posted

    Any Ideas?

    Friday, January 13, 2012 6:57 PM
  • User3866881 posted

    Hello:)

    Please show us your snippet of the whole sample codes,and then cut the screenshot of your proj's diagram of "Solution Explorer"。

    Best reguards!

    Sunday, January 15, 2012 12:23 AM
  • User70877451 posted

    I found solution.
    I just completely delete VS2010, all the components, SQL server & staff. Deleted IIS as well.

    After the reinstallation everything works perfect.
    Have no idea where the problem was.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 30, 2012 5:09 AM