Pages

Monday, 13 May 2013

MSMQ again

Follow up on previous post about msmq problems.

After a bit of investigating I found that my profile was damaged in some way so that the net.pipe, net.tcp and net.msmq bindings shoved up as being asociated to (unknown). After deleting local profile and logging in again everything was peachy!

Friday, 3 May 2013

Windows Server 2012 and uninstalling .net v4.5

Yes, sometimes we do those little things that's really really not a good idea.
We had a bit of trouble with a MSMQ-queue in a project and since I am in no means a server person i thought it odd that HTTP Activation was not installed for .Net Framework 3.0 when it was so for 4.5, so I installed that feature. Big mistake it turns out. After this the net.msmq, net.pipe and net.tcp bindings stopped working. Ok, I think we might have fixed this if we had just re-installed the 4.5 version of the http-handler but instead I accidently uninstalled .net Framework 4.5. This is a big no-no on a Windows Server 2012 apparently so when server had restarted we were in core mode (no gui) without powershell! I should point out that of course this was no production server, I have enough self preservation to not go near those ;)

Internet to the rescue!
This technet forum-post and this blog-entry really helped out.

Basically they offer help to first activate to Powershell feature and then how to install two features from installation media. Back to square one!

Friday, 26 April 2013

Paris - 2013


So, Back from Paris. It was a new experience for me to visit such a large town. I had a hard time getting a feel for it but then again I only had 2 days to soak it all in.

Place de la Concorde and Eiffel Tower
Saturday
Plane left from Stockholm Saturday afternoon and arrived in Paris after about 2 hours. The first thing that really jumped out was the warmth and all the green lawns. Spring really had a head start in France.
We went by public transport to the hotel (ReR and Metro) which was pretty smooth even in rush hour. Hotel was near Place d'Italie so it was easy switching from ReR to Metro at Gare du Nord.

First night was planned as a visit to Buddah Bar where we wined (well not me.. you know) and dined in an environment that I was not used to. The food was great and promised a great culinary experience. We took a taxi back to the hotel at around midnight for some well deserved rest.

Sunday
Breakfast was ok but nothing compared to swedish hotel breakfasts. After this it was time for some work which lasted up until lunch. This lunch was a real disappointment with a minced meat burger without any seasoning and a weird tasting french dressing. Off to see the sights of Paris! We went looking for a place to score some tickets to sunday's soccer game between PSG and Nice but we were out of luck. Instead we walked to Notre Dame and then onwards towards the Louvre museum.



We took a tuk-tuk from the Concorde to the Eiffel tower as at this time the size of Paris were getting to us and we needed some rest from all the walking.

The night meal was an ok entrecote with a great "gratin dauphinois" (potato gratin) a side street from the Eiffel tower. I will not get over the fact that coke seems to be one of the most expensive drinks in Paris on par with beer and other drinks.

We left for a sports bar to watch the game we didn't manage to get tickets to. I think it would have been less painful if Zlatans team had lost but instead the won with a nice game from Zlatan. Taxi back to hotel around midnight again for some rest.


Monday
After breakfast and more work and a slightly better lunch (entrecote again) we went off to do some sightseeing of the catacombs of Paris. What we didn't know is that all museums are closed on mondays so we went looking for the grave of Serge Gainsbourg, french musician and cult figure.

Serge's grave

This day was supposed to be a day of shopping for souvenirs for the kids but we had a big disappointment at the Montparnasse tower where the mall Lafayette was in disarray and no interesting shops whatsoever. We went towards the Eiffel tower looking for a shop with suitable presents for the kids, there was none. So we walked and walked and walked and eventually wound up near Serge's home prior to his death.

Serge's home


It was a bit of a surreal place where all the buildings surrounding this lot was perfectly clean and only this small bit was filled with tributes to Serge. Starting to feel a bit of pressure to get the shopping done we headed towards what our friends told us were good shopping streets near Champs-Élysées.

