views:

53

answers:

3

I've got a working hello-world like webpart for my SPS3.0

I can compile, pack and deploy it using VS2008, makecab.exe and stsadm. So I know the theory of deploying sharepoint webparts.

My problem:

After I inserted an additional .webpart file, an elements.xml and a feature.xml to deploy the .webpart file and get knowledge about adding features to my webpart, the deployed webpart is missing its safe control entry in the web.config. But the dll can be found in the gac and my features are also deployed to the right folders. I didn't change anything in my manifest.xml especially not in it's -tag, because it definitely worked before i added my additional feature files.

Can anybody help me? Should i provide you some code snippets?

Thanks Stefan

+1  A: 

You can try WSPBuilder, it will automate and ease your deployment process.

denni
I already used wspbuilder for deployment and it worked great for local testing.Yes of course i could use wspbuilder, but i want to understand what i need to do to deploy manual or by script.Thats the only way i can pass my projects to anybody who wants to install/deploy the webparts to his own server(s) without my help or special permissions and so on.so i definitely don't want to use any tools, programms, addins or what ever.
Stefan Hennicken
If you're writing manifest.xml by-hand, you should make sure that your web parts namespace is registered properly there. It could be clearer if you can post your manifest file content.
denni
<Solution SolutionId="unique ID" xmlns="http://schemas.microsoft.com/sharepoint/"> <Assemblies><Assembly Location="wpinsert.dll" DeploymentTarget="GlobalAssemblyCache"><SafeControls><SafeControl Assembly="wpinsert, Version=1.0.0.0, Culture=neutral, PublicKeyToken=71a376e3467ca1c8" Namespace="wpinsert.wpinsert" TypeName="*" Safe="True" /></SafeControls></Assembly></Assemblies><DwpFiles><DwpFile FileName = "wpinsert.webpart" Location="\wpinsert\wpinsert.webpart" /></DwpFiles><FeatureManifests><FeatureManifest Location="wpinsert\feature.xml" /></FeatureManifests></Solution>
Stefan Hennicken
This is my manifest.xml. The files included in my feature.xml and elements.xml are deployed to th right locations. When the <featuremanifests> and the <dwpfiles> tags are not included and my code doesn't require them, my webpart is working properly.
Stefan Hennicken
A: 

As far as I can tell, you are trying to find out how to register your web part as a safe control without using any tools, etc. and also without admin rights. I think you will find this impossible since the safe control registration needs to happen in the web.config file and one way or another (WSP Builder, manually, script) this file needs to be modified. Only admins can do this as far as I know.

Joe Capka
I can add my safe control entry in the web.config by hand, but that's not the way I want to use, because I was already able to do this registration with my wsp-packagean a safe control-entry inside my manifest.xml.What I don't understand is why this isn't working anylonger after adding other elements to the solution und my manifest.xml. The elements I added are succesfully deployed.
Stefan Hennicken
A: 

If you are deploying your solution package using stsadm -o deploysolution, be sure that you are either using the allcontenturls parameter or that the url parameter is pointing to the correct web application. Which parameter you use (and how) will determine which web.config file(s) will have the safe control settings from manifest.xml applied to them.

Rich Bennema
First of at all, I've got to say thanks a lot for all your answers!I tried to deploy in both ways and changed the parameter as well as the scope in the manifest.xml
Stefan Hennicken