# Cannot make APM Client work on IIS

**URL:** <https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [December 9, 2019, 7:21pm UTC](https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179 "2019-12-09T19:21:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JValenzani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvalenzani/32/59147_2.png) [@JValenzani](https://discuss.elastic.co/u/JValenzani)\
**Post date:** [December 9, 2019, 7:21pm UTC](https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179/1 "2019-12-09T19:21:30Z")

</div>

I've tried the Elastic APM with Java applications under Tomcat and worked like a charm. Now, i'm trying to monitor a .NET (4) application running on IIS7.  
The documentation is very vague on how to get the agent running. Just a couple of examples adding calls on the source code.  
In my case, i don't have access to the source code, just to the server and the application. It's possible to implement application monitoring without modifying the source code?

If the answer is Yes, this is what i've done so far:

- Installed nuget cli on the server.

- Downloaded the packages (Elastic.Apm.AspNetFullFramework)

- I've got all this packages:  
Elastic.Apm.1.2.0  
Elastic.Apm.AspNetFullFramework.1.2.0  
Newtonsoft.Json.11.0.2  
System.Diagnostics.DiagnosticSource.4.0.0  
System.Threading.Tasks.Dataflow.4.9.0

- Moved all dlls (version 4.0 or 4.5) to wwwroot/app/bin

- Modified web.config to load dll and set APM server dns:  
...  
\<modules\>  
\<add name="ElasticApmModule" type="Elastic.Apm.AspNetFullFramework.ElasticApmModule" /\>

- Restarted Site.

Result:

Error 500

ConfigurationErrorsException  
Cannot load type 'Elastic.Apm.AspNetFullFramework.ElasticApmModule'. on System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)

Any thoughts?

Thanks.

**Kibana version** : 7.4  
**Elasticsearch version** : 7.4  
**APM Server version** : 7.4  
**APM Agent language and version** : .NET Elastic.Apm.AspNetFullFramework 1.2.0  
**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: NuGet

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [December 9, 2019, 8:54pm UTC](https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179/2 "2019-12-09T20:54:45Z")

</div>

Hi @JValenzani - welcome to the forum!

Judging by the error it seems to me that IIS doesn't know which DLL actually contains `ElasticApmModule` class. The way to fix it is [to include the name of the assembly in which this type resides](https://stackoverflow.com/a/46426545/973581), which is `Elastic.Apm.AspNetFullFramework`

```
 type="Elastic.Apm.AspNetFullFramework.ElasticApmModule, Elastic.Apm.AspNetFullFramework" />

```

The configuration described in [the documentation](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup.html#setup-asp-net), that you used as well, seems to work for [`AspNetFullFrameworkSampleApp` sample application](https://github.com/elastic/apm-agent-dotnet/tree/master/sample/AspNetFullFrameworkSampleApp) because `Elastic.Apm.AspNetFullFramework` assembly is [one of the explicit `AspNetFullFrameworkSampleApp`'s dependencies](https://github.com/elastic/apm-agent-dotnet/blob/master/sample/AspNetFullFrameworkSampleApp/AspNetFullFrameworkSampleApp.csproj#L203) and loaded automatically with the application so IIS finds `ElasticApmModule` without any problem. We need to fix that part of the documentation.

---

<div class="post-metadata">

**Author:** ![JValenzani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvalenzani/32/59147_2.png) [@JValenzani](https://discuss.elastic.co/u/JValenzani)\
**Post date:** [December 10, 2019, 1:51pm UTC](https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179/3 "2019-12-10T13:51:42Z")

</div>

Hi Sergey, thanks for the quick answer. Adding the type "Elastic.Apm.AspNetFullFramework" fixed the problem.  
I'm not getting data in the server, but probably is something missing in the agent config.

Thank you!

---

<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:** [December 31, 2019, 9:51am UTC](https://discuss.elastic.co/t/cannot-make-apm-client-work-on-iis/211179/4 "2019-12-31T09:51:51Z")

</div>

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