Sharepoint: Adding entry in web.config through wsp manifest file
Hi,
What should be the entry in the manifest file of the WSP if I want to add these 3 items in the web.config?:
Code:
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Regards,
Popskie
Re: Sharepoint: Adding entry in web.config through wsp manifest file
Hello popskie,
I am not aware of a WSP being able to do this. Is this something that you have done before?
When we have had to do this, we have added code in the FeatureReceiver to modify the web.config file, and then remove it again when the Feature is disabled.
Gary
Re: Sharepoint: Adding entry in web.config through wsp manifest file
Gary not done this before I thought this is doable. Could you show me the code. Thanks.
Re: Sharepoint: Adding entry in web.config through wsp manifest file
Hey,
I don't have the code to hand, I would need to dig it up.
As a starting point, you would use the SPWebConfigModification class:
http://msdn.microsoft.com/en-us/libr...ification.aspx
Within your Feature activation code.
Gary