Categories: ASP.Net Posted by yeejie on 2/19/2010 1:43 PM | Comments (0)

Do you have this script that is not running in IE8:

var mybtn = document.createElement("input");
mybtn.setAttribute("onclick","alert('Javascript not working!');");

OR

mybtn.setAttribute("class","someCSSclassthatnotworking");

If yes, try this instead:

mybtn.onclick = function() { alert('Javascript working now in IE8!'); };

mybtn.className = "finallyCSSworking";

Credit to the following sites: http://www.tgerm.com/2009/02/javascript-ie-setattributeclass-or.html and http://stackoverflow.com/questions/1019078/how-to-set-onclick-attribute-with-value-containing-function-in-ie8

Categories: Sharepoint Posted by yeejie on 2/1/2010 7:56 AM | Comments (0)

Pasted from http://blah.winsmarts.com/2006-12-Backup-Restore_a_site_collection_in_SharePoint_2007.aspx

The best way to backup a SharePoint site is –

Stsadm –o backup –url <SiteURL> -filename <FileName>

For example: Stsadm –0 backup –url http://sharepoint:100 –filename c:\sharepoint100.bak

To restore the site, use

Stsadm –o restore –url <restoretoURL> -filename <filetorestorefrom>

For example: Stsadm –0 restore –url http://sharepointNEW:100 –filename c:\sharepoint100.bak

Categories: Sharepoint Posted by yeejie on 2/1/2010 7:45 AM | Comments (0)

Few searches revealed that this id is corresponding to Publishing Timer Jobs. To install the feature, run the following command:

stsadm -o installfeature -name PublishingTimerJobs

Categories: XML Posted by yeejie on 1/24/2010 9:54 AM | Comments (0)

The xsl:param instruction is just like xsl:variable with one important difference: its value is only treated as a default value and can be overridden at runtime.

Reference: http://www.xml.com/pub/a/2001/02/07/trxml9.html?page=2

Posted by yeejie on 1/21/2010 4:51 AM | Comments (0)

<Pasted from http://blog.sqlauthority.com/2008/09/09/sql-server-error-fix-sharepoint-stop-working-after-changing-server-computer-name/>

If Microsoft Office SharePoint Server (MOSS) and your database (MS SQL Server) are running together on same physical server, changing the name of the server (computer) using operating system may create non-functional SharePoint website.

When you change the physical server name the SharePoint is already connected to the SQL instance of old computer name (OldServerName/SQLInstance) and on changing the name the SharePoint will not able to connect the SQL Server  as now the SQL Server instance will run on new computer name (NewServerName/SQLInstance).

To solve this problem you need to reconfigure the entire Microsoft Office SharePoint Server with SQL Server Instance. Please follow the steps to fix the issue.

1. Open command prompt, change directory to where stsadm.exe exists.

C:\cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

1 

2. To invoke setconfigdb operation we need to use stsadm.exe. Run following command on command prompt

stsadm.exe -o setconfigdb -databaseserver ServerName -farmuser MyUserName – farmpassword MyPassword

2

3. Go to IIS, All Programs>>Administrative Tools>>Internet Information Service (IIS) Manager.

3

4. Right Click SharePoint Central Administration v3, click on delete and re-run the configuration wizard; the web application will be re-created by the configuration wizard.

4

5. After the above operation has completed successfully, run the SharePoint Products and Technologies Configuration Wizard.

All Programs>>Microsoft Office Server >> SharePoint Product and Technologies Configuration Wizard

5

6. Complete all the steps of wizard by clicking on Next button.

6

At the end of this process you will get a success wizard.

On completion of this whole procedure Microsoft Office SharePoint Server gets connected to the database with new Computer Name

Posted by yeejie on 1/20/2010 11:01 AM | Comments (0)

It’s Wednesday morning, I got a shock when my engineers told me that they are not able to connect to Team Foundation Server. As usual, the best remedy of all time: RESTART the computer and server. However, it’s still not working. I still hit the error as mentioned above.

If you were in my situation, no panic :). Go to “IIS” of your TFS server, expand “Application Pools”, notice “Microsoft Team Foundation Server Application Pool”. Is it Stop or in Error mode? If yes, do the following and have your nice day:

Note the identity of your application pool. E.g.: Domain\TFSService. Go to “Active Directory Users and Computers” or “Local Users and Computers”, right-click and select Properties of that user, and check the “Password Never Expires” box. Now, restart your server or start the “error” application pool.

