Proxy Switcher 3.6

3. February 2012 21:13 by marco in ProxySwitcher  //  Tags:   //   Comments (1)

Proxy Switcher version 3.6 has just been released.

Together with the new version, the new web site with its own domain has officially been launched. You can find Proxy Switcher from now on directly here:

http://proxyswitcher.net

The new version includes a new network detection method which has been requested by many users: Detect the network based on the MAC address of the gateway. Also a few fixes and performance improvements are included, especially the Ping feature did not always work as expected.
You can find the change log in the download section of the new site.

Visual Studio Achievements

19. January 2012 20:39 by marco in .NET, Visual Studio 2010  //  Tags:   //   Comments (0)

Viele kennen sicher diesen Blog Eintrag. Sehr lustig, und nun gibt es sie wirklich, die VS Achievements.

Dank Channel9 gibt es neben der Visual Studio Extension auch noch eine REST API und ein fertiges Widget. Meine Achievements seht ihr rechts in der Leiste. Einige sollten aber eher Minuspunkte geben... ;-)

Also ladet euch die Extension runter und sammelt fleißig Achievements.

Neues Jahr, neue Blog Engine - Roadmap für 2012

10. January 2012 18:32 by marco in Blog, .NET, ASP.NET, ProxySwitcher, IIS  //  Tags:   //   Comments (0)

Ich möchte dieses Jahr wieder mehr zu meinen Projekten schreiben. Ich habe da einige gute Ideen.

Das erste Projekt auf der Liste: Mein etwas angestaubtes Blog, basierend auf dasBlog durch eine neuere Engine ersetzen. Das habe ich nun gemacht und wenn du das hier liest, funktioniert BlogEngine.NET wohl. Das letzte dasBlog Release ist von 2009, wobei auf Codeplex weiter fleißig auch am Source gearbeitet wird. Dennoch habe ich mich entschieden zu wechseln. Das einzige was ich bisher vermisse ist die OpenId Integration. BlogEngine.NET hat da leider noch nichts. Zumindest konnte ich nichts finden.

Außerdem habe ich bei der Gelegenheit das Application Request Routing (ARR) Modul für den IIS installiert, damit die meisten alten Blog Links auch weiterhin funktionieren. Dazu habe ich einfach ein paar Redirect Rules erstellt. Somit funktionieren die alten Artikel Links auch weiterhin.

