sharepoint - Why am I receiving a "type could not be found or is not registered as safe" error for my iframe web part? -


i working on farm solution in sharepoint 2013. want open page in iframe has been passed url src.

so made visual webpart .ascx file looks this:

<asp:htmliframe id="frm2"   runat="server" src="" height="600px" width="900"></asp:htmliframe> 

and in server side code (ascx.cs) set src property this:

frm2.src = "http://wwww.google.com"; 

however, web part generates following error:

web part error: web part or web form control on page cannot displayed or imported. type sharepointproject2.employee.employee, sharepointproject2, version=1.0.0.0, culture=neutral, publickeytoken=b6ac6e2971e56b29 not found or not registered safe. correlation id: c41f8d9d-2f85-509f-fa04-e1d0062edc96.

on going through problem found various solutions add web.config file.

<assembly location="myassembly.dll" deploymenttarget="globalassemblycache">       <safecontrols>         <safecontrol assembly="myassembly, version=1.0.0.0, culture=neutral, publickeytoken=3b7ec4bdc16ce8b2" namespace="myblog.webparts" typename="*" />       </safecontrols> 
  1. first of no web.config file in sharepoint project
  2. whenever open project in empty farm solution no web.config file there.
  3. so manually made web.config file xml file , add code it.

my application when running on windows server r2 working well, , people can view there in active directory, when stop application same error comes in safe mode.

please me understand how open external application (to have url) in iframe using server side code on sharepoint.

what approach should use, need use server side code , in provider hosted server?

thanks in advance guys

basant gera ​​


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -