Social Icons

twitter google plus linkedin rss feed

Pages

25.7.11

Cloning a SharePoint Virtual Machine And Changing its Name in the process

The first problem I found was that after copying the virtual machine is that I couldn’t add it to my a new VM because the UUID in the VHD was the same as in the previous VM… I did this:

VBoxManage.exe internalcommands sethduuid g:\StratexPoint\StratexPointBigger.vhd

And then it worked. But now we have the tricky part. We have to change the name of the SharePoint WFE.

After we change the name of the server we try to connect to the central administration, but we get “Cannot connect to the configuration database.” so we ran the SharePoint Products and Technologies Configuration Wizard.

It complains that it can’t detect whether we are connected to a farm or not… OK. Then it disconnects the server from the farm and closes.

I must insist, my dear. I run the wizard again and select create a new farm. It tries to connect to the database server that happens to be the same server we have just changed the name…

SQL is not so delicate about names and it works.

Now we have to create a new Config_Database, ok, ok, and it looks like it’s going to work… but nooo.

System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.

After checking this post I changed the username of the identity of the SharePoint Central Administration V3 application and it worked .. but failed after a while, so I deleted the site, the directory and the application pool and tried again.

 

And It worked!


After that I started the services, created an 80 web application and attached the old content database to it.

 

Who said it was impossible?

No comments:

Post a Comment

11.7.11

HTTP 500 (No authority could be contacted for authentication.) in SharePoint

I was getting an HTTP error 500 after restoring my SharePoint development server in a different network (at home). The thing was a bit curious because I could see the SharePoint site from the virtual server, but not from my physical server and yes, I checked the IPs and they were OK. The first thing I did was to configure the IE9 to show me the HTTP errors the way I like them, the “unfriendly” way.

To do so I went to Tools –> Internet Options –> Advanced, and there in the tree below Browsing I unchecked the “Show friendly HTTP error messages”.

After that I could see that the problem I was having when connecting from outside was “No authority could be contacted for authentication.” Here I saw that the easiest way to fix the problem was to remove the server from the domain and then add it again.

And it worked... Finally…

No comments:

Post a Comment

8.7.11

Hiding List View web parts when they are empty

Today I have been required to hide the List View web parts of the solution when they are empty… Even though I don’t like javascript, it was the obvious way to go so I asked Google and it sent me to this post.

I copied the code to a Content Editor Web Part and it worked more or less, but when I tried to hide the column headers and adding a message instead it was only working for two of my the three listview web parts in the page… After a bit more of googling I changed it to:

<script type="text/javascript">
 function HideEmptyWebParts()
 {
   var itemsfound = new Array;
   var elements = document.getElementsByTagName('*');
   for(var i=0;i<elements.length;i++)
   {
      if(elements[i].className == 'ms-vb')
      {
         itemsfound.push(elements[i]);
      }
   }
  
   for (var i=0;i<itemsfound.length;i++)
   {
       if (itemsfound[i].innerHTML.indexOf("There are no items to show in this view of the")>-1)
       {
                itemsfound[i].parentNode.parentNode.parentNode.parentNode.innerHTML="<div class='ms-vb'>Not enough data to produce a dashboard.</div>";
         
       }
   }
 }

_spBodyOnLoadFunctionNames.push("HideEmptyWebParts")
 
</script>

And after that it worked as expected.

No comments:

Post a Comment

1.7.11

Debugging applications in the Phone after updating to “Mango”

I have just updated my phone to Windows Phone 7.1 codename “Mango”. I can’t say much about it because I haven’t had the time to test it properly, by now I’ll just say it’s faster.

 

Some of the features are not yet implemented and they have a “Coming soon!” but that’s not what I want to say here today.

 

After the upgrade I couldn’t debug my applications on my phone as before. The emulator was being launched (and this was causing all my vBox Virtual Machines to crash!)

 

After a while looking around I realised that it was easier than I thought… There’s a dropdown list up there for you to select how you want to debug:

image

You just have to chose Windows Phone Device and in my case unlock again the phone with the Developer Phone Registration tool and you are ready to go!

No comments:

Post a Comment