Welcome to MSDN Blogs Sign in | Join | Help

Neue Inhalte auf www.MyMSDN.de

 

 

Neue Inhalte auf MyMSDN!

 

In der Rubrik „Enterprise Templates und Visual Studio Solutions“, werden Visual Studio Templates für bestimmte Entwicklungsaufgaben bereitgestellt sowie Beispielprojekte aus „Proof of Concepts“die im Microsoft Technology Center erstellt wurden. http://www.microsoft.com/germany/msdn/knowhow/VisualStudioTemplateProjekte/templates.mspx

 

In der Rubrik  „Detaillierte Anleitungen und Erfahrungen aus Projekten“, werden Erfahrungen und Vorgehensweisen veröffentlicht, die in realen Projekten oder „Proof-of-Concepts“ gemacht und entwickelt wurden. http://www.microsoft.com/germany/msdn/knowhow/VisualStudioTemplateProjekte/projects.mspx

 

Falls sich jemand dafür interessiert hier auch entsprechenden Content zu veröffentlichen, kann er mich gerne kontaktieren.

 

Viele Grüße

 

Martin Vollmer 

 

 

Missing Performance Counters

A few days ago, I noticed that most of the usual performance counters were not available in perfmon. When I started perfmon and selected "Performance Monitor" in the TreeView on the left hand side I got an Error Message "Cannot initialize MMC Snap-In". But If I clicked on the same item the second time it works, but then I tried to use some of the standard performance counters like Processor, Logical Disk or Memory, they were missing in the List. Also all .NET and SQL performance counters were not available. Even a system reboot (Windows Vista SP1) did not bring back the standard performance counters.

After some more investigation I found the following knowledge base article:

How to manually rebuild Performance Counter Library values.
Article ID: (KB)300956

This article is originally related to Windows Server 2003 and Windows 2000, but I tried the part which is listed under Rebuilding all Performance Counters worked for me. Just open a Command Prompt running under administrator rights and do the following:

C:> cd windows\system32

C:\Windows\System32> lodctr /R

After that all Performance Counters were available again!

Hope this helps anybody else too

Martin

How to install Visual Studio Extensions for Windows Sharepoint Services 1.2 on Vista or Windows XP (VSeWSS.exe)

Yesterday I blogged a solution to develop Sharepoint stuff on a workstation OS. Afterwards I did some additional research in the Web and I found a very simple solution to install the VSeWSS.exe 1.2 on a Vista or XP machine. You need only one Registry entry to fool the Installer, so that you can simply install the package on the machine. I checked this on my second test machine and it works:

Add the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]

Then add the string Value:

"Sharepoint"="Installed"

The solution was originally posted by Fernando Felman.

http://fernandof.wordpress.com/2008/02/11/how-to-install-the-sharepoint-2007-vs-2005-extensions-on-a-workstation/

I will also add this to my blog. This makes live a little bit easier ....

Best Regards

Martin

Remote Sharepoint Development (WebParts) with Visual Studio 2008 and VSeWSS 1.2!

Several people already contacted me, asking for the "hack" to develop Sharepoint stuff like Webparts remotely on Vista or Windows XP with the newer version of VSeWSS 1.2 (Visual Studio Extensions for Windows Sharepoint Services). I didn't had the time to reverse engineer the new installer and so I was really happy, when I received a mail yesterday, that somebody else has done the work for us. Many thanks to Mike Valentine from Cleveland, Ohio for doing the dirty work :-). He asked me, whether I will post the new hack for VS 2008 and WVeWSS 1.2 and so here it comes

The Copy Jobs are the same as described in my former blog posts.

Locate the Sharepoint Templates installed on the server environment and copy them to your Workstation User Templates.
You have to navigate to: “C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\ProjectTemplates\CSharp” and copy the whole Sharepoint Directory to your user Templates Folder on your Workstation. The Path is normally: “C:\Users\\Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#”.
If you want to develop in VB.NET do the same for the Sharepoint Folder in: “C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\ProjectTemplates\VisualBasic” And copy it to: “C:\Users\\Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Basic”
Do the same for the Sharepoint Folders in the ItemTemplates Directory. There is only one for CSharp. Navigate to: “C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\ItemTemplates\CSharp” And copy the Sharepoint Folder to: “C:\Users\\Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#”
Copy the complete Folder “Microsoft Sharepoint Developer Tools”, which can be found in “C:\Program Files” on the Server or VPC to your Workstation machine in the same location.

