Results 1 to 4 of 4

Thread: Sharepoint: Adding entry in web.config through wsp manifest file

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    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

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  3. #3

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    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.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width