Delete module

Topics: Troubleshooting
Jul 21, 2015 at 2:47 AM
Hi,

I am keep getting The wait operation timed out .

In error log I could see the error message as :

TestModule.Migrations.Create() in c:\code\Test\src\Orchard.Web\Modules\TestModule\Migrations.cs:line 16.

2015-07-21 10:53:42,651 [67] Orchard.Data.Migration.DataMigrationManager - Default - Error while running migration version 0 for TestModule.
https://localhost:81/Admin/Modules/Features?__r=8d29166b7b42170 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource
1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.RunPendingStatements() in c:\code\Test\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 336
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.Visit(CreateTableCommand command) in c:\code\Test\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 92
at Orchard.Data.Migration.Interpreters.AbstractDataMigrationInterpreter.Visit(ISchemaBuilderCommand command) in c:\code\Test\src\Orchard\Data\Migration\Interpreters\AbstractDataMigrationInterpreter.cs:line 14
at Orchard.Data.Migration.Schema.SchemaBuilder.Run(ISchemaBuilderCommand command) in c:\code\Test\src\Orchard\Data\Migration\Schema\SchemaBuilder.cs:line 66
at Orchard.Data.Migration.Schema.SchemaBuilder.CreateTable(String name, Action`1 table) in c:\code\Test\src\Orchard\Data\Migration\Schema\SchemaBuilder.cs:line 35
at TestModule.Migrations.Create() in c:\code\Test\src\Orchard.Web\Modules\TestModule\Migrations.cs:line 16
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Orchard.Data.Migration.DataMigrationManager.Update(String feature) in c:\code\Test\src\Orchard\Data\Migration\DataMigrationManager.cs:line 114

After getting this erro I removed TestModule Project from the solution and I am still getting the same error message.
Any solution to overcome this problem.
Developer
Jul 21, 2015 at 9:49 AM
Removing the TesModule from just the solution won't remove the module from Orchard - you'd have to physically remove the module's folder form the Modules folder (or rename Module.txt to something else so it won't be found by Orchard).

Regarding the error itself, could you show us the code what you're doing in the Create method of the migration?
Jul 22, 2015 at 12:38 AM
Deleted and dropped records from

DELETE FROM Orchard__Orchard_Framework_DataMigrationRecord WHERE DataMigrationClass = "ModuleName"
DELETE FROM Orchard__Settings_ShellFeatureRecord WHERE Name = 'ModuleName'
DELETE FROM Orchard__Settings_ShellFeatureStateRecord WHERE Name = 'ModuleName'

and along with above renamed the Module.txt .

This solve the issue .

Thanks
Marked as answer by Kevinpiper123 on 7/21/2015 at 11:05 PM