0

Solution contains 2 projects: Main Web app project and Webjob project.

The main web app currently utilizes Elmah to log errors. I followed the following link and implemented Elmah logging in webjob app.

The problem is I have the main webapp instance and a slot which are interchanged on commit build. Due to this the applicationName to be put in app.config also changes. How do I keep the applicationName constant so that I have a single elmah.axd view to see all errors with a particular instance.

<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ErrorLog" applicationName="/LM/W3SVC/5/ROOT"/>
Shyamal Parikh
  • 2,988
  • 4
  • 37
  • 78
  • I'm not sure I understand the problem, and with the lack of responses, maybe that's the case for others as well. Are you trying to hard code an application name or? – ThomasArdal Oct 10 '17 at 05:22
  • Yes, I am trying to hardcode the application name, am all ears for an alternative solution. – Shyamal Parikh Oct 10 '17 at 12:26

1 Answers1

0

Normally, if we use azure web app slot. We will publish project to both two slots(e.g production and development).

Each two slots will have its own web application and web jobs. If you use azure web app swap to swap the production and development slots.

Both the web application and webjobs will be swapped. In my opinion, this keep the appsetting's application name always constant(development's log always log with the development application name).

Brando Zhang
  • 22,586
  • 6
  • 37
  • 65