1

I have a ASP.Net 4.0 Web forms page that is giving me the following error on our web server

enter image description here

This page runs correctly on my localhost computer. This is the only page in the web app that has this issue. I've tried coping the contents of the \bin directory to the web server and copying the ASPX web page from my localhost to the web server.

Any thoughts as to what I would try next?

photo_tom
  • 7,292
  • 14
  • 68
  • 116

2 Answers2

5

This happened to me when I had two pages with the same "inherits" name.

I copied a "search" page, and renamed it "search2". It worked great "on my machine". :)

Next, I deployed... and got the "'Title' is not a member of" error. My html page had Inherits="Private_Search", the exact same as the page I copied it from! Also, the code behind was the same.

I changed that to Inherits="Private_Search2", and then in the code behind, renamed my class to Private_Search2, and now, no more errors!

If you recently copied a module, renamed it, and ran with it... check the inherits and the code behind class name.

happy coding!

StevieTimes
  • 389
  • 3
  • 9
3

From this thread of ASP.NET forums, it is concluded that you first need to delete all the pages from the bin directory and then copy it again. It might be an issue of caching here! A full refresh might be required to handle this case.

Afzaal Ahmad Zeeshan
  • 15,669
  • 12
  • 55
  • 103
  • +1 Yup. If this is the issue, overwriting (aka "replace") sometimes isn't enough (differs from (DELETE and then ADD) - I believe the concept is to force the application to re-compile/recycle (e.g. manually, changing (delete and add back) `web.config`, etc.). – EdSF Jun 13 '14 at 14:53