Proxy Switcher v1.3.1

22. April 2009 18:03 by marco in .NET, ProxySwitcher, Software  //  Tags:   //   Comments (5)

! ENGLISH VERSION BELOW !

Auf Anfrage eines freundlichen Nutzers gibt es ab sofort eine neue Auto Switch Funktion: “Adapter Description contains”.

Um ein klein wenig “Dokumentation” hinzuzufügen, hier ein Überblick über die verfügbaren Auto Switch Funktionen:

  • Adapter Description contains
    • Diese Funktion ermöglicht das wechseln des Proxies, sobald ein Netzwerk Adapter verfügbar wird, der den angegebenen Text enthält.
      Damit ist es möglich, einen proxy zu aktivieren, sobald z.B. eine UMTS Verbindung hergestellt wird. Den Namen des Adapters findet man raus, in dem man die Liste durchschaut, die Windows einem liefert, wenn man folgendes auf der Kommandozeile eingibt (ohne anführungszeichen): “ipconfig /all”
      Dort ausschau halten nach “Beschreibung: MeinUMTSAdapter”
  • DNS Suffix contains
    • Diese Funktion ermöglicht das wechseln des Proxies, sobald eine Netzwerkverbindung existiert, die als DNS suffix den angegebenen Text enthält. Dies ist z.B. in Firmennetzwerken sinnvoll. Auch hier liefert “ipconfig /all” die aktuellen DNS suffixe.
  • Gateway contains
    • Diese Funktion ermöglicht das wechseln des Proxies, sobald eine Netzwerkverbindung existiert, die als Gateway Adresse den angegebenen Text enthält. Auch hier liefert “ipconfig /all” die aktuellen Gateway Adressen.
  • WLAN SSID contains
    • Diese Funktion ermöglicht das wechseln des Proxies, sobald eine Verbindung mit einem WLAN hergestellt wird, dessen Name den angegebenen Text enthält.
      Diese Funktion ist erst ab Windows Vista und folgende verfügbar.

Proxy Switcher wurde erfolgreich mit Windows XP, Windows Vista und Windows 7 getestet.

DOWNLOAD HIER

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

Here is now some “documentation” about the available auto switching methods.

  • Adapter Description contains
    • This function allows switching the proxy, if a network adapter becomes available which contains the specified text as the description.
      So from now on, it is possible for example to activate a proxy for a UMTS connection. Search for the “Description: AdapterName” after executing “ipconfig /all” in a command line.
  • DNS Suffix contains
    • This function allows switching the proxy, if a network connection with the specified DNS suffix becomes available. See “ipconfig /all” for the current DNS suffixes.
  • Gateway contains
    • This function allows switching the proxy, if a network connection with the specified gateway address becomes available. See “ipconfig /all” for the current gateway addresses.
  • WLAN SSID contains
    • This function allows switching the proxy on connecting to a WLAN with the specified name.
      This method is ony available from Windows Vista or above.

Proxy Switcher was successfully tested with Windows XP, Windows Vista and Windows 7.

DOWNLOAD HERE

Proxy Switcher v1.3.0

16. April 2009 10:01 by marco in .NET, ProxySwitcher, Software  //  Tags:   //   Comments (5)

Ein kleines Update ist nun verfügbar.

Dank dem Kommentar von Enrico kann nun neben dem wechseln des Proxys auch ein Script oder Programm ausgeführt werden.

Proxy Switcher v1.3.0

From now on, Proxy Switcher can execute scripts or executables.

 

–> DOWNLOAD HIER

Silverlight + Virtual Earth = Genial!

4. April 2009 15:14 by marco in .NET, ASP.NET, Microsoft, Silverlight  //  Tags:   //   Comments (11)

Ich hab mal ausnahmsweise ein bisschen Zeit gehabt um ein paar neue / nicht mehr ganz so neue Technologien anzusehen und auszuprobieren.

Da ich ja nun doch schon seit einiger Zeit meine halbwegs aktuelle Position per Virtual Earth auf woist.mwiedemeyer.de visualisiere und es seit kurzem ein Virtual Earth Silverlight Control gibt, ist es wie geschaffen, um endlich einen ernsthafteren Einstieg in Silverlight 2 zu starten.