And here is the new reg file, just copy the whole stuff into notepad and save it as "vs2008wss.reg" for example. and doubleclick the file to wrtite the Entries into the Registry.

Mike wrote me, that the installer is calling "devenv /setup" after writing the Registry Entries. We don't know, whether this is necessary. I also did so and it works.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{f120f40f-f543-4d15-8bbb-4f4b174c6a23}]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{f120f40f-f543-4d15-8bbb-4f4b174c6a23}\/1]
"TemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\package 1.2"
"SortPriority"=dword:00000064

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{aa9054f9-fbd5-405d-9c31-9f544db39238}]
@="Microsoft.SharePoint.Tools.VisualBasicSPProject"
"Class"="Microsoft.SharePoint.Tools.VisualBasicSPProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\package 1.2\\VSeWSS.dll"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{f120f40f-f543-4d15-8bbb-4f4b174c6a23}]
"ProductName"="Visual Studio extensions for Windows SharePoint Services 1.2"
"ID"=dword:00000064
@="Microsoft.SharePoint.Tools.SdtPackage, VSeWSS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
"CompanyName"="Microsoft"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"MinEdition"="Standard"
"ProductVersion"="12.0002.0000.0000"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\package 1.2\\VSeWSS.dll"
"Class"="Microsoft.SharePoint.Tools.SdtPackage"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{f120f40f-f543-4d15-8bbb-4f4b174c6a23}\SatelliteDll]
"DllName"="VSeWSSUI.dll"
"Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\package 1.2\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{593b0543-81f6-4436-ba1e-4747859caae2}]
@="CSharpSPProjectFactory"
"DisplayName"=""
"DefaultProjectExtension"="csproj"
"DisplayProjectFileExtensions"="SharePoint Project Files (*.csproj);*.csproj"
"Language(VsTemplate)"="CSharp"
"Package"="{f120f40f-f543-4d15-8bbb-4f4b174c6a23}"
"PossibleProjectExtensions"="csproj"
"ProjectTemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\pacakge 1.2"
"ShowOnlySpecifiedTemplates(VsTemplate)"=dword:00000000
"TemplateGroupIDs(VsTemplate)"="SharePointItemTemplateGroupID"
"TemplateIDs(VsTemplate)"="ContentType,EventReceiver,FieldControl,ListDefinition,ListDefinitionFromContentType,ListInstance,Module,Template,WebPart"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{3c457a27-5d8e-4fab-b1de-c18682146452}]
@="Microsoft.SharePoint.Tools.CSharpSPProject"
"Class"="Microsoft.SharePoint.Tools.CSharpSPProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\package 1.2\\VSeWSS.dll"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{ec05e597-79d4-47f3-ada0-324c4f7c7484}]
@="VisualBasicSPProjectFactory"
"DisplayName"=""
"DisplayProjectFileExtensions"="SharePoint Project Files (*.vbproj);*.vbproj"
"Package"="{f120f40f-f543-4d15-8bbb-4f4b174c6a23}"
"DefaultProjectExtension"="vbproj"
"PossibleProjectExtensions"="vbproj"
"ProjectTemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0\\pacakge 1.2"
"Language(VsTemplate)"="VisualBasic"
"ShowOnlySpecifiedTemplates(VsTemplate)"="0"
"TemplateGroupIDs(VsTemplate)"="SharePointItemTemplateGroupID"
"TemplateIDs(VsTemplate)"="ContentType,EventReceiver,FieldControl,ListDefinition,ListDefinitionFromContentType,ListInstance,Module,Template,WebPart"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\ToolWindows\{b8772634-ac0a-4afc-ad74-e655d9ecef02}]
"Name"="Microsoft.SharePoint.Tools.Forms.SPToolWindow"
@="{f120f40f-f543-4d15-8bbb-4f4b174c6a23}"
"Style"="Tabbed"
"Window"="{3ae79031-e1bc-11d0-8f78-00a0c9110057}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\InstalledProducts\SdtPackage]
"Package"="{f120f40f-f543-4d15-8bbb-4f4b174c6a23}"
"UseInterface"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Menus]
"{f120f40f-f543-4d15-8bbb-4f4b174c6a23}"=",1000,1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SharePoint Developer Tools 9.0]
"VSTemplates Install Path"="C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\ProjectTemplates\\CSharp\\SharePoint"
"Installed Language"=""
"Install Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools 9.0"

 

 !! Absolutely no warranties, use at your own risk !!




