Blog b = new Blog("marcos blog"); RSS 2.0
# Monday, June 29, 2009

Proxy Switcher arbeitet derzeit mit dem Internet Explorer und Firefox zusammen. In der Regel greifen Anwendungen automatisch auf die Proxy Einstellungen des Internet Explorers zurück, weshalb es normalerweise vollkommen ausreichend ist.

Hat man nun aber einen Sonderfall, also eine Applikation die nicht auf die Internet Explorer settings zurückgreifen kann, benötigt man ein zusätzlichen “Switcher”.

In diesem Artikel zeige ich, wie einfach es ist, selbst einen zu entwickeln und im Proxy Switcher zu verwenden.

Implementierung

Zunächst erstellt man ein neues Class Library Projekt im Visual Studio 2008. Dies ist auch mit der kostenlosen Variante Visual Studio 2008 Express (C# oder VB.NET) ohne Probleme möglich.

image

Als nächstes fügt man eine Referenz auf ProxySwitcher.Shared.dll hinzu. Dort befindet sich die benötigte Basisklasse.

image

Nun noch die Class1.cs Datei umbenennen, z.B. in DemoSwitcher.cs. Dadurch wird auch automatisch die Klasse umbenannt. Diese Klasse muss nun von der SwitcherBase Klasse erben, wofür außerdem das using statement hinzugefügt werden muss:

image

Über das SmartTag was erscheint wenn man SwitcherBase ausgeschrieben hat, lassen sich automatisch alle benötigten Methoden erzeugen. Das wären “DisableProxy”, “EnableProxy” und die Eigenschaft “Name”.

image

Über die Name Eigenschaft kann man einen Namen vergeben, der später dann im Proxy Switcher angezeigt wird.

Enable und Disable sollte sich von selbst erklären. Innerhalb der Methoden kann man auf this.CurrentProxyEntry zugreifen um die Daten abzurufen, die nun aktiviert/deaktiviert werden sollen.

image

Damit hätten wir die minimal Implementierung beendet.

Erweiterte Funktionen

Man kann nun noch für seinen Switcher Einstellungen laden und speichern und auch einen Settings Dialog als Windows Form anbieten (wofür dann noch eine Referenz auf “System.Windows.Forms” hinzugefügt werden muss):

image 

Deployment

Nachdem man alles soweit fertig hat, muss das Projekt noch kompiliert werden. Dadurch entsteht eine DLL, in meinem Fall PSDemoSwitcher.dll.

Diese muss nur noch in das Verzeichnis kopiert werden, wo auch ProxySwitcher.exe liegt. Also normalerweise “C:\Programme\ProxySwitcher”.

Startet man nun den ProxySwitcher, erscheint im ersten Tab direkt mein neuer Switcher und kann selektiert werden, damit er auch aufgerufen wird.

image

 

Update:

Die dokumentierte Beispielimplementierung gibt es hier zum download.

Monday, June 29, 2009 8:17:43 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [6]
.NET | C# Code | ProxySwitcher | Software | Visual Studio 2008

Lange Zeit sind die Prozessoren immer schneller geworden, der Arbeitsspeicher ist schneller und vor allem immer größer geworden und langsam aber sicher wird (ist) die einzige Bremse im Computer die Festplatte.

Das trifft vor allem auf Laptops zu, da bei Desktops und Servern natürlich Platten mit 10k Umdrehungen und RAIDs möglich sind. Im Laptop dagegen hat man in der Regel nur Platz für eine Platte.

Hier kommen jetzt die SSDs ins Spiel. Klar kannte ich natürlich dieses Video:

Aber ich war etwas skeptisch, zumal leider keine 24 Platten in meinen Laptop passen... Also bringt auch eine Platte eine deutlich bessere Performance?

Kurze Antwort: JA! JA! JA!

Die G.Skill Falcon Platte hat den neuesten Controller und zusätzlich noch 64MB cache, was zusammen keine Wünsche offen lässt.

Mit Windows 7 hat Microsoft ja bekanntlich diverse Verbesserungen für SSDs implementiert, und das rockt (nicht nur im Windows Experience Index): 7,4 von 7,9!

image

Auch die subjektive Geschwindigkeit beim öffnen von Anwendungen oder beim Hochfahren von Windows ist seehr viel besser.

Müssen die SSDs nur noch günstiger werden...

Monday, June 29, 2009 8:43:56 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
Das wahre Leben | Hardware | Windows 7

Version 1.5 ist fertig! Neben einigen Bug Fixes sind, wie bereits im Feature Preview Post erwähnt folgende neue Funktionen hinzugekommen:

  • Vollständige Integration in Windows 7, inklusive Jumplist support 
  • Internet Explorer 8 support
  • Standard Drucker wechseln
  • Scripting
    • Script kann nun mit dem proxy namen als Parameter aufgerufen werden

    • Beim deaktivieren der proxies kann nun ebenfalls ein script aufgerufen werden

    Leider gibt es einige Probleme mit Click-Once, so dass v1.5 weiterhin nur über ein Setup zur Verfügung steht und nicht automatisch aktualisiert wird (aber automatisch benachrichtigt, sobald eine neue Version verfügbar ist).

    Desweiteren hat es die Wählverbindung-Unterstützung nicht mehr in diese Version geschafft, ist aber definitiv auf der Roadmap für v1.6.

    Da Microsoft ein paar gravierende Änderungen am Proxy System vom IE 8 vorgenommen hat, gibt es nun einen Switcher für “Internet Explorer” und einen für “Internet Explorer 8”. Nur einer von beiden sollte, je nach System, aktiviert werden.

    DOWNLOAD HIER

    WICHTIG: Der Pfad zu den Einstellungen und Proxy Konfigurationen hat sich wie folgt geändert:

    Speicherort vor v1.5: C:\Users\[USERNAME]\AppData\Local\ProxySwitcher (Windows XP: C:\Documents and Settings\[USERNAME]\Local Settings\Application Data\ProxySwitcher")

    Neuer Speicherort v1.5+: C:\Users\[USERNAME]\AppData\Roaming\ProxySwitcher (Windows XP: C:\Documents and Settings\[USERNAME]\Application Data\ProxySwitcher)

    Um die vorhandenen Einstellungen zu übernehmen, einfach alle Dateien im genannten Ordner in den neuen Ordner kopieren.

     

    Vorschau

    Für v1.6 steht, neben dem Support für Wählverbindungen, auch eine bessere Unterstützung für größere Firmen Deployments auf der Agenda (z.B. Konfiguration und Sperren von Änderungen über Group Policies, als auch Überwachung der Einstellungsdateien, so dass diese im laufenden Betrieb geändert werden können)

    Außerdem steht auch immer noch Opera support auf der Agenda... wird auf jedenfall noch vor v1.6 ausgeliefert...

     

  • UPDATE:

    Es gab ein kleines Problem mit den advanced exceptions, was nun behoben ist. Die Version ist nun 1.5.1. Sorry für die Unannehmlichkeiten!

    Monday, June 29, 2009 8:13:13 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [16]
    .NET | ProxySwitcher | Software | Windows 7

    With the Windows API Code Pack, Microsoft released a really cool managed wrapper for most of the new Windows 7 features. See here for more details and download.

    One thing you can do is to create a .NET app with Jumplist support. Jumplists are these cool menus appearing on right click on an icon in the task bar:

    image

    But there is something wrong with the jumplist: It can only launch new apps! The demo solution for the Code Pack launches notepad and some other things, but there is no word about how to open the same app but with a new form.

    So here is my solution, which is not very nice, but it works like a charm.

    Scencario:
    AppInstance1 is running –> click on a jumplist item starts a new instance –> appInstance2 now knows, that this is the second instance, so appInstance2 calls appInstance1 through remoting (IPC) and terminates–> appInstance1 receives the remoting call und execute something.

    Ok, how to implement this?

    First of all, create a new Windows Forms app and go to the Program.cs file. Within this class create a new class which works as your service for the remoting part and also a static reference to your form:

    static class Program
        {
            public class RemotingService : MarshalByRefObject
            {
                public RemotingService() { }
    
                public void ShowText(string text)
                {
                    Program.formMain.SetTextToTextBox(text);
                }
            }
    
            internal static Form1 formMain;

    Then you will need some remoting code for the communication. I created two methods “InitRemoting” and “CallRunningInstance”. InitRemoting is called from the main method if this is the first instance. CallRunningInstance is called if the main method detects, that this is the second instance.

    For the detection I use a system wide mutex.

    I hope you get the idea. Because there are some more lines of code I created a demo project for you to download:

     Download the entire working demo solution here.

     

    Monday, June 29, 2009 7:42:20 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | C# Code | Microsoft | Software | Visual Studio 2008 | Windows 7
    # Wednesday, June 03, 2009

    Hier gibt es heute schon mal eine kleine Vorschau auf die nächste Version.

    Nach vielen Mails und Kommentaren wurden hoffentlich die meisten Wünsche weitestgehend erfüllt.

    Zu den Neuerungen gehören:

    • Vollständige Integration in Windows 7, inklusive Jumplist support
      • image
    • Internet Explorer 8 support und damit auch unterstützung für Wählverbindungen
    • Standard Drucker wechseln
      • image
    • Scripting

      • Script kann nun mit dem proxy namen als Parameter aufgerufen werden

      • Beim deaktivieren der proxies kann nun ebenfalls ein script aufgerufen werden

    • Click-Once Anwendung. Damit gibt es automatische updates ohne Installation

     

    Es ist natürlich weiterhin Zeit für Anregungen, Wünsche und Kommentare.
    Als Release Termin für die Version 1.5 plane ich aktuell Ende Juni.

    Wednesday, June 03, 2009 9:15:59 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [7]
    .NET | ProxySwitcher | Software | Windows 7
    # Saturday, May 23, 2009

    Today I have created a little tool. I called it “Browser Selector”. It is for all people who uses more than one browser.

    My scenario:

    I’m using Opera and Internet Explorer. Opera for daily browsing and Internet Explorer for all Microsoft sites and for the company intranet.

    Browser Selector now helps to avoid copy&paste url’s in one of the browsers depending on the url. Instead I can click directly on each url from all applications (Outlook, MSN Messenger, etc) or even enter the url in the start menu and it opens automatically in the correct browser!

    Configuration:

    To configure, which url will be opened in which browser, there is a config.xml file:

    <?xml version="1.0" encoding="utf-8" ?>
    <BrowserSelector>
      <Rules>
        <Rule Url="microsoft.com" Browser="IE" />
        <Rule Url="live.com" Browser="IE" />
      </Rules>
      <Browsers>
        <Browser Name="Opera" Path="C:\Program Files (x86)\Opera\opera.exe" Default="true" />
        <Browser Name="IE" Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe" />
      </Browsers>
    </BrowserSelector>

    There you see a Rules section. In the Url attribute you can use regular expressions as well.
    In the Browsers section you define all of your browsers and mark one as default which will be used if no rule matches.

    Now download the msi, install it and configure it as you like. It is well tested with Windows 7 RC.

    If you have any questions, problems or suggestions, write a comment.

    Saturday, May 23, 2009 6:10:06 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [4]
    .NET | Avanade | Das wahre Leben | Software | Windows 7
    # Wednesday, April 22, 2009

    ! 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

    Wednesday, April 22, 2009 7:03:21 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [12]
    .NET | ProxySwitcher | Software
    # Thursday, April 16, 2009

    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

    Thursday, April 16, 2009 11:01:29 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [5]
    .NET | ProxySwitcher | Software
    # Saturday, April 04, 2009

    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…)!

    Saturday, April 04, 2009 4:14:53 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [11]
    .NET | ASP.NET 2.0 | Microsoft | Silverlight
    # Friday, April 03, 2009

    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. ;-)

    Friday, April 03, 2009 12:18:47 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    Fun | Microsoft | SharePoint | Software
    # Thursday, February 26, 2009

    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…

    Thursday, February 26, 2009 5:14:36 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    Avanade | K2 | Software | Visual Studio 2005
    # Sunday, January 25, 2009

    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.

    Sunday, January 25, 2009 1:16:22 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    Microsoft | Software | Windows | Windows 7
    # Wednesday, January 14, 2009

    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

    Wednesday, January 14, 2009 7:35:32 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | AutoHistory | C# Code | Office 2007 | Software
    # Sunday, January 11, 2009

    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.

    Sunday, January 11, 2009 2:54:14 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
    .NET | AutoHistory | Office 2007 | Software
    # Thursday, September 04, 2008

    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.

    Thursday, September 04, 2008 12:52:52 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | ASP.NET 2.0 | C# Code | SharePoint

    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.

    Thursday, September 04, 2008 9:24:02 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | SharePoint | Visual Studio 2005 | Visual Studio 2008
    # Tuesday, September 02, 2008

    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.

    Tuesday, September 02, 2008 8:44:01 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
    .NET | SharePoint
    # Friday, August 15, 2008

    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.

    Friday, August 15, 2008 6:52:30 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | Avanade | SharePoint
    # Wednesday, August 13, 2008

    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...

    Wednesday, August 13, 2008 9:52:06 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
    .NET | ASP.NET 2.0 | Microsoft | Software | Visual Studio 2008

    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.

    Wednesday, August 13, 2008 9:36:22 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
    .NET | Avanade | Microsoft | SharePoint
    Infos
    RSS Feed

    Technorati
    Mein Xing (openBC) Profil

    Free/Busy Free/Busy

    Karte Wo ist Marco?
    Zuletzt in:

    MCPD EA

    MCTS


    Translate
    English, French, Spanish, Italian
    Statistics
    Total Posts: 189
    This Year: 1
    This Month: 0
    This Week: 0
    Comments: 291


    Sign In
    All Content © 2010, Marco Wiedemeyer
    DasBlog theme 'Business' created by Christoph De Baene (delarou)