Das interactive SDK ist wirklich genial und die Bedienung ist super einfach. Zumindest dann, wenn man bereits ein wenig WPF oder Silverlight Erfahrungen gesammelt hat.

Beispiel:

Man möchte in einer Silverlight Anwendung einfach nur die gesamte Karte darstellen. Dazu reicht es das Map Control zur Seite hinzuzufügen:

<UserControl x:Class="VirtualEarthSilverlightTest.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl"
    Width="800" Height="600">
    <Canvas x:Name="LayoutRoot" Background="White">
        <m:Map Name="MyMap"></m:Map>
(...)

Um per code einen Pin (oder jedes andere UIElement, z.B. auch Bilder, Videos, etc.) auf der Karte an einer bestimmten Position anzuzeigen, reicht folgender code:

// Neuen MapLayer hinzufügen um Elemente an Locations anzuzeigen
MapLayer mapLayer = new MapLayer();
MyMap.Children.Add(mapLayer);
// Beliebiges UIElement (Canvas, Border, etc) an der Position latitude, longitude anzeigen
mapLayer.AddChild(anyUIElement, new Location(latitude, longitude));

Ich habe für einen ersten Versuch mal den letzten Urlaub in die Silverlight Karte eingefügt. Hier gibts das ganze nun zu sehen:

http://woist.mwiedemeyer.de/silverlight

UPDATE:

Was ich an der Stelle noch vergessen habe zu erwähnen: Es funktioniert nicht nur im Internet Explorer, sondern auch in Opera (und natürlich auch Firefox…)!

SharePoint Designer ab sofort kostenlos

3. April 2009 11:18 by marco in Fun, Microsoft, SharePoint, Software  //  Tags:   //   Comments (0)

Der SharePoint Designer 2007 wird seit dem ersten April (nein kein Aprilscherz) kostenlos angeboten!

Kunden, die den SharePoint Designer gekauft haben, dürfen nun kostenlos auf Expression Web upgraden.

Auch wenn ich übrigens durchaus der Meinung bin, dass der SharePoint Designer einen der oberen Plätze bei Dreckstool.de verdient hätte, ist er manchmal ja leider doch ganz nützlich. ;-)

K2 blackpearl: Command-line deployment hangs

26. February 2009 16:14 by marco in Avanade, K2, Software, Visual Studio 2005  //  Tags:   //   Comments (0)

I tried to deploy a K2 blackpearl process (developed and tested on server DEV in domain A) to a test environment (server TEST, domain B) via the command line, but it freezes at some stage.

Normally you could deploy a process from within Visual Studio with a click on “Deploy”. Then you will get a wizard to choose your environment. If your environments are not on the same domain, K2 blackpearl supports the deployment through the command line.

In Visual Studio right click on the process and select “Create Deploy Package”. After it finishes, you will find some files in the obj\Debug folder. One file is a .msbuild file.

I copied all files, as mentioned in the K2 docu, to the target machine and fired up:
msbuild MyProcess.msbuild /p:Environment=Test

First, it looks good, because my InfoPath form was deployed to the SharePoint site, then the console showed the following lines:

Deploy Processes: Task Started (26.02.2009 17:00:00)
Adding Process : MyProcess\Demo1

Nothing more! I waited about 30 minutes, but nothing happened, no error messages, nothing.

