After STSADM restore to new farm getting DirectoryNotFoundException - sharepoint

I did a restoration of the complete site collection using the stsadm restore into a new farm. The site as it is work good but I have one wiered issue that whenever I visit the root site I get the following error.
If I visit the sub sites directly this is what I see in the top navigation
Here is what I have found in troubleshooting it
If I do a app pool recycle or IISReset the issue is gone and site works perfect
The error comes back after few minutes of site usage
The different steps that I took after looking at few other places are
Deactivate and reactivate the SharePoint Publishing Infrastructure
Change the master page
Reset the blob cache, output cache and object cache (I doubt this was the fix, cause cache is not enabled)
Clear the sharepoint configuration cache as per this site
Please let me know your thoughts on how I can fix this and following in the farm details
Server - Windows 2003 x86
SharePoint - MOSS 2007 with build number 12.0.0.6656
Thanks
Deepak

Deactivating and reactivating the publishing site feature in the Site Collection and Web fixed it.

Related

Creating test application by restoring database in SharePoint 2010

We have planned to migrate our SharePoint server 2010 to SharePoint Online (Office 365). Before we migrate our production site, we have tried to create a test environment in SharePoint server 2010 using the backup data of our production sites. We have tried the below steps to create a Staging environment as like our Production environment. Can anyone suggest the steps for migration or the steps we have followed is good.
Steps :
I have backup the content database.
Created a new web application and restored the backup database to this web application.
As the site is not loading and hence we created a new site
collection.
Once the new site collection is created, the site is able to load but the site and content of production site is not restored as like in our testing site.
Will restoring the database is enough to restore the site collection in the application in SharePoint or need to restore the site separately to the web application. Any suggested solution will be grateful for me to proceed.
Thank you and Best Regards,
Ragunaathan M P
If you are creating a test environment to use for SharePoint online your best bet is to use the 2016 bits. When you move your content over you need to do make sure you have upgraded the content.
So you would do some flavor of the following:
1) Backup the existing database
2) Restore the DB to the new farm
3) Mount the DB (Mount-SPContentDatabase xxx)
At this point (this is very overly simplified you should be able to render the sites.
Lots of other factors will be involved (InfoPath, Full Trust Code, Workflows, etc). However if your content is pretty vanilla this is what I would do. Dp not use the nob2bsiteupgrade option on mount or you will have an upgraded database schema, but your sites won't work.
To validate your upgrade check the logs and look at the versions table in the database. You should see a 16.x.x.x version. The other numbers are the upgrader actions and won't tell you much.
Here are some references:
Upgrade Content
Upgrade-SPContentDatabase
Mount-SPContentDatabase

How to export/move a Sharepoint 2013 site

After building a protoype Sharepoint site for the client I am now looking to export it for the client's eyes.
I'm looking for the best solution for exporting, sharing or moving a Sharepoint 2013 site for the client to see on their server. The site is currently only on one server so no server farms are involved.
The site is built using Sharepoint 2013.
I've been running through this guide, but could anyopne clarify if this process creates a back-up of the entire site or just the database: http://technet.microsoft.com/en-us/library/ee428301(v=office.15).aspx
Any help would be greatly appreciated - Thanks!
There is a great video on how to do a backup and restore in SP10.
This does work for SP13 except the backup needs to be done with PowerShell.
How Do I: Backup and Restore a SharePoint 2010 Site Collection?
The backup and restore is not guaranteed to give you the exact result as some features could be activated and some CSS could change the look of the imported site.

Blank Page when navigating to SharePoint site

I created a SharePoint web-application, and a new site collection under it. I made it SSL Enabled. (Now I could view the site and modify/add content). I started modifying the landing page of the sites I created. Basically I created a copy of seattle.master and applied this new css file to my pages. Now suddenly, I see a blank page with no error information, on navigating to my site collection. I tried the LoopBack fix to no avail. I feel this is an authentication issue, but I am unsure where to go from here. Moreover, SharePoint Designer refuses to connect to the site as well (I am getting- SharePoint Foundation not installed on this server error, which is not the case). I have Sharepoint Server 2013, and the web server is on Win Server 2008 R2. Any ideas?
I had the same issue with my sites on all site collections under a web application.
I tested the other sites in the other site collection and they were coming up ok.
I checked the content database, took it off line and reset it, same issue. Checked log files, no errors in the log files, reset IIS and app pools same issue, checked permissions on the webapp in iis, same issue.
Solution.
Replaced the webconfig from yesterdays backup and it worked,
a solution that was deployed to the web application and activated on the site collection must added some entries and corrupted the file

Site does not update after publish

I am publishing the site using VS 2012 Publish website option. But the site does not get updated. I have to restart the website from manage.windowsazure.com every time after publishing.
I have been running the website on both free and shared mode. Same situation in both mode.
Any suggestion how to update the website automatically after publish?
Mmm. If your change regards CSS and JavaScript, try browse your website by using Ctrl+F5. If it seems totally not being updated, you might need to check the deployment page of your website on azure portal to see if it's get updated or not, or something wrong.
HTH

SharePoint development nightmares

I thought I'd give SharePoint development a go, to broaden my understanding of Microsoft technologies and ran into a situation I refuse to understand.
I have a new web application created: http://localhost:11523 and set up the site collection as required. I can browse to the web site fine, without any issues, but now I want to start developing against this, using the object model.
Right, so after I struggled with SPSite site = new SPSite("http://localhost:11523"); I figured that I'm not running VS2008 in elevated permissions, so restarting VS I finally got one step further.
Whenever I step into my code, I get:
The Web application at
http://localhost:11523/ could not be
found.
I've Googled this without luck. The application is most definitely there, I can browse it, add web parts and go mad. I just can't seem to connect to it via Visual Studio.
Any ideas would be great.
EDIT
I thought I'd isolate my method, called "GetListFromSharePoint(string name)" into a test method (nUnit Framework) and to my surprise returned 9 entries from the list, as expected. When I dumped the method back into my web application (not SharePoint, trying to test the Composite Control through a normal Web site), and run into the mentioned problem.
This is in SharePoint 2007, and I'm developing on the same machine onto which SharePoint 2007 is installed.
This approach used to work, for some reason, I just can't get it to recognize SharePoint. The test stubs work find, just not the web application.
Edit 2
So there where a couple of things I "missed", which kind of solved the problem by itself.
Firstly, I was developing on a x64 Windows 2008 box, thus SharePoint 2007 was running in x64 mode. Cassini, turns out, is 32bit regardless of the platform you run it on, which caused some compiler bugs (I did not have IA64 compilers installed). After installing this, I figured out that the default web site (localhost:80) had been disabled by SharePoint.
Renabling the default web site, allowed me to create my web application as a virtual directory against it, which allowed my debugger compiler to run in x64.
My next challenge was access permissions. Because any new virtual directory on port 80 is assigned to the default application pool, is it assumed that the user does not have the right permissions, so I had to change my web application to run under my SharePoint web application's application pool.
The last thing I had to do was run my SharePoint code with elevated permissions.
Working like a charm :D
Note! Enable debug on your SharePoint web application....
Thanks,
Eric
(You have not specified version - assuming SharePoint 2010).
You need to decide what object model you want to use:
client (to be able to access the server from any other machine)
server (the one that you are trying now, can only be run locally).
Most likley reasons your code not work:
using "localhost" instead of ""computer name" in the Url. (I believe it is the reason.)
you are running your code not on the same machine as the SharePoint
you are running code under non-admin account
Check out how sites collections are configured in "Central Administration" site - urls associated with each site collection are listed there - make sure you are using correct one.
You can also try enumerating all site collections in SPWebApplication (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.sites.aspx) to start expiriments.
I dont think the SPSite connect through the IIS, and if SharePoint isn't set up to respond to localhost (done in the Central Administration) you wont be able to connect to that url. IIS works a bit different here since it relays the signals to "localhost" to the "web application instance".
Start by checking in your SharePoint Central Administration. Go to "Configure alternate access mappings" in the "System Settings" section. Here you have your SharePoint instances, there are three properties which you can see directly in the list; 'Internal URL', 'Zone' and 'Public URL for Zone'.
If the Internal URL isn't set to Localhost you wont be able to use that connection you suggested. It bay be improper to change this to another url as well, so simply try to set your SPSite site = new SPSite("http://yourinternalurl:11523"); to whatever's in that box! :)
Cheers

Resources