Thanks to Niraj for the guidance (http://nirajrules.spaces.live.com/blog/cns!12C5F7733841CB22!119.entry).

Categories: ASP.Net Posted by yeejie on 1/11/2010 8:27 AM | Comments (0)

A great post comparing the differences between ASP.Net MVC validation framework available out there: http://goneale.com/2009/06/25/aspnet-mvc-validation-refresh-best-techniques-frameworks/

As I tried, “devermind.com: Client-side form validation made easy (w/ xVal)” so far remains the best validation framework as it combines Data Annotation, jQuery and xVal methods together.

Posted by yeejie on 1/8/2010 4:30 PM | Comments (0)

Pasted from http://www.codetoday.net/default.aspx?g=posts&t=1595. Thanks to AdmOd.

1) In your IIS, identify your web site’s application pool as illustrated as below.

001(2)

2) Go to Application Pools under your IIS

002

3) Right-click the early identified Application Pool, select “Advanced Settings” to go to the menu as shown below. Change the “Build-in account” value to “LocalSystem”

003

Categories: ASP.Net Posted by yeejie on 1/8/2010 7:58 AM | Comments (0)

Pasted from http://weblogs.asp.net/hosamkamel/archive/2008/11/20/asp-net-mvc-project-and-team-build-issue.aspx. Original Author: Hosam Kamel

To get the MVC project build successfully with the team build make sure of the following:

- Your build server has the WebApplication targets file located in <Program Files> \MSBuild\Microsoft\Visual Studio\v9.0\WebApplications , if not . copy this file from your development machine to the same path in the build server.

- You have installed ASP.NET MVC framework in the Build server, this is the most important step otherwise you application will not build successfully in the team build you may faces some errors like :

error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

or

Controllers\RuleController.cs(31,10): error CS0246: The type or namespace name 'AcceptVerbs' could not be found (are you missing a using directive or an assembly reference?)

** Update

This will work with Beta version of ASP.NET MVC since the installation register the MVC assembly in GAC.

For preview versions , you can reference the DLL from your build project

<AdditionalReferencePath Include="C:\Program Files\Microsoft ASP.NET\ASP.NET MVC CodePlex Preview 4\Assemblies" />

Categories: Win 7 Posted by yeejie on 11/7/2009 7:00 PM | Comments (0)

Pasted from http://www.enduserblog.com/2009/09/using-the-windows-7-problem-steps-recorder.html. Original article by Debra Shinder

One of the brand new features in Windows 7 is the Problem Steps Recorder, which is a very cool screen capture utility, the intended use of which is to allow computer users to do a step by step recording of the actions they take that result in a problem, rather than trying to verbally describe it to a tech support person. You may find other, more creative uses for it, as well. Here’s how it works:

To open the tool, click Start and type psr.exe. Click it in the list and the recorder bar opens, as shown below.

6a00e54ed05fc288330120a5b7a843970c

As you can see, the interface is compact and very simple, making it easy for even novice computer users to use. You simply click the Start Record button to beginning capturing what you’re doing on the computer. You can pause or stop the recording at any time.

At any point in the recording, you can click the Add Comment button and the recording will pause, and a text box will pop up where you can type in clarifications or questions you might have about that particular step, or information that’s not visible in a screen capture (such as the computer emitting a sound).

During the recording, the duration of the recording will be shown in the box on the right side of the window. Once you stop the recording, you’ll be prompted to give the recording a name and save it as a zipped file. When you open the .ZIP, you’ll see a file saved in .MHT format, which is a web page archive that can be viewed in Internet Explorer or another web browser, as shown at below.

6a00e54ed05fc288330120a5612e04970b

Double click the .MHT file, and it will open in your default web browser. You’ll see a series of screen shots, along with the time recorded and even a description of each action that you took during the recording, as shown below. Any comments you insert will be shown.

6a00e54ed05fc288330120a5612e33970b

As you can see, if you have multiple monitors, all of the screens will be shown in the capture. The area where you’re clicking with the mouse is highlighted in green.

This takes much of the frustration out of troubleshooting for both the user and the support tech. You don’t have to worry about the user leaving out steps or not being able to properly describe what he/she did. At the bottom of the page is an “Additional Details” box that contains information such as the version numbers of the programs, user interface elements that were in use during each step, and so forth.

If you click the Down arrow at the very right side of the PSR window, you’ll see options to run the tool as an administrator or to send the recording to an email recipient. You can also click Settings … to change the output location for the .ZIP files (by default, they’re saved to the desktop), to enable or disable screen capture (if you disable it, you will get the text description of the steps only, not the screenshots), and specify the number of recent screen captures to store (25 by default).

Troubleshooting isn’t the only use I’ve found for it. If you want to show someone else exactly how to do something in Windows 7, but you can’t use Remote Assistance, you can perform the task yourself – recording it with the PSR – and send that person the file. Now the person has the step-by-step instructions, along with screenshots. Very cool.

Some have gone so far as to call the Problem Steps Recorder a “miracle tool.” For those whose job it is to sit and listen to users describe their computer problems all day, it just might be.