Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Import Webparts

Status
Not open for further replies.

asiruvur

Programmer
Mar 24, 2005
9
US
Hi,

I recently started working on Sharepoint Services. I developed a webpart and tried to import it on my site but the error message says:

"A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe."

I have googled a lot to find the solution. Every where it says change the SafeControl in <localfolder>:\inetpub\
but I couldn't find the web.config at that location.

I tried changing the web.config @
G:\Program Files\Common Files\Microsoft Shared\web server extensions\60\CONFIG\web.config

but no use

I'm running both Sharepoint Services and Visual Studio .net on the same machine. When I created the assembly it was not strong named. Does it make a difference.

Any help is appreciated
 
Hello,

When building a webpart you should have a kepair assigned to it in the assembly, this programming task from microsoft explains the whole thing.

Also the webconfig your looking for is in the folder that is assigned to the virtual webserver. Go to IIS and check the properties of you sharepoint webserver to see wich folder is assigned the web.config should be in the root of the folder.

goodluck
 
ChaserNL,

Thank you for the reply. I'm working on it.
 
Ow and i just noticed the second part of your question
"I'm running both Sharepoint Services and Visual Studio .net on the same machine"

no this is not a problem this is infact the "best" way to develope. And you always have to strong name your projects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top