locked
Webpart not registered as safe RRS feed

  • Question

  • Hi,

    I have a SP site where this site runs under the 2 URLs. First is http://<Computer name>/<SiteName> and 2nd is https://<someName>.com/<SIteName>

    Now the problem is Webpart runs fine under the 1st URL but while browsing through the 2nd Url it is giving the Error:

    Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.
    Thanks
    Parth


    Thanks, Parth
    Thursday, February 10, 2011 6:01 AM

Answers

  • Hi,

    >2nd is https://<someName>.com/<SIteName>

    Is second site is running on different port? If yes then you have to make a safe control entry in your web.config file of second web application.

    I guess, you have extended the web application and you are using host header for second site.

    Please correct me if i am wrong


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    • Marked as answer by Leoyi Sun Monday, February 14, 2011 7:58 AM
    Thursday, February 10, 2011 8:25 AM
    Moderator
  • Make sure that if you have not put your dll file in GAC then you need to put it on both port bin folder.

    By the way, Make below change in your web.config file to know the actual error.

    1. Open up your sites web.config, and make the standard custom errors edit. You want it to be < customerrors mode="Off"/>
       2. Then, search for the CallStack="false" and change it to CallStack="true", you should find this in the "<safemode>" node.

    Let us know the result


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    • Marked as answer by Leoyi Sun Monday, February 14, 2011 7:58 AM
    Thursday, February 10, 2011 11:27 AM
    Moderator

All replies

  • Hi,

    >2nd is https://<someName>.com/<SIteName>

    Is second site is running on different port? If yes then you have to make a safe control entry in your web.config file of second web application.

    I guess, you have extended the web application and you are using host header for second site.

    Please correct me if i am wrong


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    • Marked as answer by Leoyi Sun Monday, February 14, 2011 7:58 AM
    Thursday, February 10, 2011 8:25 AM
    Moderator
  • No, We have not configure the second site (https) on the different port but the same site We have Extended the Site using "Central Admin" please let me know if i should make changes in the Web.Config.


    Thanks, Parth
    Thursday, February 10, 2011 8:49 AM
  • I have added the Safecontrol inside the Web.Config File. but still the same error persist.

     


    Thanks, Parth
    Thursday, February 10, 2011 11:24 AM
  • Make sure that if you have not put your dll file in GAC then you need to put it on both port bin folder.

    By the way, Make below change in your web.config file to know the actual error.

    1. Open up your sites web.config, and make the standard custom errors edit. You want it to be < customerrors mode="Off"/>
       2. Then, search for the CallStack="false" and change it to CallStack="true", you should find this in the "<safemode>" node.

    Let us know the result


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    • Marked as answer by Leoyi Sun Monday, February 14, 2011 7:58 AM
    Thursday, February 10, 2011 11:27 AM
    Moderator