Get more MOSS Error logs instead of “An unexpected error has occurred”


Online project management, task software, and free collaboration workspace: AJAXWorkspace
AJAXWorkspace is a free online workspace that offers task tracking software, team collaboration, online calendar, document sharing, and file management for project management and teamwork.

Are you getting frustrated with “An unexpected error has occurred” in sharepoint 2007? I found some useful tips. You can get more error messages from MOSS especially when they are not written to the application log. Do follow the steps below to get more:

1. Go into the web.config and set custom errors to off:

<customErrors mode=”Off” />

2. Turn on tracing and the callstack by setting both to true:

<SafeMode MaxControls=”200″ CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”true”>

3. There can be valuable info in the Event Log, so check there for more information on any exceptions that may have been thrown.

Problem with web part Target Audience


I am working on a SharePoint dashboard project recently. We have a lot of pie chart and graph integrated using Reporting Services Add-In web part. We have set Target Audience in each web part to offer multiple views to different users. It works fine in the past until this Monday. All the web part with target audience tie to AD group disappear. After spending half day on it, we found that the password for search service and content access crawler account expired. This effect the user profile and cause the target audience failed. Do check out these accounts if you have similar problem.

Charter Member for SharePoint Server: Application Development


I received a certificate stated “Charter Member” for a beta exam I passed early this year. It looks cool. But I have no idea what is that means? Anyway, more (certificates) better than less :)

SharePoint Search Service Error - Could not access the Search service configuration database


I got error “Could not access the Search service configuration database” to start the search service after filling in the account and database info while seting up SharePoint (MOSS 2007) in a server farm. After googling, apparently SPSearch(or WSS) doesn’t like its server name to be a FQDN, instead, it prefers NetBIOS. To solve this, you have to change the FQDN name to a NetBIOS name in the SharePoint_Config database.  IMPORTANT!! Please do a database backup before proceed!!

Here is the solution I found:

Open your SQL Query Analyzer and execute this command. This command will replace the “NETBIOS” and “FQDN” string to your server settings.
use SharePoint_Config
UPDATE Objects Set Name=’NETBIOS’ WHERE Id=(SELECT Id FROM Objects WHERE Name=’FQDN’)

Compress VPC image size


Just to log down here is a good reference to teach you how to compact VPC image’s size

http://grandstreamdreams.blogspot.com/2006/10/how-to-optimize-your-virtual-pc-vista.html

IE 6 support Windows NT 4?


Yes. If you are looking for the installer. Get it here

Please take note that IE6 require Windows NT 4.0 with the high encryption version of Service Pack 6a and higher:

Disable right click on SQL reporting services report in SharePoint 2007


We are working on SharePoint Workspace with Business Intelligence solution. There some report build with reporting services show in SharePoint page. Then, we come across a special requirement that the client do not allow user to “Right click” on the entire SharePoint page including the reports. If you are using page viewer or report web part to view the report in native mode, you will never able to include your JavaScript to disable the right click. This is because it using iFrame to link to the report. To overcome this problem, there are 3 steps need to be done.

  1. Install and configure Reporting Services Add-in for SharePoint
    First, we need to install the “Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies” add-in and change reporting services to SharePoint integration mode. You can download the add-in in https://www.microsoft.com/downloads/details.aspx?familyid=1E53F882-0C16-4847-B331-132274AE8C84&displaylang=en  and get some introduction on its benefit here http://blogs.msdn.com/SharePoint/archive/2007/02/19/microsoft-sql-server-2005-sp2-reporting-services-integration-with-wss-3-0-and-moss-2007.aspx . You need to configure the reporting services after installed the add-in. You can easily find some help via google. Once done, you have to upload some report to SharePoint document library.
  2. Add JavaScript to disable the right click on SharePoint.
    To simplify the story, we use Content Editor Web Part to ad in the JavaScript. Enter code below in “Source Editor”:
    <SCRIPT language=”JavaScript” >
    function queryString(parameter) {
      var loc = location.search.substring(1, location.search.length);
      var param_value = false;
      var params = loc.split(”&”);
      for (i=0; i<params.length;i++) {
          param_name = params[i].substring(0,params[i].indexOf(’='));
          if (param_name == parameter) {
              param_value = params[i].substring(params[i].indexOf(’=')+1)
          }
      }
      if (param_value) {
          return param_value;
      }
      else {
          return false; //Here determine return if no parameter is found
      }
    }
    function right(e) {
    if (navigator.appName == ‘Netscape’ &&
    (e.which == 3 || e.which == 2))
    return false;
    else if (navigator.appName == ‘Microsoft Internet Explorer’ &&
    (event.button == 2 || event.button == 3)) {
    alert(”Sorry, you do not have permission to right click.”);
    return false;
    }
    return true;
    }
    document.onmousedown=right;
    document.onmouseup=right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (document.layers) window.captureEvents(Event.MOUSEUP);
    window.onmousedown=right;
    window.onmouseup=right;
    </script>
    addin01.jpg
    The right click will disable on the specify page now.
    Read the rest of this entry »

How to solve slow reponse with ASP.NET AJAX in IE 6?


As mentioned in my previous articles (ASP.NET AJAX very slow in IE 6), the problem come from IE 6 it self response slow in managing asp.net AJAX big resource file such javascript and DOM object. Here are some steps can be done to solve it:

  1. Put your apps in to better perfomance server with greater bandwidth.
  2. Apply IIS compression to imporove the loading time.
  3. Try to minimize the usage of AJAX Update panel in your apps. Do use web services rather than update panel (I know this is not 5 mins work, but this is the root of the problem).
  4. Do not use IE 6. Use IE 7 or FireFox instead (if the steps above do not help :P) 

Please do let me know if anyone have better solution!

Response.WriteFile/TransmitFile fails when compress dynamic files turn on inIIS with SSL


I come across error file not available when download file via response.writefile or transmitfile in asp.net. This error only happenned when you  site on SSL. IIS 6 compression help me speed up all my applications. But the problem occur when some of my aspx page using response.writefile to download file. I get error file not found.

So I have to turn off the specific aspx page do not use IIS compression in order to make my download works.  To configure that, it take me days to find out the solution. You can buy some 3rd party product to configure that. But that will not cheap. Here are the free ways to do it :)
1. First, to create a node for the page in the metabase in IIS manager. Right click on the file and go to properties. Make a change of some sort, apply, then change it back. Do an IISReset. This will create a IISWebFile node in MetaBase.xml

2. Try on this command “cscript C:\Inetpub\AdminScripts\adsutil.vbs set W3SVC/{siteID}/Root/{subfolder}/{page.aspx}/DoDynamicCompression False”

SiteID is a number represent your web application.

3. If you get error running this command, try to open MetaBase.xml and search the IISWebFile tag which represent “{subfolder}/{page.aspx}”. Then add in:

DoDynamicCompression=”FALSE”

Then, do an IISReset.

That’s all folks. Hope can help someone having the same problem

ASP.NET AJAX very slow in IE 6


I built some web applications with ASP.NET ajax framework using few update panel. The response time in IE 6 was very slow. You do not know this problem while you access it in you local host. Once you put it to production or live hosting, its really slow like turtle. IE 7 will be much better, so far it seems 2x faster than IE6. Firefox is the best among these browser. It work extremely fast and estimated 4-5x faster than IE 6. This is a known issue exist within IE6 and ajax update panel. There is a need to fix this issue. But it seems not a 5 mins works. I may need to do a major change on my existing application… too bad..