Tired and hungry!
We had walked for almost 8 km by now and we had to take a lot of small pit stops to rest. We went behind the buildings near the US embassy and noticed that all the shops were Marc Jacobs, YSL, Cartier and such. Yeah, good shopping! So, at this time hungry we trudged on towards our companions who were further up towards the arch of triumph. It took us another twenty minutes to get there and then we went back the same way we had just went another 15 to get to the restaurant!! Anyways by this time we were might hungry and the crepes we got were great! Don't know if it was due to hunger or if it was really good. At 23.00 I went back to the hotel with no shopping done. Doh!

Tuesday
Taxis to airport left at 7.30 so not much to report from France this day. Security at the airport decided to do an extra check of my luggage. After the first two dirty underwear the security officer decided that he had seen enough ;)

Summary
The trip was ok but I really want to know more french before next trip to Paris. More focus to one or two areas and taxis in between (they were quite cheap) because I must have walked over 20 km those two days. Food can be tricky so check reviews well on beforehand you go. The creperie I can recommend!






















Friday, 15 March 2013

RadGrid validation in both Insert mode and edit mode

At work we recently had a case where a RadGrid had to be in both Edit mode and Insert mode at the same time. Some fields were Required and had regular expression validators that in insert mode had default value of empty string (now allowed on save) When one was supposed to edit a row this was not possible due to the fact that the aforementioned validator would kick in and RadGrid only allows one Validation group in it's validation settings. Solution: In ItemCreated event we put in a check to see whether e.Item.ItemIndex was -1 (Insert item) and changed the added validators validation group for the insert Items and then use a recursive method to find all ImageButtons on this Item to change that buttons validation group to the insert validation group.
 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
 {  
   // Add validators  
   if ((e.Item is GridEditableItem && e.Item.IsInEditMode))  
   {  
     string validationGroup = null;  
     if (e.Item.ItemIndex == -1) // InsertItem  
     {  
       validationGroup = "RadGrid1_Insert";  
       var controls = e.Item.FindRecursive<ImageButton>();  
       foreach (var item in controls)  
       {  
         item.ValidationGroup = validationGroup;  
       }  
     }  
     else // EditItem  
     {  
       validationGroup = "RadGrid1";  
     }  
     // Add you validators here  
   }  
 }  
 public static class UserControlExtensions  
 {  
   public static IEnumerable<TCtrl> FindRecursive<TCtrl>(this Control control)  
 where TCtrl : Control  
   {  
     List<TCtrl> foundControls = new List<TCtrl>();  
     foreach (Control foundCtrl in control.Controls)  
     {  
       if (foundCtrl is TCtrl)  
       {  
         foundControls.Add(foundCtrl as TCtrl);  
       }  
       foundControls.AddRange(FindRecursive<TCtrl>(foundCtrl));  
     }  
     return foundControls;  
   }  
 }  
Thanks to Mats Lycken for helping me on this!

Thursday, 3 September 2009

Telia e-legitimation och windows 7 / firefox

Lyckades idag med konststycket att installera e-leg från telia. Eller som Erik sa: "Pappa du är bäst". Tror inte han vet vad jag gjort men det är skönt med sån uppbackning!

Varför?
Telias tjänst kollar vad du har för browser och operativsystem så att man inte råkar installera det där det inte fungerar. Tusen tack. Men om man nu tror sig veta att det _ska_ fungera.

Hur gör man då?

Ladda ner:
IIDSetup

Denna installerar direkt i windows 7.
Starta sedan tjänsten.

Dra sedan ner ett plug-in till firefox som heter "User Agent Switcher" och starta om firefox.
Länk för de som inte hittar: User agent switcher

Importera sedan extra agenter
härifrån

Jag har seb som bank så nedan följer hur man gör där.

  1. Logga in på internetbank
  2. E-legitimation
  3. Verifiera
  4. Byt User agent till "Firefox 2.0 (WinXP)" under "Verktyg" (Tools)
  5. Tryck på "Till telia"
  6. Nu kommer en pop-up där kontrollen går igenom. Du får sedan välja lösenord för den nya e-legitimationen.

Hoppas detta hjälper andra. Kommentera gärna om jag missat något!