Pages

Search This Blog

Sunday, March 16, 2008

Visual Studio .NET has detected that the specified Web Server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications o

I've received error message when try to open visual studio.net.
Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services

I suspect some of my newly installed application cause the webserver port change from 80 to others. My case is easy to solve, i uninstall my newly install app called: "Raysource" and it's work and running.

For more information on this error, please check in

http://support.microsoft.com/kb/817267

http://www.dotnetspider.com/kb/Article2476.aspx





Sunday, March 9, 2008

Exclusive access could not be obtained because the database is in use.

I try to restore a new database in MSSQL 2005 and hit error
Restore Failed For Server 'xxxx' (Microsoft.SqlServer.Smo)
Additional information:
System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo)


This is mostly caused by others user/session is using the database at the same time. To check whether got others user accessing the same database, execute SP_WHO will show who is using the database. Execute KILL to kill the process. In my case, i want to kill process with spid = 53

execute SP_WHO -- See which process in running

Execute KILL 53 -- 53 is the process id spid that i want to kill before restore.

In my case, i restore the database using script instead of using the SSMS.

Below is the script that i use to restore without any issue.


RESTORE DATABASE RateMyPosts
FROM DISK = 'C:\Documents and Settings\DEV1\Desktop\RatePosts.bak' WITH REPLACE,
MOVE 'RatePosts' TO
'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\RatePosts.mdf',
MOVE 'RatePosts_Log' TO
'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\RatePosts_log.ldf'

Saturday, March 1, 2008

VBScript: disabled and enabled button

<html>
<head>
<title>VBScript Example: disabled and enabled button</title>
<SCRIPT Language="VBScript">
sub enableButton()
if frm.chkbox_1.checked = true then
frm.btn_1.disabled = false
else
frm.btn_1.disabled = true
end if

end sub
</SCRIPT>
</head>
<body>
<form name=frm>

<input type="checkbox" name="chkbox_1" value="ON" onclick="enableButton()"></input>
<input type="submit" value="I Agree" name="btn_1" disabled></input>

</form>
</body>
</html>