locked
.aspx Page_Load only works when run from VS RRS feed

  • Question

  • User-399634903 posted

    I've got an .aspx page that performs correctly if/when I "run" in Visual Studio.  However, if I attempt to open this page via it's url, it doesn't execute the correct result.

    I understand there's no detail at all in this and just looking for possible reasons why an .aspx page would load correctly if run in VS vs. from it's url.

    Thanks for any input.

    James

    Saturday, July 28, 2018 7:57 PM

All replies

  • User475983607 posted

    Page_Load is part of the Page Life cycle.  If the page executes at all the Page_Load has to execute.

    Is there anyway you can post a code sample that exhibits this behavior and tell us the steps to reproduce the issue?

    Sunday, July 29, 2018 1:01 PM
  • User283571144 posted

    Hi jamesfreddyc,

    According to your descritpion, I still couldn't understand your issue clearly.

    How you check the page doesn't run the page load event when directly access it from url?

    Have you set the breakpoint in the pageload event?

    If you use this way, you will find the breakpoint will not be fired when you access the page by url, since the breakpoint will only be fired in the debug mode.

    We could only run into debug mode by clicking the VS run button.

    Best Regards,

    Brando

    Monday, July 30, 2018 7:41 AM
  • User753101303 posted

    Hi,

    just looking for possible reasons

    Instead you should look at what happens. If you have an http 500 status error (which means the problem comes from the server side), by default an error messages should be written to the Windows log.

    Ah or you mean outside of VS but still from your own machine to localhost ? It is intended for developpment so VS launches the web site but the web site is not up and running at any time on your PC.

    Monday, July 30, 2018 8:13 AM