What are the rules when accessing a remote server with upgrades?
When accessing multiple cards (this is the heading you are looking for in the manual, page 18), you access one at a time. So you can't look at both upgrades and the asset and then decide which to trash. You pick one at random, decide to trash or leave it, then move on to the next. You get to access all the cards in the server but only one at a time.

Here is the relevant page from the manual:


  When accessing multiple cards, the Runner accesses them one at a time
  *in any order he likes*. For example, the Runner may access a card from
  HQ, then an upgrade installed in the root of HQ, and then another card
  from HQ, if he has the ability to do so. When accessing multiple cards
  from R&amp;D, the Runner must draw them in order from the top of the deck,
  and must return any cards not scored or trashed in reverse order, so
  as to preserve their positions in R&amp;D. The Runner must fully resolve
  his access to a card (steal it, pay to trash it, etc.) before
  accessing the next card. If the Runner scores an agenda that gives him
  seven or more points, he immediately wins the game, even if he would
  otherwise access more cards.


This means that if there is an agenda in a remote server, but also a trap and you access the trap first... it is possible to get flatlined before you win from the stolen/scored agenda.