This project is read-only.

Error while adding new section using AddElement

Jul 23, 2009 at 7:46 AM


I want to add following assembly redirection section in web.config file inside "configuration" element.

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <assemblyIdentity name="assemblyName" publicKeyToken="7a327b92aa33d408" culture="Neutral" />
         <bindingRedirect oldVersion="" newVersion="" />

I am trying this with XmlFile.AddElement nut I am getting following error.

error: Message = Expression must evaluate to a node-set.

If anyone has tried with this, I will really appreciate if you share your example with me.

Thank you,