Long story short: The solution is, that the value of the “SharePoint Target Site” environment field MUST end with a “/” (e.g. “http://mossServer/targetSite/”)! You can change this within Visual Studio in the Environment Browser or directly in the .msbuild file.

No more comments…

Windows 7 und OpenSearch

25. January 2009 12:16 by marco in Microsoft, Software, Windows, Windows 7  //  Tags:   //   Comments (0)

Eine sehr coole Neuerung in Windows 7 ist, dass OpenSearch in den Explorer integriert ist.

So kann man eine einfache Textdatei erstellen und diese in *.osdx umbenennen. Der Inhalt ist einfaches XML. Hier das ganze mal für mein Blog: marcos blog search.osdx

Nach dem download einfach die OSDX Datei doppelklicksen und schon hat man mein blog in die Windows Search integriert. Und so siehts aus wenn man nach “sharepoint” sucht:

osdx search

Das ganze kann man natürlich leicht anpassen und für diverse Seiten einbauen.

Chris Pirillo hat das ganze schon mal für Amazon, eBay, etc hier gemacht, dort gibts auch ein ZIP file mit einigen search connectors.

AutoHistory for Word 2007 nun auf CodePlex

14. January 2009 18:35 by marco in .NET, AutoHistory, C# Code, Office 2007, Software  //  Tags:   //   Comments (0)

Das Tool AutoHistory von dem ich vor einigen Tagen bereits geschrieben habe, steht nun auch inkl. source code auf CodePlex zum Download bereit.

Fragen und Anregungen daher bitte gerne weiterhin per Mail oder im Projekt Forum.

-> CodePlex Projekt Seite

AutoHistory for Word 2007

11. January 2009 13:54 by marco in .NET, AutoHistory, Office 2007, Software  //  Tags:   //   Comments (0)

I’ve created a new little tool, which is called AutoHistory (for Word 2007).

I got the inspiration from Visual Local History for Visual Studio. This tool automatically creates a backup every time you save a file.

AutoHistory now provides the same functionality within Word 2007. Everytime you save your document (and something has changed), a backup is created.

From now on you will never lost important information. You can restore every version you’ve ever saved, even if you do not use a version control system (like Team Foundation Server or Subversion).

This tool is fully integrated in Word 2007 within the View Ribbon:

 image

If you check the checkbox you will see all saved versions of the current document:

image

Within this taskpane you can easily view and restore every version.

You can download the setup from here: http://mwiedemeyer.de/downloads/AutoHistory/AutoHistorySetup.zip

Please feel free to drop me a line, if you have any questions or suggestions: mail at mwiedemeyer dot de.

The file is not checked out. You must first check out this document before making any changes.

4. September 2008 11:52 by marco in .NET, ASP.NET, C# Code, SharePoint  //  Tags:   //   Comments (0)

If you ever got this message and don’t know where it came from, here is the solution.

I got it if I click on “Edit Page” on a publishing page. So after some investigation it seems to be a problem with the web parts on the page.

My page layout contains some EditModePanels, so the user have different views in display and edit mode of the page. Therefore we also have one web part in a web part zone which is in one of the EditModePanels for display only.

<PublishingWebControls:EditModePanel PageDisplayMode="Display">
  <WebPartZone ID="zone1" ...>
      the web part added through the onet.xml site definition

The same web part zone “zone1” does not exists for editing, because I do not want the user to edit the web part. There is another web part zone “zone2” which lives outside of any EditModePanel.

Now comes SharePoint.

If you check out the page and then click on “Edit Page”, everything is working. Except of, that the web part from zone 1 has moved to zone 2! Automatically! Thank you SharePoint…

It seems that SharePoint think it has to show the web part in edit mode. And because the original web part zone is not visible, SharePoint moves the web part to the next available zone which is visible also in edit mode.

So remember:

Never put a web part zone in an EditModePanel which is only visible in display mode.

Maybe the solution is to make the web part not editable, but I didn’t tested this. My fast workaround hack is to create a div instead of the EditModePanel and makes it “runat=server” and give it an ID. Then I wrote this code on top of the page:

<script runat="server">
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    this.navleftdiv.Visible = (this.SPWebPartManager1.DisplayMode == WebPartManager.BrowseDisplayMode);
}
</script>

Now it works like a charm.

Publish a page with onet.xml as “published”

4. September 2008 08:24 by marco in .NET, SharePoint, Visual Studio 2005, Visual Studio 2008  //  Tags:   //   Comments (0)

If you ever tried to publish one or more pages with your site definition (by onet.xml), you see in Visual Studio (with the SharePoint XSD schemas selected) only one valid value for the “Level” attribute which is “Draft”:

image

But for this attribute you can choose between every value of the SPFileLevel enum. So for publishing the page automatically, set the Level to “Published”. Thats it.

If you already know how to enable XSD schema validation and IntelliSense support stop reading here.

Enable Schema Validation:

  1. Open your xml file, e.g. onet.xml (works with all SharePoint related xml files)
  2. In the property pane, click the ellipsis next to the “Schemas” property
  3. Add the wss.xsd. This file is located in the 12\Template\XML directory
  4. Now add the following xml Namespace attribute to the root element (here Project in onet.xml):
  5. <Project xmlns="http://schemas.microsoft.com/sharepoint/" Title="" [...]
    

