Escrito em February 10th, 2010 as 6:24 pm por Guilherme Bacellar

0 Comentários

Se você receber a mensagem “SQL Server Compact is not intended for ASP.NET development.” ao usar o SQL Server CE no ASP.NET, a solução é bem simples.

No global.asax, em Application_Start adicione a linha abaixo:

AppDomain.CurrentDomain.SetData(“SQLServerCompactEditionUnderWebHosting”, true);

Exemplo completo:

//
// Hack para Ativação do SQLServer CE no ASP.NET
//
protected void Application_Start(object sender, EventArgs e)
{
    AppDomain.CurrentDomain.
SetData("SQLServerCompactEditionUnderWebHosting", true);
}

Isso é tudo ;)

Posts Relacionados:

  1. Session, ViewState ou Cache o que utilizar?
  2. Configurando e Utilizando a Session
, , ,

Be the first to start a conversation

Deixa uma Resposta

znjdb32s6g