Friday, September 9, 2016

command line attach debugger to process

The one liner below will start debugging the IIS processes using Visual Studio. Instead of navigating to the menu using the mouse, Attach Process, check all processes, reverse sort process name, select all w3wp, attach.

(([System.Runtime.InteropServices.Marshal]::GetActiveObject("VisualStudio.DTE")).debugger.localprocesses | Where Name -Match "w3wp.exe").Attach()

This saves time, especially if you need to perform this action several times.

This could also be changed into a function

Function attachdebug

{
param ([Parameter(Mandatory=$true)][ValidateNotNull()]

[String]$Process)

If($process){

(([System.Runtime.InteropServices.Marshal]::GetActiveObject("VisualStudio.DTE")).debugger.localprocesses | Where Name -Match $process).Attach()

}

}

Use:

attachdebug -Process w3wp.exe

Thursday, January 21, 2016

How I solved connection issue in my Hyper-V VM

 

Today I started a VM in Hyper-V. After I logged in to the VM using remote desktop, I noticed that I had no internet connectivity.

To solve this, I just restarted the ICS on the host system.

Below are the PowerShell commands to do so:

get-service sharedaccess | stop-service

get-service sharedaccess | start-service

Now it works fine.

Cheers,

André

Friday, July 20, 2012

Overview of SharePoint Dev training possibilities

 

On the Dev Center of Microsoft is an large amount of online training programs including possibility to do exercises using Virtual Lab or your own VM.

You can find it here.

SharePoint 2013 is also there with 18  modules !!

Wednesday, May 9, 2012

Training kits available at Microsoft

There is large list of training kits available, amongst others containing:

  • SharePoint 2010
  • Office 365
  • Azure
  • Windows Phone

You can find it here

Enjoy!

Thursday, April 12, 2012

Removing a left-over Feature

 

After deactivating and uninstalling a SharePoint 2010 solution, I got an error message.

The result: the solution was removed, but the feature was still there. When I installed and activated the solution again, there were two of features with the same name. So, I could not remove the feature by reinstall/de-install of the solution.

Solution:

I used the Feature Admin Tool to find the left over feature and removed it.

You can find the tool : (Both 2007 and 2010)

http://featureadmin.codeplex.com/

BTW: it is also advised by SharePoint Joel ! and I’ll now add this to my SharePoint tool belt. Smile

Tuesday, April 5, 2011

Windows Azure Guidance on DeepFried

On my way to work, I just listened to a podcast of DeepFriedBytes. Check it our here: http://deepfriedbytes.com/

It was an episode about Windows Azure Guidance. This Guidance is developed by the Microsoft Patterns and Practices team and can be found here: http://wag.codeplex.com/

The podcast shortly touches the easiness of deploying your SQL to SQL Azure. The existence of the X-drive, meant for migrating legacy applications to the Cloud. Minor issue: only one worker process can write to it.

Azure has three types of storage: Table, Queue and Blobs. Table is the SQL part, Queue for the communication between the Web Role process and the Worker Role process and of course the Blobs to store files. There are samples to code against the Storage API.

Also mentioned the security model, used in Azure: Claims Based Authentication. Background to be found on Codeplex.

Just read read it and listen to it !

Tuesday, December 28, 2010

Creating a userfriendly Excel input form

Creating a form in Excel is fairly easy, using the right options in Excel.

  • enter a label
  • select the field which should contain the input and unlock the field.
  • Add a message to be displayed when the input field is selected:

image

    • Deselect the gridlines in View:

image

  • Protect the Sheet: allow Select unlocked fields only.

image

 

image

image

Now the sheet is ready for use.

Thursday, September 9, 2010

JournalOwnership

 

As of Silverlight 3.0, there is a Navigation API. It is located in System.Windows.Controls.Navigation.

As explained in this blog there is a Frame Container which has several options.

One of these options is JournalOwnership. It is documented in MSDN here.

JournalOwnership has influence on the behavior of the browser history.

If the JournalOwnership is set to UsesParentJournal, navigation will be visible in the browser history:

clip_image002

clip_image004

This enables the end user to navigate through the Silverlight application using the browser history.

If you do not want to use this feature, for instance in a banking application, the JournalOwnership should be set to OwnsJournal.

clip_image006

After navigating through the menu items, the browser history remains empty.

Wednesday, May 26, 2010

Debugging Submit in InfoPath 2007

When you submit an InfoPath form which was opened from an existing form, so called Edit, it is hard to debug the managed code. The method that I use to resolve the problem is to put statements into the code I suspect. Just as the writelines in the early days developing without debugger. Instead of writelines I used the MessageBox.Show() command. This enabled me to pinpoint the error location.

Today I fixed a problem when submitting the InfoPath form which was caused by the fact that the file already existed in the SharePoint Document Library.

The solution was to enable a checkbox in the Data Connections of the InfoPath Form Template. Just as described in the weblogs below:

Thursday, May 6, 2010

Boot to Windows 7 VHD using an USB stick

This is really cool. Windows 7 can boot to VHD. To do this you have to change the BCD store of your machine. But there is more : you can also do this without changing the host machine !

How?

  • put a (bootable) VHD on the host machine
  • create a bootable USB
  • change the BCD of the USB stick ! (point to the VHD)
The steps in detail are written in John's Post.

This enables you to boot from USB stick into a Windows 7 VHD.

Advantage:

you can quickly use the hardware of a system without changing the system !

sample:

You want to try Windows 7 on an XP laptop but you don’t want to change the XP laptop, because it’s the family’s laptop ;).

Try it. It’s cool !

Thursday, April 15, 2010

InfoPath 2007 Object Model Poster

I just discovered that Microsoft has published a poster describing the InfoPath 2007 Object Model (and other Office Object Models)

Look here

Tuesday, March 30, 2010

How to display the Form version on the InfoPath 2007 Form

Just insert an Expression Box control into the Infopath Form using the following XPath expression:

substring-before( substring-after( /processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"')

Source: http://www.nivot.org/2008/09/30/WhyVSTO30VisualStudio2008SharePointWindowsWorkflowAndInfoPathMightGiveYouAHernia.aspx

Tuesday, March 9, 2010

File recovery on Windows 7

This morning, I accidently deleted a complete folder on my Windows 7 machine. I automaticly use SHIFT-Delete, so I could not Restore the folder and documents from the Recycle-Bin :(

Looking for tools I discovered the Recuva tool from PiriForm. I downloaded the Portable version, so without installer. Extracted the zip on another drive and selected my drive where the folder was accidently deleted.

Recuva

Thanx to the Recuva tool, I now have all my documents back ! It just worked..

:)