1

When we are logged in SharePoint, site Web.config file its get updated with following line.

<SafeControl Assembly="MyCustomAssembly" Namespace="MyCustomNamespace" TypeName="*" Safe="True" />

from web.config if we remove this line and i did iisreset.

Again this same line generating in web.config file.

so i am getting the same error again.

How to resolve this issue?

why its happening ?

enter image description here

1

<SafeControl> must reside in the <SafeControls> element. See SafeControls Element (Solution).

  • yes but this tag was automatically added in inside of <system.serviceModel> tag. why this happening ? – Elina Aug 10 '17 at 5:50
  • This would be due to incorrect configuration of your (likely) WebConfigModification configuration. – Trevor Seward Aug 11 '17 at 14:52
0

When you install the solution then it should registered safe control like below. I think u have to update ur manifest.xml file. or manully update the web.config.

<SafeControls>

        <SafeControl Assembly="MyCustomAssembly" Namespace="MyCustomNamespace" TypeName="*" Safe="True" />

  </SafeControls>
  • it was adding inside the <system.serviceModel>.If manually i updated the web.config also after few minutes again it was adding. – Elina Aug 10 '17 at 5:13
  • what u have in ur manifest.xml file? – Waqas Sarwar MVP Aug 10 '17 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.