# Settin up the DOTNET\_STARTUP\_HOOKS

**URL:** <https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [April 30, 2021, 1:26pm UTC](https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782 "2021-04-30T13:26:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henk\_Stobbe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henk_stobbe/32/88015_2.png) [@Henk\_Stobbe](https://discuss.elastic.co/u/Henk_Stobbe)\
**Post date:** [April 30, 2021, 1:26pm UTC](https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782/1 "2021-04-30T13:26:33Z")

</div>

Hello,

set DOTNET\_STARTUP\_HOOKS=[pathToAgent]\ElasticApmAgentStartupHook.dllI

I use tis to set up .NET core.

How do I configure this further? I see nothing in the documentation,

KR Henk

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [April 30, 2021, 1:39pm UTC](https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782/2 "2021-04-30T13:39:33Z")

</div>

Hi @Henk_Stobbe ,

in this mode the agent will read config settings from environment variables. You can find the specific environment variable names in the docs - e.g. for [`ServerUrls](https://www.elastic.co/guide/en/apm/agent/dotnet/current/config-reporter.html#config-server-url) you can see it under "Environment variable name" - same applies to all other settings.

---

<div class="post-metadata">

**Author:** ![Henk\_Stobbe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henk_stobbe/32/88015_2.png) [@Henk\_Stobbe](https://discuss.elastic.co/u/Henk_Stobbe)\
**Post date:** [April 30, 2021, 2:13pm UTC](https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782/3 "2021-04-30T14:13:24Z")

</div>

Hi Greg, thanks for your reply!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 21, 2021, 10:13am UTC](https://discuss.elastic.co/t/settin-up-the-dotnet-startup-hooks/271782/4 "2021-05-21T10:13:30Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
