none
c# testing a webMethod using IQueryable works but does not after publishing RRS feed

  • Question

  • I have developed web services using c# for a while now. And everything up till now worked fine, but today even though while debugging the code runs fine like it has been for few months now but when i publish the code and put it on a IIS it gives and error.

    the message is:

    The type or namespace name 'AKAB_Item_AKItem' could not be found

    the code which works while debugging but crashes when published.

     IQueryable<AKAB_Item_AKItem> akitemsswe = null;
                if (date_last_modified != null)
                {
                    akitemsswe = from result in dc2.AKAB_Item_AKItems
                                 where result.Last_Date_Modified > DateTime.ParseExact(date_last_modified.ToString(), "dd.MM.yyyy HH:mm:ss", null)
                                 select result;
                }
                else
                {
                    akitemsswe = from result in dc2.AKAB_Item_AKItems
                                 select result;
                }

    Am I missing something because i can not wrap my head around that the debugging works but the published project does not.

    And just to be sure - I have inspected the published files and the *.dbml contains 

    AKAB_Item_AKItem

    • Edited by JanisRoze Monday, December 18, 2017 2:36 PM FYI
    • Moved by CoolDadTx Monday, December 18, 2017 2:52 PM ASP.NET related
    Monday, December 18, 2017 2:31 PM

All replies