Wednesday, November 26, 2008

Webservices - Upload a file

3 things to consider

1. In web.config

< httpRuntime maxRequestLength="10240" executionTimeout="300"/ >

2. In the client application

MyWebService ws = new MyWebService();
ws.Timeout = 300*1000;

3. In IIS (not tested)

HTTP Keep-Alives Enabled
Connection Timeout: xyz seconds

Wednesday, November 12, 2008

Remove FK from a table

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_Clients_Users]') AND type = 'F')
ALTER TABLE [dbo].[Clients] DROP CONSTRAINT [FK_Clients_Users]
GO

-- after that we're now able to for example drop the FK column

ALTER TABLE [dbo].[Clients] DROP COLUMN [UserID]
GO