Asp.net insert sql express

martedì 29 aprile 2008 - 16.23

andrean89 Profilo | Newbie

ciao...
sto lavorando ad un web service mentre sono in fase test (con vs2005) funziona tutto bene...
ma quando lo sposto sul server di produzione va in errore dice che il db è in sola lettura:....

System.Data.SqlClient.SqlException: Impossibile aggiornare il database "D:\WEBS\xx.xx.com\APP_DATA\EASYLAB.MDF" perché è di sola lettura.
in System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
in System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
in System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
in System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
in System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
in Service.s_WriteRecordToDb(String SSql) in d:\webs\xxx.xxx.com\App_Code\Service.vb:riga 88
in Service.F_AttivaEasyLab(String StrSeriale) in d:\webs\xxx.xxx.com\App_Code\Service.vb:riga 64

ho provato a vedere i permessi ma nn so piu dove sbattere la testa...
mi date una manina???'
Grazie Andrea

Brainkiller Profilo | Guru

>ciao...
>sto lavorando ad un web service mentre sono in fase test (con
>vs2005) funziona tutto bene...
>ma quando lo sposto sul server di produzione va in errore dice
>che il db è in sola lettura:....

Quali permessi hai controllato ?
Dovresti verificare sulla cartella App_Data e dare i diritti di Modify all'utente NETWORK_SERVICE se sei su Win2003 o ASPNET su altro OS e dovrebbe andare.
Ciao

David De Giacomi | Microsoft MVP
http://blogs.dotnethell.it/david/
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5