# DotNet ASP NET agent constraints

**URL:** <https://discuss.elastic.co/t/dotnet-asp-net-agent-constraints/312554>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [August 21, 2022, 7:51pm UTC](https://discuss.elastic.co/t/dotnet-asp-net-agent-constraints/312554 "2022-08-21T19:51:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![btsinfo](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@btsinfo](https://discuss.elastic.co/u/btsinfo)\
**Post date:** [August 21, 2022, 7:51pm UTC](https://discuss.elastic.co/t/dotnet-asp-net-agent-constraints/312554/1 "2022-08-21T19:51:06Z")

</div>

Hi,  
In my case I have a dot net ASPNET application deployed on IIS with dotnet framework 4.7. for information I do not have the source code of the application and I need to instrument the transactions via dotnet autoinstrumentation method. in the doc, it is clear that Elastic.Apm.AspNetFullFramework must be added then recompiled, this option is not possible in my case. so i tried every way

- add the DLLs in the application bin
- modified the web.conf.

it works by modifying by replacing the DLLs of the application by those of the agent however in this case the application does not work correctly because I replaced certain DLLs of the application by those of the agent having the same name .

I used the opentelemetry dotnet autoinstrumentation agent, I manage to instrument the transactions well without any change in the DLLs there is only an addition of configuration in web.config

Please, is there any way the auto instrumentation agent can work by just modifying web.config

---

<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:** [September 11, 2022, 3:51pm UTC](https://discuss.elastic.co/t/dotnet-asp-net-agent-constraints/312554/2 "2022-09-11T15:51:38Z")

</div>

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

---

<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:** [September 26, 2022, 4:42pm UTC](https://discuss.elastic.co/t/dotnet-asp-net-agent-constraints/312554/3 "2022-09-26T16:42:47Z")

</div>

Hi @btsinfo - sorry for the late reply.

Your scenario is better covered by the profiler based agent: [Profiler Auto instrumentation | APM .NET Agent Reference [1.12] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-auto-instrumentation.html)

That does not require any code change.
