Changing MSSQL Ownership of a Table

Sometimes, you are moving your SQL Server database from one server to another server and you found out the connection string is correct but the database could not be connected.

You may check if your schema set correct from your MS SQL server. To done it, you may refer to the step as below.

1. Open the SQL Query Windows.
2. Use the command as below.
==================
USE mydatabase;
GO
ALTER SCHEMA dbo TRANSFER [schema].mytable;
==================
# replace schema with your old schema, mytable with your table name.
3. Execute it.

You will now found the database is connected.

Understand ASP.Net custom error

It is very normal when you design your script in ASP.Net and getting some runtime error as attached below when you are designing your script from your local PC and uploaded to the web server.

With the above error, some programmer not even know what to do :S .

Today, MGe will guide you on what is the custom Error type and how to make it work when you are hosted to the web server that do not have the administrator privilege.

Basically custom error used to hide the real error from the script from the visitor, where it might be the sensitive information from your website such as connection string.

The ASP.Net <customErrors /> do have 3 types, such as On, Off and RemoteOnly. In short, may refer to the table as below.

Off Show everyone the detailed error message.  This is rarely a good idea.
On Don’t show anyone the detailed error message.
RemoteOnly Only show the detailed error message if you are testing from the local server where the site resides.

To set it, just open your web.config file and set it from the <system.web>.

Eg.

<customErrors mode="RemoteOnly" />