Eine weitere Neuigkeit ist: Proxy Switcher hat nun auch eine eigene URL (http://proxyswitcher.net). Das Ziel ist dort auch bald nicht nur einen Redirect zu haben, sondern eine eigene Seite.

NuGet Package Manager or How to make “source code sharing” across projects much better

9. May 2011 16:43 by marco in .NET, Avanade, C# Code, Microsoft, NuGet, Visual Studio 2010  //  Tags:   //   Comments (2)

Introduction

In a company with more than one development project sometime it happens that someone says: Hey, we need a common logging component shared across all projects.
Now the solution could be to develop such a logging component and share the assembly with all projects. However, if there is some code that should/must be unique to each project it is a bit more complicated. If you want to do that with SharePoint 2010 and build a logging component on top of the ULS log and want each project to be configurable in the Central Administration you need to know all future projects and categories or you need some unique code.

Note: The logging component is only a very easy example and might not be the best one.

NuGet

Microsoft created NuGet. A package manager for Visual Studio. Quote of the official site:

NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

You can add it easily to Visual Studio 2010 by Tools->Extension Manager. Search for “NuGet”. After it is installed, you can add packages to a project by right clicking on a project in the Solution Explorer and click “Add Library Package Reference…”

image

Now as a company you don’t want your super-fancy code to show up for everyone as open-source. Therefore, NuGet can have more than one package source. You can even use a file share. Open Tools->Library Package Manager->Package Manager Settings:

image image

Bring it together

To get rid of “each project copy the source from the source of the other project from the source of the source of the source from another project” you can now use NuGet.

The idea is:
- Create the Logger.cs file
- Add TODOs to the code where the developer need to change something
- Make a NuGet package from it
- Let the project teams use the NuGet package (and distribute updates to the source automatically as well!)

Advantage: There is only one source! And if the owner of the NuGet package updates it, all project teams will be automatically notified about an update!

Create the NuGet package

In my example I talk about the comon logger component. A single Logger.cs file. However, NuGet can handle even more complex packages with PowerShell code, etc.

So download the NuGet command-line tool and create a new folder where all the stuff for the package will go to.

Open a command prompt and enter:

nuget spec

This will automatically create an empty package specification file called Package.nuspec. Open this file in notepad and modify the required values. Also rename the file to match the id property.

image

Now create a folder called “content”. Everything in this folder will be merged into the solution on installation of the package. So I put the file Logger.cs in this folder.
However, I don’t want that all users are required to use the same namespace, so you can change the file extension to “.cs.pp” to let NuGet “pre-process” the file.

Within the file you can then set some tokens to be replaced on installation. You can find a list of available properties here on MSDN.

The folder structure looks like this:

image

And the Logger.cs.pp in the content folder:

image

As you can see, I used the token $rootnamespace$. That one will be replaced by the root namespace of the target project.

Ok, lets make a package:

nuget pack

The output is a file called SPLogger.1.0.nupkg. You can publish it to the official NuGet package server or use it only internally by copying it to a file share.
Now open Visual Studio add the file share as a package source and search for it in the “Add Library Package Reference” window or open the NuGet console in Visual Studio (View->Other Windows->Package Manager Console) and type:

Install-Package SPLogger

image

That’s it. If you change the version number in your .nuspec file, create a new package and copy it also to your file share, the project team can decide to update to the latest version in the “Library Package Reference” dialog. You can even uninstall the package and everything will be removed from the project without leaving anything behind.

MCPD: SharePoint Developer 2010

22. April 2011 10:59 by marco in Avanade, Microsoft Zertifizierungen, SharePoint  //  Tags:   //   Comments (0)

Seit gestern nun bin ich MCPD (Microsoft Certified Professional Developer) für SharePoint 2010.

Dazu gehörten zwei einzel Prüfungen:

A great tool if you have more than one computer on your desk

6. April 2011 07:32 by marco in Software, Windows 7  //  Tags:   //   Comments (0)

A few years ago, I found a tool to share the keyboard and mouse of one computer with another computer. That looks like this:

image
(Source: http://synergy-foss.org/)

As you can see, the tool also runs on any platform not only Windows.

Today I have two laptops on my desk and thought about that great tool. Now I found it again. It is called “Synergy” and can be downloaded for free here. The author updated it and it works very well.

Configuration

The configuration is farely easy:
On the computer with the keyboard and mouse, start the tool, click “Configure Server” and you will get this dialog:

image

There you can drag computers around your existing one where they physical are placed.
Now save and click start.

On the other computers select “Client” and enter the hostname or IP address of the host computer. Done.

Task Spotter–A location based ToDo list app for Windows Phone 7

3. January 2011 15:40 by marco in Software, Windows Phone 7  //  Tags:   //   Comments (0)

My location based ToDo list app for Windows Phone is now available on the marketplace!

DesktopMarketplace

With this app, you can create tasks for a specific location. On the “here” page, you only see the tasks assigned to your current location.

Screen1Screen3Screen4

Download it now:

wp7_480x80_green

My first Windows Phone 7 application: MySite for WP7 - Part 1

17. November 2010 20:48 by marco in Avanade, SharePoint, Silverlight, Software, Windows Phone 7  //  Tags:   //   Comments (0)

A few weeks ago, my employer, Avanade Germany, announced an internal “Windows Phone 7 Contest”. The goal is to create a (business) app for Microsofts new Windows Phone 7 (WP7) system. I just had some ideas and decided to go with “MySite for WP7”. At least because I’m working in the “Portals & Collaboration” Service Line and I really like the new SharePoint 2010 MySite. That, and because the price for the best three apps is an Xbox 360 with Kinect. Winking smile

Overview

If you have no idea, what the SharePoint 2010 MySite is, here is a short introduction: Think about a “little” Facebook (social network) within your company. You can write status messages, see a newsfeed about your colleagues, post comments on the note boards of your colleagues, upload pictures, etc.

I know, that WP7 comes with SharePoint integration, but without a cool client for the MySite. I will try to build one (and hopefully win the Xbox).

Start with WP7

I will not give you an overview what you need to start, because there are a lot of resources to learn WP7 development. I already know .NET, C#, SharePoint and Silverlight and that’s everything you need to start. Download the Development Toolkit (for free) and start up Visual Studio.

First of all I decided to go with the Panorama Template, because it is easy to use and looks really nice. Also it supports my idea of different MySite tasks. The design-time support is great as well. If you click on the panorama page in the XAML code, the designer shows the corresponding page.

image

But before I go into much UI details, we should thought about the backend.

How to connect to SharePoint?

SharepPoint 2010 provides a web services API (WCF and legacy ASMX) to access most of the SharePoint functionality. Therefore I tried to access these services directly from the phone, but that did not work, because of two main points:

So obviously a workaround is required. Here is my idea of a “proxy service”:

image

That means, the WP7 app connects to an SSL secured WCF (silverlight-enabled) proxy service (without authentication) in the cloud. The service then connects to the SharePoint service with the provided credentials. For privacy reasons, a company that do not want to transmit sensitive data over the cloud service can host their own proxy service within their secure environment to make it accessible by their employees.

The proxy service can for example get the current status message from your MySite:

public string GetStatus(AccountCredentials credentials)
{
  var client = GetProfileServiceClient(credentials);

  string fqnUsername = credentials.Domain + "\\" + credentials.Username;
  var data = client.GetUserProfileByName(fqnUsername);

  var statusProp = (from d in data
                    where d.Name == "SPS-StatusNotes"
                    select d).FirstOrDefault();

  return statusProp.Values[0].Value.ToString();
}

I defined a class AccountCredentials which contains username, domain, password and SharePoint MySite URL. This data is entered in the WP7 app by the user. Now the proxy service is called with this data and calls the SharePoint profile service (with the URL provided) to get the current status message.

This approach is not only for communicating with SharePoint, but can also be used with other services which cannot directly be called from the phone.

Alternative to a Proxy Service: UAG

Another fairly new (at least for me) way is the Forefront Unified Access Gateway (UAG). See also this video from TechED. In the video you can see, that Microsoft requires a company to have a UAG in place to use the build-in SharePoint features of WP7. So it seems, that also Microsoft cannot use NTLM on WP7.

WP7 with UAG uses HTTPS for all communications and what is know as basic authentication. One problem why I’m currently not supporting UAG in my App is, because there are no developer resources how to integrate it in your own application. The only info you got from the video is to use signUrl.asp to get the token after authentication. If anyone has more info, please add a comment.

Learn more in part 2 of the series in a few days where I will talk about the User Interface.

Proxy Switcher meets Facebook, Twitter and SharePoint 2010 MySite

18. September 2010 09:42 by marco in .NET, Avanade, ProxySwitcher, SharePoint  //  Tags:   //   Comments (0)

I was on vacation the last two weeks so I had some time for some funny things. For Proxy Switcher I thought it would be a nice idea to have an AddIn to set the status message of social networks on a network change. The two major players are Facebook and Twitter. Personally I’m not using Twitter, but that’s another story. Additionally, at Avanade we have our MySites on SharePoint 2010 with the new feature enabled to add status messages there as well. (See also our Avanade SharePoint Blog)

image

Your TODO now: Download Proxy Switcher (if its not already installed), then go to the More AddIns page to download the “Social Media Update Action AddIn”.

Proxy Switcher – Version 3.1

19. July 2010 19:39 by marco in ProxySwitcher, Software  //  Tags:   //   Comments (0)

Es ist soweit und Proxy Switcher steht in einer komplett überarbeiteten Version bereit. Inzwischen ist auch die Version 3.0 übersprungen und die neue Version enthält eine Menge neuer Funktionen. Mehr dazu auf der Projekt Seite und im Changelog.

Nur die Group Policy Funktionen sind leider immer noch nur eingeschränkt verfügbar, stehen aber für die nächste Version ganz oben auf der Liste.

Wünsche und Fehler können wie gehabt im Forum angesprochen werden oder direkt im Bug Tracker eingetragen werden.

Proxy Switcher 3 – BETA

3. May 2010 20:46 by marco in .NET, ProxySwitcher, Software, Windows 7  //  Tags:   //   Comments (0)

Ab sofort gibt es den Proxy Switcher v3 als öffentliche Beta zum download.

DOWNLOAD HIER

Wichtig: .NET Framework 4 wird benötigt.
Desweiteren liefen die Tests bisher nur auf Windows 7.

Alle auftretenden Probleme und Vorschläge bitte hier eintragen:

http://bugs.mwiedemeyer.de

 

Ein paar Highlights:

Komplettes Re-Design (Sichtbar und im Hintergrund)
MEF als AddIn Framework
Ribbon User Interface (http://fluent.codeplex.com/)
Windows 7 Location API Integration

Windows 7 Location API – A new feature for Proxy Switcher

28. April 2010 10:53 by marco in .NET, C# Code, Microsoft, ProxySwitcher, Software, Windows 7  //  Tags:   //   Comments (2)

Overview

Currently, I’m investigating what can be improved in the new release of Proxy Switcher.

For those of you, who don’t know what Proxy Switcher is a few facts:

  • Proxy Switcher automatically set the proxy depending on your current network connection
  • Beside of that, it can set other things too. E.g.: Execute scripts, change default printer, etc.
  • Click here to go to the project site for more info

Windows 7 Sensor and Location Platform

With Windows 7 Microsoft created a new “Sensor and Location Platform”. Until now, there is not much hardware compatible with it, but this hopefully will change in the near future.
With this API, applications can easily access the available sensors. Here you can find some examples and also a “manual” location provider by clicking on a map.

For the location API, there is a cool free “software” device called Geosense. From their website:

Geosense is designed to use a hybrid mix of geolocation service providers and geolocation methods to pinpoint the most accurate location information possible - including but not limited to WiFi triangulation, cell tower triangulation and IP lookup. Source: http://www.geosenseforwindows.com/

While your laptop vendor has not yet integrated a Windows 7 compatible hardware GPS sensor, Geosense is a good compromise.

Proxy Switcher Integration

For Proxy Switcher this will become a new option for switching proxy configurations, or doing some other stuff as you can see here:

image  (click to open in a new window)

 

Code

To access the Windows 7 location API all you need is the .NET Framework 4. There is a new System.Device.dll (contained in the Client Profile of the .NET Framework). Adding a reference allows you to access the current location.

First, add the following using statement:

using System.Device.Location;

Use the following code  to get the address:

GeoCoordinateWatcher watcher = new GeoCoordinateWatcher();
watcher.TryStart(false, TimeSpan.FromMilliseconds(1000));
// Get the location, including lat, long, speed, altitude, etc.
GeoCoordinate location = watcher.Position.Location;
// Try to get the current address, including street, city, etc.
CivicAddressResolver resolver = new CivicAddressResolver();
CivicAddress address = resolver.ResolveAddress(location);

Summary

With this new functionality, Proxy Switcher is not a pure “Proxy Switcher” anymore, but a multi-functional network/location based “generic” extensible execution tool. New actions can be easily created by developers through the MEF AddIn Framework. More on this in a later post.

 

If you want to become a beta tester, feel free to contact me at “mail” at thisdomain.

Windows Phone 7 Series

15. February 2010 15:29 by marco in Hardware, Microsoft  //  Tags:   //   Comments (0)

Das sieht doch mal sehr vielversprechend aus:

image

Mit einer Oberfläche, die der des Zune ähnelt und mir auch dort schon sehr gut gefallen hat.
Developer Infos gibts erst zu MIX, vielleicht gibts bis dahin dann auch das SDK.

Ich jedenfalls will so ein Windows Phone! Gibts dann hoffentlich zu Weihnachten nicht nur in den USA, sondern auch hier.

Proxy Switcher 2.0

26. November 2009 21:07 by marco in .NET, ProxySwitcher, Software, Windows 7  //  Tags:   //   Comments (0)

English version below

Es ist endlich soweit und Version 2 ist fertig geworden.

Von der Roadmap musste die UI Überarbeitung allerdings vorläufig gestrichen werden. Das heißt es gibt keine Ribbons und kein WPF, sondern weiterhin das Tabbed Interface wie gehabt. Allerdings ist zum deaktivieren ein neues Tab hinzugekommen.

Dafür aber nun die gute Nachricht: Neben einigen Bugfixes haben es die folgenden Features in die neue Version geschafft:

  • Standard Drucker wechseln nun auch beim deaktivieren
  • Neue Settings um das Taskbar Verhalten zu ändern und Nachfragen abzuschalten
  • Im Auto Switch Tab werden nun einige Werte (WLAN SSID, DNS suffix, Gateway) mit Werten des aktuell verbundenen Netzes vorbelegt
  • Wenn ein neues WLAN connected wird, erscheint eine Abfrage ob dieses WLAN einen Proxy benötigt, der dann direkt konfiguriert werden kann
  • Mehr Hilfen im Programm verfügbar durch überfahren von Fragezeichen mit der Maus
  • Application Änderungen:
    • Opera Support nun inkl. Opera 10
    • Firefox: Neben den Profilen kann nun auch der Standard Profilordner gewechselt werden
    • Thunderbird gehört nun ebenfalls zu den Unterstützten Applikationen
    • Internet Explorer 8: Proxy kann nun auch für Wählverbindungen gewechselt werden, allerdings aktuell nur mit einem kleinen Trick. Mehr dazu in der FAQ und im Tool über die Hilfe.
  • Neue Enterprise Features:
    • Alle Konfigurationsdateien ([User]\AppData\Roaming\ProxySwitcher) werden nun live überwacht und können per Group Policy, o.ä. geändert und ausgetauscht werden, ohne die Anwendung beenden zu müssen. Dies ermöglicht z.B. Proxy Einstellungen für alle Mitarbeiter hinzuzufügen oder zu ändern.
    • Group Policx (ADMX) Template: Proxy Switcher lässt sich nun über Group Policies einschränken und deaktivieren. Download und Infos hier: http://projects.mwiedemeyer.de/ProxySwitcher/pages/GroupPolicy.aspx
      Das Template ist nur für Windows Vista oder höher und Window Server 2008 oder höher anwendbar, da Microsoft erst ab dieser Version das neue ADMX Format eingeführt hat.

Download wie immer direkt hier: http://mwiedemeyer.de/downloads/ps/ProxySwitcherSetup.zip

Für Fragen und Anregungen bitte die FAQ und das Forum hier verwenden: http://projects.mwiedemeyer.de/ProxySwitcher

 

----------------------------------------------------------------------

ENGLISH VERSION

Today the new version 2 was released!

The UI changes mentioned in the roadmap had been postponed. So no ribbons and no WPF, but a tabbed interface like in the releases before with an additional tab for deactivating the proxy.

The great news: Beside some bug fixes there are many new features available as you can see here:

  • Change the default printer also on deactivating the proxy
  • New settings to change the taskbar behavior and eliminate ask on exit
  • Within Auto Switch tab, switch settings will be pre-populated with the values (WLAN SSID, DNS suffix, Gateway) from the currently connected network
  • When you connect to a new WLAN, a task dialog appears and you can directly create a proxy entry for this connection
  • More help available throughout the application (hover the mouse over the question marks)
  • Application changes:
    • Opera support including Opera 10
    • Firefox: Also change the default profile folder
    • Thunderbird support added
    • Internet Explorer 8: From now on, proxy can be changed for dial-up connections too. See FAQ or help within the tool for a how-to.
  • New Enterprise features:
    • All configuration files ([User]\AppData\Roaming\ProxySwitcher) are now live monitored, so they can be changed or replaced by policies, etc. without exiting the application. Now it is possible to add or remove proxy entries for all employees.
    • Group Policy (ADMX) template: Proxy Switcher can now be managed by group policies. Download and info here: http://projects.mwiedemeyer.de/ProxySwitcher/pages/GroupPolicy-en.aspx
      The template is only available on Windows Vista or above or Windows Server 2008 or above, because Microsoft supports the new ADMX file format only in these versions.

Direct download here: http://mwiedemeyer.de/downloads/ps/ProxySwitcherSetup.zip

Please use the FAQ or the forum for questions and feedback here: http://projects.mwiedemeyer.de/ProxySwitcher

Project Site

6. September 2009 12:36 by marco in .NET, AutoHistory, ProxySwitcher, Software  //  Tags:   //   Comments (3)

Da sich inzwischen doch ein paar kleine aber feine private Projekte angesammelt haben, gibt es nun eine neue site wo alle Projekte an einer Stelle zu finden sind:

http://projects.mwiedemeyer.de

Für den Proxy Switcher gibt es dort nun auch ein Forum, damit nicht alle Fragen verstreut über die einzelnen Blog Posts verteilt werden.

Außerdem gibt es dort noch zwei andere kleine Tools: AutoHistory for Word 2007 und den Browser Selector.