Author Archives: Zafar Iqbal

Microsoft SharePoint is not supported in 32-bit process.

Recently I was working on an old project related to SharePoint. It was a simple website project, which I was trying to run in Visual Studio 2017. When I started debugging that website using IISExpress it gave me this error.

Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable

I knew that some configuration might have changed which Visual Studio is not picking up automatically. Some internet references pointed out that IISExpress might not be running in 64bit mode. Someone had given registry hack, which was not valid now. I looked at Visual Studio settings and found out the culprit.

vs2017-webprojects-settings

This really helped my solve my issue.

Azure Monitor for containers

Microsoft recently announced availability of Azure Monitor for containers for checking health and performance of Kubernetes clusters hosted on Azure Kubernetes Service (AKS). Major items to watch on that are:

 Multi-cluster View

Helps monitor all available clusters across subscriptions, resource groups and workspaces, and even helps you identify those clusters which are not yet monitored.

Drilldown in Performance Grid

From cluster view you can drill down to view performance details of your nodes, controllers and containers.

Live debugging

Review your container logs directly in Azure portal and allows pausing of live streams and search within logs for errors and issues.

Onboarding

Other than portal this monitor can be onboarded using Azure Resource Manager and CLI.

See details of this announcements here https://azure.microsoft.com/en-us/blog/azure-monitor-for-containers-now-generally-available/.

Managing flows when a user is deactivated

Recently a question was raised by a client regarding Microsoft Flow as described below, we tried to answer that within our team and come up with some solutions.

Question

When a person creates a flow with his/her service account and then they leave the company, we would deactivate their service account. Would the flow also get deactivated? Does the flow need to be created with a generic service account?

Continue reading

Cannot open files in Microsoft Excel from SharePoint

Recently I uploaded a file in a document library on a SharePoint site. I had created a report and wanted to publish it. After reviewing client requested some changes in it, I tried to open that file from SharePoint directly in Microsoft Excel using “Open in Excel”.

Whatever I tried I always received an error “The file is corrupt and cannot be opened”. Did a little search on the web and found the solution.

  • Open Microsoft Excel
  • Go to File > Options
  • Click on the Trust Center at the bottom of left panel
  • Click on “Trust Center Settings” button on displayed pane
  • Choose “Protected View” from left panel
  • Uncheck all options on displayed pane, and click “OK” till back

sp-excel-trust-center

Now when you open that file again, you will be able to do that, until any further issue, will keep that handy.

Empty a large list using powershell

Recently I wanted to delete all entries in a large list, but manually it was hectic and time consuming. One way could have been to delete and re-create that list, but that list was tightly bound to an InfoPath form, and I did not had any backup source available.

I had been experimenting in PowerShell these days, so looked around for any script which I could modify for my purpose.

Here is that script, took it from different sources mentioned here.

Continue reading

Deployment problems for sandbox solutions

I will list here different problems and their resolutions when we are trying to deploy sandbox solutions. That might help me quickly resolve these in future.

Problem 1: Error occurred in deployment step ‘Retract Solution’: Cannot start service SPUserCodeV4

I was working on a project which involved creating a simple Webpart and must be tested in sandbox environment, I tried to deploy it after some initial working, I got that message on deployment.

Where did that service is, I looked around and found that I need to start that service in Central Administration, as outlined below.

  1. Open Central Administration
  2. Click on “System Settings”
  3. Then click on “Manage services on this server”
  4. A list of services will be displayed, some of them will be stopped
  5. Look for “Microsoft SharePoint Foundation Sandboxed Code Service”
  6. Click on “start” on the last column, your services will be started shortly.

Now go back to your solution and try re-deploying.

Customizing schema generation when using Code First with Entity Framework

In my previous post I generated a database without any mapping or customization, I got what Entity Framework could coerce from my class. Look at the schema which was generated.

generated table schema

Let’s see what I did not like about this.

  • table name is not what I like to have
  • Id was not marked as identity column, so no auto generation for this column
  • all alphanumeric columns are created using nvarchar(MAX) which is not good too
  • and the last, I wanted to use only date for birthdate not datetime

Continue reading