That’s it! Hope this procedure is helpful to others, who want to develop Web Parts for MOSS 2007 now with Visual Studio 2008 and the newer Visual Studio Extensions for Windows Sharepoint Services, VSeWSS 1.2

Calling external Web Services from ASP.NET Application

I tried to build an ASP.NET Application, which uses the Live Search Web Service. I copied the sample code from the SDK (all stuff needed is available at : http://search.live.com/developer ) and pasted it in an ASP.NET Application. But calling the Search Web Service results in the following Error:

The remote name could not be resolved: 'soap.search.live.com'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote name could not be resolved: 'soap.search.live.com'

In Debug Mode I got an System.ServiceModel.EndpointNotFoundException

{"There was no endpoint listening at http://soap.search.live.com/webservices.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."}

The exactly same code worked fine in a console application. After some time I had the the right idea. If you create a new ASP.NET Web Application Visual Studio creates the virtual directory in IIS and an IIS Application, which runs in the DefaultAppPool and if you did not change the user account of this Application Pool it runs under the Builtin Account "Network Services"! This account is not allowed to call anything outside the local machine boundaries, so that was the reason why my Web Service Call to an external services fails.

So I created a new Application Pool that runs under a regular User Account and now the Web Service Call works fine!

There are often little things that make life harder :-)

Best Regards

Martin

New Registry File for Developing MOSS2007 Projects in a Workstation (XP or Vista)

Now that the new VSeWSS1.1.EXE is released it is time to update the infos on my blog. The steps are basically the same as desribed in my former blog posts regarding VSeWSS.EXE.

First of all you have to install VSeWSS1.1.exe on a Sharepoint Server 2007 machine or image. Then you have access to all the files, that you have to copy to your Workstation.

1. Locate the Sharepoint Templates installed on the server environment and copy them to your Workstation User Templates. You have to navigate to:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\CSharp”
and copy the whole Sharepoint Directory to your user Templates Folder on your Workstation. The Path is normally:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual C#”.
If you want to develop in VB.NET do the same for the Sharepoint Folder in:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\VisualBasic”
And copy it to:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual Basic”
Do the same for the Sharepoint Folders in the ItemTemplates Directory. There is only one for CSharp. Navigate to:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\CSharp”
And copy the Sharepoint Folder to:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ItemTemplates\Visual C#”
2. Copy the complete Folder “Microsoft Sharepoint Developer Tools”, which can be found in “C:\Program Files” on the Server or VPC to your Workstation machine in the same location.