Now you should have IntelliSense and schema validation enabled.

SharePoint Page Version History without Web Parts

2. September 2008 07:44 by marco in .NET, SharePoint  //  Tags:   //   Comments (1)

Today I found a version history “bug” in SharePoint publishing pages:

The version history system of SharePoint covers only Page Fields, but not Web Parts.

In detail:

  • Create a new page (e.g. “Blank Web Part Page”) within a publishing web.
  • Now add text and a Web Part. Save changes and check-in.
  • Check out and change the text and some properties of the Web Part.
  • After that, check-in again, and open the “Version History”

If you now try to recover the first version, it seems to work, but only the page fields are recovered. The Web Part is always the latest version, because the Web Parts are saved in a totally different location, so they are not covered by the version history system.

Lets have a look on a cool solution:
Garry Lapointe created a web feature which replaces the version history system and saves a whole page with all Web Parts on every check-in through an Event Receiver on the Pages list.
The version is Alpha 0.0.1 but it is working very well, so download it from codeplex.

Telerik RadEditor for SharePoint: Problem with custom tools

15. August 2008 17:52 by marco in .NET, Avanade, SharePoint  //  Tags:   //   Comments (0)

The RadEditor for MOSS 2007 version 4.5.3.0 has a Bug, which is very annoying...

You create a new custom tool in the ToolsFile.xml and set the “showtext” property.

<tool name="CustomToolName" showtext="true" /> 

Then you create a corresponding javascript method in the RadEditorCommandList.

RadEditorCommandList["CustomToolName"] = function(commandName, editr, oTool)
{
  (...)
}

If you now click on this new Tool Button, the RadEditor shows the message “Could not find the command xxx. Please update your command list.”

radeditor_error

The solution for that: Remove the “showtext” property from your tool in the ToolsFile.xml and everything is working as expected.

.NET Framework 3.5 SP 1 und SQL Server 2008

13. August 2008 20:52 by marco in .NET, ASP.NET, Microsoft, Software, Visual Studio 2008  //  Tags:   //   Comments (0)

Seit heute habe ich das Service Pack 1 für das .NET Framework 3.5 und den SQL Server 2008 auf meinem Server installiert. Ein paar neue kleine private Projekte warten und können nun mit den neuen Features ausgerüstet werden (z.B. Entity Framework und auch ASP.NET MVC obwohl das nur eine CTP ist).

An der Stelle kann ich das .NET 3.5 Enhancements Training Kit empfehlen! Sehr guter Überblick über alle Neuheiten.

Außerdem werde ich vielleicht die Datenbank von WoIstMarco? auf die neuen SQL Server 2008 Geo Datentypen upgraden. Mal schauen, was das so für Vorteile bringt.

Jetzt brauche ich nur noch viiel Zeit...

Error creating a new SharePoint Site through the Object Model

13. August 2008 20:36 by marco in .NET, Avanade, Microsoft, SharePoint  //  Tags:   //   Comments (0)

I have an issue creating a new Web Site programatically. Sometimes, the following exception occurs:

Content type '0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811' not found in web 'xxx'

Live Search has no solution (by the way: Google has no solution as well ;-)). The only thing you can do is re-run the SharePoint Products and Configuration Wizard. After that, the error disappears and the site creation process is successful.

The weird thing is, that the content type ID is the ID from the “PageLayout” Content Type... If anyone found another solution I would be very interested.

Visual Studio 2008 SP1: Endlich ohne “Build” die Fehler sehen

13. August 2008 20:36 by marco in .NET, Microsoft, Visual Studio 2008  //  Tags:   //   Comments (5)

Es ist kaum zu glauben! Mit Visual Studio 2008 SP1 hat nun endlich die Funktion einzug gehalten, die man schon seit Jahren vermisst, wie ich gerade entdeckt habe...

Man hat z.B. folgendes geschrieben:

public bool IsFoo(object x)
{
}

Früher war es so: Den “Fehler” dass nicht alle Pfade der Methode einen Wert zurückgeben bekommt man erst, wenn man “Build” aufruft.

Jetzt neu: Der Fehler wird sofort im Error Log sichtbar! Ohne speichern, ohne Build! Danke Microsoft!