Getting "Debug Info" for a Sharepoint error!

本文介绍了一次尝试迁移SharePoint SQL数据库导致MySite功能出现错误的问题及解决过程。通过调整.NET Framework设置获取更多错误信息,最终定位问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Some time ago I had the bright idea of moving the SQL databases for Sharepoint. I was running a VPC with only one virtual drive and started running out of disk space. So I decided to create another virtual drive, detach the SQL databases from SQL Server, copy them to the new drive, mount the databases and test the Sharepoint configuration.

Everything should have worked perfectly, wrong! In theory Sharepoint should only be looking at the logical names of the databases, but it seems that I was mistaken. Most of the functionality in Sharepoint worked perfectly expect for "MySite". When I selected the link at the top of the Sharepoint site.

MySite Link

I got the following error.

File Not Found

As you can see it is completely descriptive and tells you exactly what to do to fix the error, NOT!!!!

So, now what! Without some more information to go on, it becomes a bit difficult to resolve the error and as we all know the "Event Log" only goes so far.

Fortunately Sharepoint has been built using the .NET framework and we can use that to get some more info. To do this, we need to go and change some settings in the web.config file that sits in the root of the web site in IIS. Even tough Sharepoint stores most of its information in the SQL Server content database, it still needs the .NET framework to process this information.

To find the web config file, we need to navigate to the "Inetpub" directory using windows explorer.

Folder Structure

Under the "Inetpub -> wwwroot -> wss -> Virtualdirectories" folder, you will find sub folders representing each of the web applications used by Sharepoint including the system web applications. Each of these have their own web.config file.

Edit Web Config

Find the correct folder representing the web application causing the problem and edit the web.config file using your preferred text editor. I like using "Notepad" as it is "Light Weight" and does not have all the "Bells" and Whistles" I do not need.

There are two section that we need to modify in this file. The first section involves the "Call Stack" of the .NET framework. This will give us a list of all the assemblies involved in the error. This can be done by setting the "CallStack=True" flag.

Callstack True

The second thing that we need to do is switch the "customErrors mode=Off" so that the information will actually be displayed on the screen.

Custom Error Off

Once these options have been configured and the web.config file saved. We can then re-simulate the error and see what you get back.

Complete Error

As you can see, we now get a lot more information back that can potentially be used to help resolve the error. I did not say the information will be useful, I only said that you will have more of it.

Remember to change the web.config back to it's original state after you have resolved the error. This information should not be available publicly on the intra or Internet as this could be a potential security risk.

Related Blogs:

ASP.NET error registering with IIS

Overview of the .NET Platform

.NET 2.0 Framework

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值