views:

3021

answers:

3

I am trying to deploy my first custom aspx page in sharepoint:

  • Windows Server 2003
  • Microsoft Visual Studio 2008
  • VSeWSS 1.3
  • Latest Sharepoint Patches as of May 28, 2009

I am following this detailed howto:

http://geeksconnected.com/jamil/Lists/Posts/Post.aspx?ID=19

Unfortunately, it quickly becomes incomplete toward the bottom. I am running into two issues thus far:

  1. How do you grant the VSeWSS Administrator privileges so that the "Deploy" option will work in Visual Studio?

  2. It cuts off half of the <SafeControl> tag in the example, and I am not sure what to put after the PublicKeyToken= option. All current attempts completely break sharepoint.

Any solutions and explanations would be appreciated. Thanks in advance for any help.

A: 
  1. You probably need an account which is allowed to run stsadm.

2.The safe control tag should look like the following:

<SafeControl Assembly="[Assembly Name]" Namespace="[Namespace]" TypeName="*" Safe="True" />

To get the public key token you first have to sign the assembly (properties on the project->signing). Then you can build it and drop in the GAC (C:\Windows\assembly) and read the public key token directly in your explorer window.

JMD
Thanks for the answer on the SafeControl tag. As for the permissions, I understand the concept, but I am not sure under which group ID the VSeWSS services run. I need to know which group/user to add to the administrator group. Some Googling has people pointing to a NetServices group, but that does not seem to exist in my groups list.
Corey O.
+1  A: 

Do yourself a favor and use WSPBuilder and its companion SPVisualDev instead of VSeWSS. Both of these tools are on CodePlex.com

They will take care of your safecontrols problem by adding that into the WSP file that any SharePoint administrator can install. (Frankly, modifying web.config by hand in a SharePoint environment is a big no-no in my mind, especially safecontrols)

They will also not need the elaborate 2-project spoof just to have a codebehind for an ASPX page that the article you quoted promotes. SPVisualDev will give you the option to do 'add new item' in visual studio and select a new Page or UserControl with codebehind, and take care of the deployment through WSP. Easy as!

ArjanP
VSeWSS allows one to manually edit the manifest file. No manual editing of web.config required.
Chloraphil
+2  A: 

Did you follow the instructions for post-install configuration of VSeWSS 1.3? http://blogs.msdn.com/steve_fox/archive/2009/03/18/vsewss-1-3-post-install-configuration.aspx

Chloraphil
Watch out for the Network Service suggestion in that link. That may not be the best way to confiugre a production SharePoint farm.
Tom Resing
For sure. I wouldn't recommend deploying directly from Visual Studio to a production environment. VSeWSS does generate a .wsp solution file that I use for deployment to a production file.
Chloraphil