Alexander Anikin's blog

My personal blog

Archive for April 2010

Office Web Apps RTM Activation

leave a comment »

Hi,

Office Web Apps in RTM edition makes much work for you: creating services, starting features.

But in some cases it’s not activate feature on site collection.

Example: you are installing SharePoint 2010 for sandbox puposes. After Configuration Wizard finished you starts Office Web Apps setup. So you haven’t site collection!

For activations use this script:

$webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id
$singleSiteCollection = Get-SPSite -Identity
http://<server>
Enable-SPFeature $webAppsFeatureId -url http://<server>

Advertisements

Written by Alex Anikin

April 27, 2010 at 12:36 pm

Posted in Sharepoint

SharePoint User Group in N.Novgorod – 23.05.2010

leave a comment »

Written by Alex Anikin

April 23, 2010 at 12:46 pm

Posted in Uncategorized

Excel Web Viewer and UNC Files

leave a comment »

I’ve found several things for Excel Web Access (Excel Services):

1. Excel Services (so Excel Web Access) works fine with UNC path "out-of-the-box"

http://server/_layouts/xlviewer.aspx?id=file://sp001/excel/test.xlsx

and we can !view! files using forward-link. 

2. file://sp001/excel/ – trusted UNC Path for Excel Sevices. We just need make user files path as Excel Sevices trusted path and think about rights.

3. Bad – file opened from UNC couldn’t be edited, just files stored at Sharepoint Server.

4. It’s possible to override xlViewer.aspx to get our parameters or make some logic (push, poll and so on) if needed I think – hardcode.

I’m a glad a little.

Written by Alex Anikin

April 23, 2010 at 12:42 pm

Posted in Sharepoint

Sharepoint 2010: Debug and trace into Microsoft.Sharepoint.dll using Reflector

leave a comment »

 

Hi all!

Task 1. Debuging your event reciever

We have 2 options in Visual Studio 2010 – farm or sandboxed solution.

a. Creating and deploing sandboxed solution – all OK, but many constraints. Not useful in many cases.  Good article: http://soumya-sharepointblog.blogspot.com/2010/01/sharepoint-2010-sandbox-solutions.html

For debug Sandboxed Solutions attach to SPUCHostService.exe

b. Visual Studio 2010 Beta has the problem with deploing solutions to farm:

1. Turn off VS scripts for feature activation.

image

There, you can see option Sandboxed Solution. We can switch this option.

2. Copy Feature files to C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEFEATURES

3. Register feature using

c:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14BIN>stsadm -o installfeature -force -filename "Sample_Feature1feature.xml"

c:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14BIN>stsadm -o activatefeature -force -filename "Sample_Feature1feature.xml" -url http://sp001

3. At Project Properties add lines to Post-Build Events for registering my dll in GAC:

"C:Program Files (x86)Microsoft SDKsWindowsv7.0ABinNETFX 4.0 Toolsx64"gacutil.exe -u Sample
"C:Program Files (x86)Microsoft SDKsWindowsv7.0ABinNETFX 4.0 Toolsx64"gacutil.exe -i "C:UsersaanikinDocumentsVisual Studio 2010ProjectsSampleSamplebinDebug"Sample.dll

iisreset –noforce (I’m not sure need it, but I do it.)

image

4. Attach to w3wp.exe processes and debug your code.

Task 2. Step into Microsoft.Sharepoint.dll using Reflector Pro

1. Install Reflector Pro and enable integration with Visual Studio 2010 and Windows Explorer (we need this to open Microsoft.Sharepoint.dll from GAC).

2. Open C:WindowsassemblyGAC_MSILMicrosoft.SharePoint14.0.0.0__71e9bce111e9429cMicrosoft.SharePoint.dll using .NET Reflector menu button Choose Assemblies fo Debug.

3. Debug your solution and set breakpoints to Sharepoint reflectored sources. Visual Studio will stops everywhere you need.

Written by Alex Anikin

April 10, 2010 at 1:27 pm

Posted in Sharepoint

Sharepoint 2010 Beta Farm Configure Errors

leave a comment »

I’ve got a troubles in farm creation with separate Microsoft SQL Server 2008 yesterday.

1. Need MS SQL 2008 SP1 CU2

sqlreq

 

2.  Argument null exception and no more info.

Event log error: Cannot connect to SQL Server. db002 not found. Additional error information from SQL Server is included below.

Resolution:

1. turn off firewal on both sides

2. enable and start SQL Agent and Browser

3. account for SQL Server must be dbcreator, securityadmin, serveradmin

Written by Alex Anikin

April 8, 2010 at 8:11 am

Posted in Sharepoint

Setup Microsoft Virtual Server 2005 R2 SP1 on Windows 7 Prof

leave a comment »

 

1. Disable the application compatibility fixes. You first need to disable all the application compatibility fixes that would stop you from installing Virtual Server. In Windows 7, bring up the local Group Policy editor and Computer ConfigurationAdministrative TemplatesWindows ComponentsApplication Compatibility and enable all of the “Turn off” entries.

2. Then go to the Computer ConfigurationAdministrative TemplatesSystemTroubleshooting and DiagnosticsApplication Compatibility Diagnostics folder and disable all of the entries there.

3. Reboot to ensure the settings take effect. You could, I suppose, just do a gpupdate /force, but I prefer to reboot.

4. Install Virtual Server. Download the binaries from Microsoft .com and install it.

 

And big surprise – I noticed the error icon at the bottom left of the IE8 window and an error message: “Error on page”:

Solution:  for IE8 turn on Compatibility View!

Written by Alex Anikin

April 1, 2010 at 3:06 pm

Posted in Virtualization