| |
microsoft.public.sharepoint.portalserver |
Here's the fix. The code was developed by MSFT support (as-is, no warranties). Put the full bad URL in the first box: http://sharepoint/apps/badsiteurl.aspx The code below is part of a Visual Studio solution which I can't attach. using System; namespace UpdateServerRelativeURL private void button1_Click(object sender, EventArgs e)
Put the good relative URL in the second box:/apps/goodsiteurl
Here's the meat of the code to get the gist of how the fix works:
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.SharePoint;
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
{
SPSite mySite = new SPSite(textBox1.Text);
SPWeb oWeb = mySite.OpenWeb();
oWeb.ServerRelativeUrl = textBox2.Text;
oWeb.Update();
MessageBox.Show("URL of the site " + textBox1.Text + " updated
!!!! ");
}
}