Adding a custom webpart to webpart page not a safe control issue

When I am adding a custom web part to web part page I am getting below error as a popup. Plz help if any body resolved the same issue.
Unable to add selected web part(s). (Web Part Name): 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
Regards.
Avinash.
Avinash

Hi,
Here you go. This should help you.
ow many times have you guys faced an issue like this ?"The type could not be found or it is not registered as safe." .To resolve this, make sure that you add safe controls around your web part assembly in web.config.
<SafeControls>
< SafeControl Assembly=”WebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abcdeddf23232″ Namespace=”Mywebpart.WebPart” TypeName=”*” Safe=”True” />
< /SafeControls>
The above ensure that your web part code is secured and wont let any anonymous users to access the web part.
Happy SharePointing ;-)
http://www.c-sharpcorner.com/Blogs/15024/
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • 'Page Not Found' wifi login issue after ios6 upgrade on iPad2

    After upgrading my iPad2 to ios6 and trying to connect to my wifi, my iPad2 tries to login for some reason to the Apple site but all that comes up is a 'Page Not Found' notification. I can browse the Apple site while in this browser but I can only go back, forward or cancel which then disconnects my iPad2 from my wifi.
    Is there a solution to this issue? I've already tried clearing my browser history and data and resetting the iPad2 but to no avail

    This one works for me...
    Reset networks settings: Settings>General>Reset>Reset Network Settings

  • Serious delay in loading web pages, not network,  but  safari issue

    After my last software update, I am experiencing delays in loading web pages, 30sec-minutes on safari. This occurs rather frequently, I'd say about 20%-30% of the times I visit certain web pages.
    One example web location I noticed this happening is (but its not the only one):
    http://www.theweathernetwork.com/weather/caqc0363
    Once I visit this page, sometime it loads fine, other times it takes forever (the load indicator stays on in the tab). Also, once the delay occurs, opening up new widows or new tabs to ANY other address are also delayed. It seem like all of safari is stuck waiting for responses. (safari itself is still running ok, it is responsive and there is NO spinning wheel of death).
    It is not a network issue. Often while waiting for safari to load, I launch firefox, visit the same page and read, meanwhile Safri still loading, even after trying to refresh...I also do other network tasks, ssh, ftp, email with no problem.

    Thanx! The numbers didn't help me anything, but your post reminded me: I found the DNS numbers that my ISP had provided that I had put in the Ethernet TCP/IP section in Network Preferences, and just copied and pasted them into my airport TCP/IP section. Worked great!

  • SharePoint 2013 site coll's created. Home page not displaying for any site collection in farm

    SharePoint 2013 site coll's created. Home page not displaying. Same issue for all site coll's in the farm. Done the basic checks. Any Ideas?

    Hi lakshita,
    Would you please check whether you can go to the page:
    http://siteurl/_layouts/settings.aspx page:
    http://siteurl/default.aspx page? If so, go to Site Features in site settings page, reactivate the Wiki Page home page feature, check the result.
    If not, please check whether there is related information in ULS log and event viewer log file? Does the page shows page not found or other errors? Check whether the site can be opened in other machine?
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Adding a custom Webpart in Application Page

    Hi , 
    I have an Application page, now i have got a requirement to add another custom webpart in that.
    I tried editing them in Sharepoint designer and adding a zone.. but its not supproting "runat=server" tag.
    Hence i m failing to add a custom webpart.
    Please help in this regard.

    Hi,
    Did you have the correct "register"  on your application page :
    <%@ Register TagPrefix="WpNs0" Namespace="CustomForm.MyWebPartName" Assembly="CustomForm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8834df117dc574a9"%>
    Have a look at this post :
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/fa372eec-4945-4297-afb1-c7183b007ff1/how-can-i-add-custom-webpart-to-application-page-or-site-page-in-visual-studio?forum=sharepointdevelopment
    Regards
    Gilles Martinez
    Twitter
    Blog
    Please mark as helpful/answer if this resolved your post

  • 404 error while adding custom webpart to the page

    I have my solution working in development environment. I deployed the wsp in prod env. While adding one specific webpart to the page leads to 404 error page.
    Thanks in advance.

    Hi,
    boreal123's reply makes sense.
    I would say that somewhere in your specific method call a web service, but it cannot find. You can check the related code snippet.
    I suggest that you can try to store the url in a webpart property so that it can be modified easily.
    Best Regards
    Guangchao chen
    TechNet Community Support

  • Created By and Created Date fields not showing up on Custom List form webpart

    Hi,
    I have added Custom Listform WebPart on "DispForm.aspx" of custom list. I need to display, out of box fields "Author" [Created By] and "Created" [Creation Date] on this custom list form webpart, I have added them on the webpart, following is the code behind of aspx page:
    <td width ="400px" valign= "top" class="ms-formbody">
    <xsl: value-of select = "@Author" disable-output-escaping = "yes"/>
    </td>
    However these fields are not showing/populating data on the form ?? Any inputs ???
    Regards

    Hi,
    I think that when you insert a custom list form web part you select “Item” content type, so custom list form is designed to display only the fields that are appropriate for that content type “Item”, but the item content type doesn’t contain the created and created by column, when you add the two columns, it will not find the field value. By default, the two columns will display at the foot of the list form using SharePoint:CreatedModifiedInfo.
    Hope it can help you.
    Xue-Mei Chang

  • Webparts and user in source variation site's page not propagating target site's page

    Hi ,
    I have issue with variation.
    1) User in people picker field in source page not propagating in target page
    2) Webparts in source page are not propagating in target page
    No error in ULS log.
    Thanks,
    Dinesh

    Hi Dinesh,
    Please provide some screenshots about your issue.
    Please make sure you have selected "Update Target Page Web Parts" under Site Collection Administartion->Variations.
    In addition, please check if the link is useful:
    http://technet.microsoft.com/en-US/library/ff628966(v=office.15).aspx
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How do I add multiple audio webparts to a page in SharePoint 2013?

    I need to add multiple media player webparts with audio files to a page in SharePoint 2013 so users can click the play button, listen to the file, then vote for the audio they like best. The problem is I can only get one audio to play at a time, and only
    in certain browsers. I can get them to work intermittently in a Chrome browser, but not IE 10. When I publish the page and click the play arrow, it played the first time. Then I added two more audio player webparts to the page, and linked them to different
    audio files (m4a and mpg). Now only one audio player will work, not the other 2.

    Hi
    Have you used this codeplex webpart
    https://mpwp.codeplex.com/
    Amit Kotha

  • How to place a WebPart in Publishing Page Content

    Hi,
    when you use a publishing page you are able through the ribbon to add existing webparts into the content of the publishing page.
    I would like to add programmatically a webpart into the content of the publishing page. I couldnt find anyting to that question on the web.
    Can someone help?
    regards
    yavuz
    Regards
    Yavuz
    www.ybog.net | Field notes on software development and technology

    Try below:
    http://sharepoint2010mind.blogspot.in/2012/06/add-webpart-programmatically-publishing.html
    http://sharepoint.stackexchange.com/questions/86026/add-programmatically-custom-web-part-to-page-without-web-part-zone
    PublishingWeb pWeb = PublishingWeb.GetPublishingWeb(web);
    string pageName = "NewPage.aspx";
    PageLayout[] pageLayouts = pWeb.GetAvailablePageLayouts();
    PageLayout newPage = pageLayouts[0]; //Body only type of page layout
    PublishingPageCollection pages = pWeb.GetPublishingPages();
    PublishingPage nPage = pages.Add(pageName, newPage);
    nPage.Update();using (SPSite site = new SPSite("http://win2008/sites/publishing"))
    SPWeb web = site.RootWeb;
    SPFile page = web.GetFile("Pages/Lipsum.aspx");
    page.CheckOut();
    using (SPLimitedWebPartManager wpmgr = page.GetLimitedWebPartManager(PersonalizationScope.Shared))
    Guid storageKey = Guid.NewGuid();
    string wpId = String.Format("g_{0}", storageKey.ToString().Replace('-', '_'));
    XmlElement p = new XmlDocument().CreateElement("p");
    p.InnerText = "Hello World";
    ContentEditorWebPart cewp = new ContentEditorWebPart
    Content = p,
    ID = wpId
    wpmgr.AddWebPart(cewp, "wpz", 0);
    string marker = String.Format(CultureInfo.InvariantCulture, "<div class=\"ms-rtestate-read ms-rte-wpbox\" contentEditable=\"false\"><div class=\"ms-rtestate-read {0}\" id=\"div_{0}\"></div><div style='display:none' id=\"vid_{0}\"></div></div>", new object[] { storageKey.ToString("D") });
    SPListItem item = page.Item;
    string content = item["PublishingPageContent"] as string;
    item["PublishingPageContent"] = content.Replace("|", marker);
    item.Update();
    page.CheckIn(String.Empty);
    http://sharepoint.stackexchange.com/questions/86026/add-programmatically-custom-web-part-to-page-without-web-part-zone
    http://www.zeemanj.net/?p=291

  • Custom tag cloud webpart based on keywords from a Term Set in the Term Store .

    Hi Guys
    Does anyone have developed a custom Tag Cloud webpart in SharePoint 2010? I'm
    looking for a custom Tag cloud based on keywords from a Term Set in the Term Store.
    Unfortunately
    out of the box Tag Cloud Web Part only reference the Social Tags from the User.
    in my case editors have created pages and tagged a page using terms from the Term store.
    What I would like to see is a web part which could display “Top Keywords”, and the output is something like this:
    http://electronicdiscovery.info/what-additional-features-would-you-like-to-see-in-sharepoint-word-cloud-survey-electronic-discovery/
    Thanks In advance
    Tanaji Chavan

    Hi  Ramakrishnaraja ,
    Thanks for sharing the links , i tried using web part in second link but that’s not working , have also gone through the code of that web part seems like it is referring to some list like
    "Categories" and "Posts"
    however I'm looking for a custom Tag cloud based on keywords from a Term Set in the Term Store .
    Thanks 

  • Displaying page contents (including webparts) on aggregation page

    CASE: Publisher can dynamically create pages in document library. Single page can have webparts embedded inside body text field. We have archive page which should aggregate all those pages and display them one under the other including webparts. In order
    to do it, we have a caml query which takes body of all pages and in user control we are creating html using repeater and eval function. As an output we get rendered just text of each page without webparts. Html output code for a single page with webpart looks
    as follow:
    <p>body test</p> <div class="ms-rtestate-read ms-rte-wpbox"><div unselectable="on" class="ms-rtestate-notify ms-rtestate-read dd3ab381-9fbc-457c-8eba-3c75ad29f5fd" id="div_dd3ab381-9fbc-457c-8eba-3c75ad29f5fd"></div>
    <div unselectable="on" id="vid_dd3ab381-9fbc-457c-8eba-3c75ad29f5fd" style="display:none"></div></div> <p><br /></p>
    Q: How to render webparts along with the rest of the (styled) content using a repeater?

    Hi,
    According to your description, you might want to aggregate the content of other pages into one page.
    Other than using Repeater, a workaround I would more recommended is that you can use the OOTB web part “Page Viewer Web Part” which can help to get the content of
    other pages easily.
    More information about
    Page Viewer Web Part:
    https://support.office.com/en-gb/article/Display-a-Web-page-on-a-SharePoint-page-by-adding-the-Page-Viewer-Web-Part-7f61feec-9b3d-4805-a960-07636ba59527
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Bind webpart with sharepoint page without code

    Hi
    If you want to add webpart on any page without code then
    1)go to  page in c#and open its element.xmland add the code shown in diagram.mention webpart order and zone name etc.
    Now the question is what to be added inside cdata tag?
    so that webpart will get attached with that page?
    Varsha Patil

    for This
    Go to webpart in visual studio
    find    webpartname.webpart    file
    copy the code code inside
    <webParts></webParts> tag inside that   <![CDATA[ ]]> tag of element.xml file.
    Then you can see that webpart is attached with page.
    mention proper webpart zone and zone order.
    Try to mentain all webpart projects in one solution.
    In this way you can avoid webparts programatically added into page and solution will get less complex
    Varsha Patil

  • Adding more custom tags to large product page

    Is there any way to add more custom tags past tag_custom4?

    That's not possible. Those 4 custom fields is all you can use.
    There is a keywords field which you can utilise maybe. I think the tag for
    it is .
    Cheers,
    Mario Gudelj
    www.twoblokeswithapostie.com - Talk to us before you tell your clients:
    "No, Business Catalyst can't do that."
       Adding more custom tags to large product page  created by AnneGerber<http://forums.adobe.com/people/AnneGerber>in
    eCommerce - View the full discussion<http://forums.adobe.com/message/5050617#5050617

  • Adding custom stamps to many pages in white space.

    Is there any way to add a custom stamp to every page of a PDF book and having it placed into the white space on the document? I have found a script that will do every thing except for the 'white space' part of my query, so I don't think I will have much luck.
    Watermarks will probably not work in this instance, the stamp needs to be noticible but not in the way, and the watermark will encouter the same placement problem (as it is preferable if the stamp/watermark is not getting the in way of the drawing pdf's content).
    Any help will be appreciated, just let me know if you need more clarification.

    The question is what do you mean by "white space"? Is it always the same area on the page (like a 2" margin), or is it a different location for each page, where there happens to be no text or images? The former is possible, the latter only partially, and is very difficult to implement with a script.

Maybe you are looking for