Tuesday, November 27, 2012

The file does not contain valid publish settings for Windows Azure

Today, while trying to add a new Azure Cloud Service Project, I got an error when configuring my Azure profile. The message told me that the profile file freshly downloaded from Azure website was invalid and cannot be used in the Azure Project…

image

I’ve found in the Azure Tools 1.8 release not that the publishingsettings profile schema has been updated in this release and if your Azure website has been created with a previous release, the publishing profile file cannot be used in a 1.8 Azure project…

http://msdn.microsoft.com/en-us/library/windowsazure/ff683673.aspx#BK_October2012

“The format of .publishsettings files have changed with this release. You can't use an earlier version of the Windows Azure Tools to open a .publishsettings file that was created with the 1.8 version. You can use the 1.8 version to open .publishsettings files that were created with earlier versions of the tools. You can determine whether a .publishsettings file uses the new format by opening it in a text editor and looking for the SchemaVersion element. If the file contains the element<SchemaVersion="2.0">, the file is in the 1.8 format. If you try to use an earlier version to open a file that's in the 1.8 format, the file fails to open, and the following error message appears: The file File.publishsettings does not contain valid publish settings for Windows Azure.”

Solution:

- Create a new Azure Website

- Enter the profile parameters manually instead of using the publishing profile file.

Hope this helps !

Friday, November 16, 2012

Get Active Directory Group Members with PowerShell

I’ve not blogged for quite a while. Let’s come back with a small PowerShell script for retrieving Active Directory Group Members.

The bellow scripts retrieve all the Active Directory groups in a specific OU and count the number of members.

Import-Module ActiveDirectory

$groups = Get-ADGroup -searchbase "OU=MyOU,DC=myDC,DC=net" -filter *

$myArray = @()

foreach($g in $groups)

{

$members = Get-ADGroupMember($g)

$myObject = New-Object System.Object

$myObject | Add-Member -type NoteProperty -name Name -Value $g.Name

$myObject | Add-Member -type NoteProperty -name Count -Value $members.Length

$myArray += $myObject

}

$myArray


 

Wednesday, June 20, 2012

How to enable kerberos authentication on your SharePoint Website

Open the central admin website

Go to web application management, select your website and click on authentication providers

clip_image001

Select the provider you want to modify

clip_image002

Change the NTLM to Negotia (Kerberos) authentication mode

clip_image003

Run inetmgr, select your website and configure the authentication providers

clip_image004

Right click on Windows Authentication and select providers

clip_image005

Add the Negociate:Kerberos authentication mode to the list of enabled providers

clip_image006

Move the Negociate:Kerberos provider to the top of the list

clip_image007

Right click on Windows Authentication and select advanced settings

clip_image008

In the extended protection drop down list, select "Accept" and check the "Enable Kernel-mode" authentication checkbox

clip_image009

Now, you can connect to the website using kerberos authentication !

Friday, March 9, 2012

PowerGUI Error : Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime

I’m used to work with PowerGUI script editor for developing Powershell scripts for SharePoint 2010. This time, after updating PowerGUI with version 3.2.0.2237 and running a SharePoint cmdlet, I got this error:

“Microsoft SharePoint is not supported with version 4.0.30319.1 of the Microsoft .Net Runtime."

After investigations, this issue is caused by PowerGUI itself. To fix it, open the ScriptEditor.exe.config file placed in the PowerGUI installation directory. Remove of comment this line:

image

Restart the script editor and everything works again !

Friday, March 2, 2012

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

I just deployed a brand new .Net 4 website in IIS on my machine and get this error:

image

It seems that some .Net 4 modules have not been installed properly on this machine…

I managed to fix the issue quickly by running those two commands:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i


 



image

Tuesday, February 28, 2012

TFS Azure Preview

I’ve been waiting for a TFS Azure Preview invitation code a few days and it finally came to my mailbox. After playing a couple of hours with, my first impressions are more than good ! The cloud features are almost the same as the on premise version. The web portal is friendly and smooth as the upcoming release of TFS. Using the cloud for that kind of usage could be really valuable (availability, safety, on-demand !).

I have not seen communications regarding the future pricing of this Azure feature yet. But I’m pretty sure that it would interest a lot of developers !

image

If you want to test the preview, you can register on this site: http://tfspreview.com

You will receive an email from the MSFT team in a week giving you an registration code and 5 other codes for your friends.

Enjoy !

Friday, February 10, 2012

How to add SharePoint snapin to Power GUI script editor

1. Open Power GUI script editor

clip_image001

2. Select: Microsoft.SharePoint.PowerShell

clip_image002

3. Now, you can use PowerShell intellisense on SharePoint module !

clip_image003

Monday, February 6, 2012

How to generate a self-signed certificate from IIS

For test purposes, it is sometime useful to generate a dummy certificate on your test environment. You can do that by using different ways:

- Create a certificate request and send it to a trusted Certifcate Autority (verisign, thawte etc.).

- Create a Domain certificate. To do that, you will need to setup a Certificate Autority on your domain.

- Create a self signed certificate. IIS has the ability to generate a had oc certificate on your machine. Note that this certificate will only be known and trusted on your machine. For example, you cannot use it over the web to sign your production website.

Here is the procedure to generate a self-signed certificate on IIS 7.x:

1. run inetmgr command

clip_image001

2. Go to the server level and select Server Certificates

image

3. On the right panel, click on Create Self-Signed Certificate.

clip_image003

4. specify a frendly name for your certificate

clip_image004

5. {Your certificate is beeing signed by your machine and placed in the personal certificate store on your machine}

image

Now your certificate can be now used on your machine !

Friday, February 3, 2012

Disable IE Enhanced Security Configuration (IE ESC)

Most of the time, developers are working on a server system such as Windows Server 2008 R2. Server operating systems restrict usage exclusively for the deployed roles. By default, internet explorer is clamped and does not provide a full web experience. For example, you cannot download a file from the web.

clip_image001

To fix this annoying issue, go to the server manager and follow those steps:

image

clip_image002

clip_image003

clip_image004

clip_image005

  1. To configure IE ESC back:
  2. Close all instances of Internet Explorer.
  3. Click Start, point to Administrative Tools, and then click Server Manager.
  4. If a User Account Control dialog box appears, click Continue.
  5. Under Security Summary, click Configure IE ESC.
  6. Under Administrators, click On (Recommended).
  7. Under Users, click On (Recommended).
  8. Click OK.
  9. To disable IE ESC, click Off for both Administrators and Users, and then click OK