3. In order to register the Projects, Packages and Templates on you Workstation machine you have to add several registry keys to your Registry. Here is the whole stuff, just copy and paste it in a text file and save it with a*.reg extension. Here are the Registry settings for VSeWSS1.1:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\CLSID]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\CLSID\{3c457a27-5d8e-4fab-b1de-c18682146452}]
@="Microsoft.SharePoint.Tools.CSharpSPProject"
"Class"="Microsoft.SharePoint.Tools.CSharpSPProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\VSeWSS.dll"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\CLSID\{aa9054f9-fbd5-405d-9c31-9f544db39238}]
@="Microsoft.SharePoint.Tools.VisualBasicSPProject"
"Class"="Microsoft.SharePoint.Tools.VisualBasicSPProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\VSeWSS.dll"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"ThreadingModel"="Both"


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{593b0543-81f6-4436-ba1e-4747859caae2}]
@="CSharpSPProjectFactory"
"DisplayName"=""
"DefaultProjectExtension"="csproj"
"DisplayProjectFileExtensions"="SharePoint Project Files (*.csproj);*.csproj"
"Language(VsTemplate)"="CSharp"
"Package"="{e57322ed-c1f7-4ac5-955e-d790d474d39e}"
"PossibleProjectExtensions"="csproj"
"ProjectTemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"
"ShowOnlySpecifiedTemplates(VsTemplate)"=dword:00000000
"TemplateGroupIDs(VsTemplate)"="SharePointItemTemplateGroupID"
"TemplateIDs(VsTemplate)"="ContentType,EventReceiver,FieldControl,ListDefinition,ListDefinitionFromContentType,ListInstance,Module,Template,WebPart"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{9e5d3e2d-e4e2-418e-8d80-2f0da9a94f9a}]
@="SdtProjectFactory"
"DisplayName"=""
"DefaultProjectExtension"="csproj"
"DisplayProjectFileExtensions"="SharePoint Project Files (*.csproj);*.csproj"
"Package"="{bc426e8f-098f-47de-ad66-d11676c41c66}"
"PossibleProjectExtensions"="csproj"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{ec05e597-79d4-47f3-ada0-324c4f7c7484}]
@="VisualBasicSPProjectFactory"
"DisplayName"=""
"DisplayProjectFileExtensions"="SharePoint Project Files (*.vbproj);*.vbproj"
"Package"="{e57322ed-c1f7-4ac5-955e-d790d474d39e}"
"DefaultProjectExtension"="vbproj"
"PossibleProjectExtensions"="vbproj"
"ProjectTemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"
"Language(VsTemplate)"="VisualBasic"
"ShowOnlySpecifiedTemplates(VsTemplate)"="0"
"TemplateGroupIDs(VsTemplate)"="SharePointItemTemplateGroupID"
"TemplateIDs(VsTemplate)"="ContentType,EventReceiver,FieldControl,ListDefinition,ListDefinitionFromContentType,ListInstance,Module,Template,WebPart"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}]
@="Microsoft.SharePoint.Tools.SdtPackage, SPDevTools, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
"ID"=dword:00000064
"Class"="Microsoft.SharePoint.Tools.SdtPackage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"CompanyName"="Microsoft"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"MinEdition"="Standard"
"ProductName"="SharePoint Developer Tools"
"ProductVersion"="12.0000.0000.0000"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}\SatelliteDll]
"DllName"="SPDevTools.dll"
"Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{e57322ed-c1f7-4ac5-955e-d790d474d39e}]
@="Microsoft.SharePoint.Tools.SdtPackage, VSeWSS, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
"ID"=dword:00000064
"Class"="Microsoft.SharePoint.Tools.SdtPackage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\VSeWSS.dll"
"CompanyName"="Microsoft"
"InprocServer32"="C:\\WINDOWS\\system32\\mscoree.dll"
"MinEdition"="Standard"
"ProductName"="Visual Studio extensions for Windows SharePoint Services 1.1"
"ProductVersion"="12.0001.0000.0000"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{e57322ed-c1f7-4ac5-955e-d790d474d39e}\SatelliteDll]
"DllName"="VSeWSSUI.dll"
"Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"


 

If you want to use it with Visual Studio 2008 you have to replace "\8.0\" with "\9.0\" in the whole .reg File.

If ypu want to use it with Visual Studio 2008 on the sharepoint server you have to replace "\WINDOWS\" with "\WINNT\"

There was an anouncement taht the official support for Visual Studio 2008 will be published in June 2008. So my investigation is helpful until then.

!! Once again. No Warranties use at your own risk !!

Installing the "Web Service Software Factory: Modeling Edition"

