November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Ravindra,
Thanks for your response.
Is there any other way by using only configs like any transform files or any specific that episerver will pick the config from another config file.
Because the change which I wanted to make should exist all the time and it is part of add-on, so I may not have the initial call with me.
Regards,
Manik
Then you can apply it using the tranform file using the visual studio slow cheetah extension.
As I am using it from add-on , I don't have that feasibility of updating using transforms. Because add-on once installed it will copy my dlls and config. So I won't have the access to the code base. What I am developing is a add-on and in that add-on I require changes in web.config.
Regards,
Manik
I think you can use Episerver initialization module in your add on and then write the logic in initialization module to update the values in web.config. I haven't tried this but I think it should work.
Refer my above blog post to update the property in web.config
Writing in web.config on runtime is simply and strongly not recommended, the reason is obvious that there will be an application to recycle all the time, think can go more complex if the site is in the cloud. Site visitors will face downtime. and will not be able to do any further action on AddOn also.
There are many ways to manage this depending on requirements, hope you would have already visitied https://world.episerver.com/documentation/developer-guides/CMS/add-ons/Developing-Add-ons/
/K
if add-on is not deterministic - you might get into infite restart loop (app starts -> addon writes to web.config -> app restarts -> addon writes to web.config -> repeat..)
please don't touch web.config -> it's not recommneded.
if you need modify profile for example -> I would recommend to create web.config transform file (web.config.transform) where you can add your required changes. these changes will be applied during nuget package installation. more info - https://docs.microsoft.com/en-us/nuget/create-packages/source-and-config-file-transformations
Hi Guys,
I have a requirement of patching some properties to the existing web.config. I am trying to do it via Add-on so i dont have access to web.config but i want to make my property added to the web.config of the user who uses my Add-on.
Example :
For the below section in the web.config i want to add the language1 from a external config file which comes as part of add-on.
<profile defaultProvider="DefaultProfileProvider">
<properties>
<add name="Address" type="System.String" />
<add name="ZipCode" type="System.String" />
<add name="Locality" type="System.String" />
<add name="Email" type="System.String" />
<add name="FirstName" type="System.String" />
<add name="LastName" type="System.String" />
<add name="Language" type="System.String" />
<add name="Country" type="System.String" />
<add name="Company" type="System.String" />
<add name="Title" type="System.String" />
<add name="CustomExplorerTreePanel" type="System.String" />
<add name="FileManagerFavourites" type="System.Collections.Generic.List`1[System.String]" />
<add name="EditTreeSettings" type="EPiServer.Personalization.GuiSettings, EPiServer.Cms.AspNet" />
<add name="ClientToolsActivationKey" type="System.String" />
<add name="FrameworkName" type="System.String" />
<add name="Language1" type="System.String"/>
</properties>
</profile>
Do we have any thing similar like patching we can do for the same? Any specific process like transformation for environments in DXC.
Regards,
Manik