From: Gerry on
Hi there,

I'm making a call to the following from a standalone ".exe":

System.Net.WebClient webClient = new WebClient();
webClient.UploadData("http://localhost//MyPage.aspx", whatever);

Does anyone know how to trigger a breakpoint in the "Page_load()" method of
"MyPage.aspx". I want to step into this but nothing I've tried works. Note
that "Page_Load()" is being called however and breakpoints work if I set
them when debugging the web app itself. Thank you.

From: Patrice on
> System.Net.WebClient webClient = new WebClient();
> webClient.UploadData("http://localhost//MyPage.aspx", whatever);
>
> Does anyone know how to trigger a breakpoint in the "Page_load()" method
> of "MyPage.aspx". I want to step into this but nothing I've tried works.
> Note that "Page_Load()" is being called however and breakpoints work if I
> set them when debugging the web app itself. Thank you.

Hi, IMO your method is correct (i.e put a breakpoint in the web app) and you
can't do otherwise.

Technically speaking you just send data to a URL. As this is not an explicit
call, it would be quite difficult to have the debugger parsing the url to
see this is an ASPX web app, to find out that this is on your localhost and
to locate the corresponding solution etc...

--
Patrice



From: Andy O'Neill on

"Gerry" <_no_spam@_no_spam.com> wrote in message
news:%23BfUrT$rKHA.4652(a)TK2MSFTNGP02.phx.gbl...
> Hi there,
>
> I'm making a call to the following from a standalone ".exe":
>
> System.Net.WebClient webClient = new WebClient();
> webClient.UploadData("http://localhost//MyPage.aspx", whatever);
>
> Does anyone know how to trigger a breakpoint in the "Page_load()" method
> of "MyPage.aspx". I want to step into this but nothing I've tried works.
> Note that "Page_Load()" is being called however and breakpoints work if I
> set them when debugging the web app itself. Thank you.
The web page is going to be handled by the worker process.
I have very rarely had to do something where I couldn't just debug the web
page itself.
As I recall you use the clr debugger to attach to the worker process.
A quick google and there seem to be articles on doing this.

From: Gerry on
> The web page is going to be handled by the worker process.
> I have very rarely had to do something where I couldn't just debug the web
> page itself.
> As I recall you use the clr debugger to attach to the worker process.
> A quick google and there seem to be articles on doing this.

I'll look into this. Thanks for your help.

From: Gerry on
>> System.Net.WebClient webClient = new WebClient();
>> webClient.UploadData("http://localhost//MyPage.aspx", whatever);
>>
>> Does anyone know how to trigger a breakpoint in the "Page_load()" method
>> of "MyPage.aspx". I want to step into this but nothing I've tried works.
>> Note that "Page_Load()" is being called however and breakpoints work if I
>> set them when debugging the web app itself. Thank you.
>
> Hi, IMO your method is correct (i.e put a breakpoint in the web app) and
> you can't do otherwise.
>
> Technically speaking you just send data to a URL. As this is not an
> explicit call, it would be quite difficult to have the debugger parsing
> the url to see this is an ASPX web app, to find out that this is on your
> localhost and to locate the corresponding solution etc...

Understood but there should be a way to do this. Hardcoding a
"Debugger.Break()" statement for instance is ignored.