Question

I've search for a solution for this issue but couldn't find one specific to my scenario.

When i update my test website to try out new changes, I seem to randomly (but frequently) get this compilation error.

CS0111: Type 'Views_warrantyNotification' already defines a member called 'Page_Load' with the same parameter types

Now on searching for a solution, it all points to having another Page_Load() but i can assure you, there isn't one on the page. I do have an override in the base page, so at the top of the .cs i have ....

    public partial class Views_warrantyNotification : CustomBase
    {
        ...
    }

then in CustomBase.cs i have...

    protected override void OnLoad(EventArgs e)
    {
        if (!IsPostBack && Directory.Exists(Server.MapPath("~/UploadFiles/") + Session.SessionID)) //if the directory is there on page load then it's come from another form. Delete it!
            Directory.Delete(Server.MapPath("~/UploadFiles/") + Session.SessionID, true);

        base.OnLoad(e);
    }

now this has never been a problem before and I've had this code in place for about 18 months. So I'm struggling to understand why this would suddenly start causing an issue, as such, I'm confused as to why I keep getting this error (randomly).

I've tried recycling the app pool and restarting the website after uploading the updated website files, but this doesn't seem to work.

What I also find strange, is that if I close my browser window and navigate back to the page I'm testing, it will load just fine.

Any idea's would be most appreciated, this is really annoying and it's slowing down my production :(

Thanks

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top