If you for some reason needs to change the collation of a column in SQL Server to the default database collation, you can use the following syntax:
ALTER TABLE <table_name> ALTER COLUMN <column_name> <current_data_type> COLLATE database_default
ALTER TABLE myTable ALTER COLUMN myColumn TEXT COLLATE database_default
Sometimes when I’m setting up a new server and creating a site using only integrated security I am unable to access the site.
Instead of direct access to the site, a dialog pops up asking for user name and password. Even if I enter a valid domain user and the correct password no access is given to the site. After three attempts this message occurs:
HTTP Error 401.1 – Unauthorized: Access is denied due to invalid credentials
IIS is by default using Kerberos for authentication.
This error occurs because the Kerberos authentication for some reason fails.
The easiest way to fix this is to change the default authentication mode for IIS from Kerberos to NTLM.
To change the default authentications mode to NTLM follow these steps:
- Open a command window.
- Navigate to the Adminscripts folder on the server. This is default found on C:\Inetpub\Adminscripts.
- Run the following command:cscript adsutil.vbs set w3svc/NTAuthenticationProviders “NTLM”
- Run iisreset
You should now be able to access the site using Integrated Security.
For more information on this issue, check out this KB article: http://support.microsoft.com/kb/871179
Every now and then somebody says to me:
I just added my assembly to the gac and now I can’t debug my code anymore
The fact is that debugging gac assemblies is quite easy when you know how to do it.
The problem with debugging gac assemblies is that you can’t add the pdb file to the gac. What you need to do is to find the actual folder where your assembly is stored and copy your pdb file into this location.
To find this folder you need to run the following command from start->run:
Navigate to your assembly by drilling down in the folders.
Copy your pdb file to the same folder as your dll.
You should now be able to debug your assembly by attaching to the running process.
( If you are not building your assembly as a MSIL assembly you will find it under: C:\WINDOWS\Assembly\GAC or C:\WINDOWS\Assembly\GAC_32 )