I just downloaded the Web Service Software Factory: Modeling Edition. I followed the instructions for installing the Source Code Installer with the Visual Studio Team Architect Edition. I noticed that there is one step missing in order to get the whole solution built. Before Building the Solution (Step 14) you should also remove the "Microsoft.Practices.FxCop.Rules.WcfSemantic.Tests" Project in the Folder Tests -> Unit Tests.

This Project references some of the previous removed projects (Step 9 and 10).

 Best Reagrds!

 Martin

Developing custom MOSS 2007 Sharepoint Workflows on a remote Workstation

Today I tried to do some Workflow Development for MOSS 2007 on my Vista machine (Workstation). After loading a sample Project I encountered the following Error in the Workflow Designer in Visual Studio:

Could not load file or assembly 'Microsoft.SharePoint.WorkflowActions.intl, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. 

 This DLL is located in the GAC on a MOSS Server 2007 Installation (Server or VPC). So in order to do the Developpment on a Workstation you have to copy two DLLs from your MOSS 2007 Server to your Workstation and add them to the GAC there. The only waay to copy the DLLs out of the GADC is by using the command line here is an example how to do this:

> cd \WINDOWS\assembly\GAC_MSIL\Microsoft.SharePoint.WorkflowActions.intl\12.0.0.0__71e9bce111e9429c     
> copy microsoft.sharepoint.WorkflowActions.intl.dll c:\     
> cd \WINDOWS\assembly\GAC_MSIL\Microsoft.SharePoint.WorkflowActions.intl.resources\12.0.0.0__71e9bce111e9429c
> copy microsoft.SharePoint.workflowactions.intl.resources.dll c:\

 !! Absolutely no warranties, use at your own risk !!




That’s it! Hope this procedure is helpful to others, who want to develop Workflows for MOSS 2007 now with Visual Studio 2005 or 2008 on a Workstation.

Best Regards Martin

Remote WebPart Development with Visual Studio 2008 for MOSS 2007

Today the Visual Studio Extensions for WSS are not supported with VS 2008. So the official way to develop Sharepoint Projects like WebParts is that you still have to use Visual Studio 2005 for that purpose. You can install VS 2005 ans VS2008 on the same machine, but why do I have keep the older version of Visual Studio just for Sharepoint Development.Therefore I tried to apply the same procedure described in my previous post for Visual Studio 2005 to my installation of Visual Studio 2008. The only thing that must be changed is the *.reg file which now should look like this:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{041d4811-6ee8-4c3a-8981-ac53f22cf9cc}]
@="Microsoft.SharePoint.Tools.SdtProject"
"Class"="Microsoft.SharePoint.Tools.SdtProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\CLSID\{c81fbc80-1a9b-4d76-81e4-bf729a27f9ac}]
@="Microsoft.SharePoint.Tools.Forms.DeployPropertyPage"
"Class"="Microsoft.SharePoint.Tools.Forms.DeployPropertyPage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}]
@="Microsoft.SharePoint.Tools.SdtPackage, SPDevTools, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
"ID"=dword:00000064
"Class"="Microsoft.SharePoint.Tools.SdtPackage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"CompanyName"="Microsoft"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"MinEdition"="Standard"
"ProductName"="SharePoint Developer Tools"
"ProductVersion"="12.0000.0000.0000"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}\SatelliteDll]
"DllName"="SPDevTools.dll"
"Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{9e5d3e2d-e4e2-418e-8d80-2f0da9a94f9a}]
"DisplayName"=""
@="SdtProjectFactory"
"DefaultProjectExtension"="csproj"
"DisplayProjectFileExtensions"="SharePoint Project Files (*.csproj);*.csproj"
"Package"="{bc426e8f-098f-47de-ad66-d11676c41c66}"
"PossibleProjectExtensions"="csproj"

#[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{bc426e8f-098f-47de-ad66-d11676c41c66}]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{bc426e8f-098f-47de-ad66-d11676c41c66}\/1]
@=""
"SortPriority"=dword:00000064
"TemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"

 

 !! Absolutely no warranties, use at your own risk !!




That’s it! Hope this procedure is helpful to others, who want to develop Web Parts for MOSS 2007 now with Visual Studio 2008.

Perfekt organisiert!

Microsoft und AIT veranstalten gemeinsam die Roadshow „Perfekt organisiert!“

Basierend auf fundierter Praxiserfahrung von mehreren Jahren Team System Expertise hat Microsoft gemeinsam mit der AIT (Applied Informations Technologies AG) Ihnen eine Abendveranstaltung der besonderen Art zusammengestellt. Lernen Sie wie Projektmanagement und -steuerung in professionellen Händen aussieht und wie der Visual Studio Team Foundation Server in praktischen Projektszenarien wirklich funktioniert.

Lassen Sie sich davon überzeugen wie auch Ihre Softwareentwicklung in Zukunft "Perfekt organisiert" werden kann und minimieren Sie Ihre Projektrisiken:

Direkt anmelden unter: www.aitag.com/tfsseminar

Viele Grüße

 Martin

Remote WebPart Development for MOSS 2007

!! Absolutely no warranties, use at your own risk !!


I started to try the whole thing, because if you want to install the Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions on a Vista Machine it will fail:




So it is not possible to install the extension on a developer workstation. The official way to develop MOSS 2007 WebParts is to work on a Windows Server 2003 with at least WSS 3.0 installed or to use a similar VPC environment. In the VPC case this means you need to have at least 2 GB of memory available, in order to spend 1 – 1.5 GB for the Sharepoint Server VPC.


Setting up the Server or VPC Environment:

1. First of all you need a Windows Server 2003 machine or VPC, where MOSS 2007 is installed.
2. Install Visual Studio 2005 on the machine or VPC.
3. Install all Updates from Windows Update including Service Pack 1 for Team Suite or Service Pack 1 for Express Editions. If you run on Vista install the Service Pack 1 Update for Vista
4. Install WSS SDK, Office Server SDK and Visual Studio 2005 Extensions.


Setting up the Developer Workstation:


1. You need a Windows XP SP2 or Windows Vista Machine with Visual Studio 2005 installed.
2. Install all Updates from Windows Update including Service Pack 1 for Team Suite or Service Pack 1 for Express Editions. If you run on Vista install the Service Pack 1 Update for Vista
3. You can optionally install WSS SDK an Office Server SDK also on your Workstation
4. Locate the Sharepoint Templates installed on the server environment and copy them to your Workstation User Templates. You have to navigate to:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\CSharp”
and copy the whole Sharepoint Directory to your user Templates Folder on your Workstation. The Path is normally:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual C#”.
If you want to develop in VB.NET do the same for the Sharepoint Folder in:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\VisualBasic”
And copy it to:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual Basic”
Do the same for the Sharepoint Folders in the ItemTemplates Directory. There is only one for CSharp. Navigate to:
“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\CSharp”
And copy the Sharepoint Folder to:
“C:\Users\<username>\Documents\Visual Studio 2005\Templates\ItemTemplates\Visual C#”
5. Copy the complete Folder “Microsoft Sharepoint Developer Tools”, which can be found in “C:\Program Files” on the Server or VPC to your Workstation machine in the same location.
6. In order to register the Projects, Packages and Templates on you Workstation machine you have to add several registry keys to your Registry. Here is the whole stuff, just copy and paste it in a text file and save it with a*.reg extension:


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\CLSID\{041d4811-6ee8-4c3a-8981-ac53f22cf9cc}]
@="Microsoft.SharePoint.Tools.SdtProject"
"Class"="Microsoft.SharePoint.Tools.SdtProject"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\CLSID\{c81fbc80-1a9b-4d76-81e4-bf729a27f9ac}]
@="Microsoft.SharePoint.Tools.Forms.DeployPropertyPage"
"Class"="Microsoft.SharePoint.Tools.Forms.DeployPropertyPage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}]
@="Microsoft.SharePoint.Tools.SdtPackage, SPDevTools, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
"ID"=dword:00000064
"Class"="Microsoft.SharePoint.Tools.SdtPackage"
"CodeBase"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package\\SPDevTools.dll"
"CompanyName"="Microsoft"
"InprocServer32"="C:\\Windows\\system32\\mscoree.dll"
"MinEdition"="Standard"
"ProductName"="SharePoint Developer Tools"
"ProductVersion"="12.0000.0000.0000"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{bc426e8f-098f-47de-ad66-d11676c41c66}\SatelliteDll]
"DllName"="SPDevTools.dll"
"Path"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{9e5d3e2d-e4e2-418e-8d80-2f0da9a94f9a}]
"DisplayName"=""
@="SdtProjectFactory"
"DefaultProjectExtension"="csproj"
"DisplayProjectFileExtensions"="SharePoint Project Files (*.csproj);*.csproj"
"Package"="{bc426e8f-098f-47de-ad66-d11676c41c66}"
"PossibleProjectExtensions"="csproj"

#[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\NewProjectTemplates\TemplateDirs\{bc426e8f-098f-47de-ad66-d11676c41c66}]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\NewProjectTemplates\TemplateDirs\{bc426e8f-098f-47de-ad66-d11676c41c66}\/1]
@=""
"SortPriority"=dword:00000064
"TemplatesDir"="C:\\Program Files\\Microsoft SharePoint Developer Tools\\package"

Double click the *.reg File or import it using Regedit. In order to load the new package file, you maybe must start Visual Studio from the command line with the option /ResetSkipPkgs. Start a Command Window (on Vista this should run as an administrator) and navigate to:

“C:\Progarm Files\Microsoft Visual Studio 8\Common7\IDE”

And start Visual Studio via the following command:

Devenv /ResetSkipPkgs

Now you should be able to create new Sharepoint Projects like WebParts. To doublecheck this, in Visual Studio 2005 navigate to the Menu File->New->Project the Dialog Box should look like this:




Now select the Web Part and click Ok. Visual Studio should create the appropriate Project Files. If you click on References in the Solution Explorer you will see that there is an unresolved reference to the “Microsoft.Sharepoint” Assembly. So you can not yet build the WebPart or other Sharepoint Projects on the Workstation. Therefore the next 2 steps are necessary.

7. The Sharepoint Assemblies (DLLs) are located in the following Folder on the Sharepoint Server Installation:

“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI”

I copied the complete folder to the same location on my Workstation, but you can also only copy the assemblies, which start with “Microsoft.Sharepoint.*” to any folder on your Workstation.

8. In order that Visual Studio can automatically resolve the references you should add the assemblies to the Global Assembly Cache” (GAC). You can use the command line tool gacutil.exe or use the “Microsoft .NET Framework 2.0 Configuration” which can be found through navigating to Control Panel, then select “Administrative Tools”.

9. Now you should be able to generate and build Sharepoint Server 2007 related projects on a remote Workstation.


Deploying the Webpart Assemblies to the Server machine or VPC:

There are several ways to deploy Webparts to MOSS 2007. But I describe one way, which makes it easy during the development cycle to deploy and remote debug Webparts on the Server or VPC. In the VPC case you should ensure that you have network connection to the running VPC image.
1. If you starting with a new project and you do not want to reduce MOSS Security to fully trust all installed assemblies. You should sign your WebPart with a strong name and add the following line to your “AssemblyInfo.cs” in your project:

[assembly: System.Security.AllowPartiallyTrustedCallers()]


2. After a successful build you should copy your WebPart Assemblies to the \bin directory of your MOSS 2007 Server. I do this by adding a post build step to the project:


Where <server> must be replaced with your server or VPC image name.
The post build step is configured to be executed “When the build updates the project output”.

3. The next step is to add a safe control entry to the web.config of the Server. This looks like:

<SafeControls>
.
.
.
<SafeControl Assembly="MOSS2007_Test_WebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b76147539a074d8d" Namespace="MOSS2007_Test_WebPart" TypeName="*" Safe="True" />

</SafeControls>

The web.config is also located in the bin Directory:
C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin
in a default installation.

4. Navigate with the Browser to your target Site.
5. Click on Site Settings-> Modify all Site Settings
6. Click on Galleries -> Web Parts
7. Use the New Button to populate your Web Part to the gallery
I f your Web Part is not in the list, do an iisreset and try again. Normally the iisreset is not neccessary, but in some cases …
8. Now you can modify any page in your site and add you webpart to the page.

Now after a new successful build, the Web Part is copied to the server and is ready to be debugged.

Remote Debugging of Web Parts in MOSS 2007

1. In order to enable the Visual Studio remote debugging, navigate to “C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86” and start the “msvcmon.exe” on the server.
2. On the workstation in Visual Studio go to Debug -> Attach to process
3. In the Qualifier Text Box enter your server name
4. Check the Box: Show processes from all users.
5. Select *all* w3wp.exe processes using the control key on the keyboard
6. Click on Attach
7. Entry your breakpoints in the source code file in Visual Studio
8. Navigate or just refresh the Page, which has your control embedded and wait the breakpoint to be hit.

That’s it! Hope this procedures are somehow helpful to others, who want to develop Web Parts for MOSS 2007.

Posted by martinv | 8 Comments

IIS stops handling *.svc requests after installing .Net 3.0 RC1

Hello,

I experienced this problem on two machines with Windows XP as OS, so I think other people may also run into this.

After uninstalling .Net 3.0 June CTP and all additional components (SDK, VS extensions for .Net 3.0 and WF), then installing .Net 3.0 RC1, IIS does not handle *.svc requests appropriate. A request like http://localhost/MyService/service.svc simply displays the service.svc file itself. So I checked whether the Http Handlers are registered in the web.config:

      <buildProviders>

            .

            .

        <add extension=".svc" type="System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

            .

            .

      </buildProviders>

 

and

    <httpHandlers>

            .

            .

      <add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

        validate="false" />

            .

            .

    </httpHandlers>

After I checked this I tried to register ASP.NET again manually by calling “aspnet_regiis /i” and “aspnet_regiis /r” from the command line, but still no success. The I tried to register WCF manually by calling “servicemodelreg /i” , this tool is located in the following directory “C:\WINDOWS\Microsoft.Net\Framework\v3.0\Windows Communication Foundation”. But this was not successful to activate *.svc processing.

Then I checked the Configuration of Extensions in IIS: Go to “Administrative Tools” and start “Internet Information Services” navigate to “Default Web Site” and right click on it in the tree view. Select “Properties” from the Popup Menu, then select the “Home Directory" Tab and click on the “Configuration” Button in the Dialog. In my case the entry for the extension *.svc was missing. I tried to add the *.svc extension by clicking on the “Add” Button and filling the Dialog:

Executable: C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll
Limit To: GET,HEAD,POST,DEBUG
Script Engine: checked
Check that file exists: unchecked

But the “Ok” Button keeps disabled, regardless of the entries in the dialog. It seems that somehow the security settings for the IIS Metabase are hosed, so that I could not add entries using this dialog, even if logged on with the local administrator account.

Now I tried to use IIS Metabase Explorer, this tool can be found in the IIS Resource Kit. In the tree view I navigated through “LM” to the “W3SVC” entry. Then I looked for the Scriptmaps entry in the List, double-clicked on it. Checked whether there is an entry for the *.svc extension in the list. If not, add a new entry by clicking on the “<new item>” in the list Insert this string in to the list “svc,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG”

I repeated this procedure for the ROOT entry in the tree view, which can be reached by navigating through “W3SVC” -> “1” -> “ROOT”. After closing the IIS Metabase Explorer I restarted IIS by calling “iisreset” from the command prompt, and the the WCF services hosted in IIS were processed as expected.

Hope this is helpful to someone else.

Regards

Martin Vollmer

 

Posted by martinv | 6 Comments

Welcome!

Hello,

Welcome to my Blog! I start blogging a little bit late, but I hope I can share some Information, that is interesting to others.

Best Regards

Martin Vollmer

 

Posted by martinv | 0 Comments
Filed under: ,
 
Page view tracker