deploying asp on iis - Error: Bad binary signature

0

I'm deploying an asp app that connects to my local ms-sql database. It works fine in visual studio 2012. I also works on another pc on iis. On my machine it used to work, but now my apps fail when deploying on iis with this error message: I've tried building the project with 4.0 and with 4.5 both resulted in the same error. This is happening for all the apps that use ms-sql. Any ideas? Could this be some sql dlls have gone missing or have been corrupted?

Bad binary signature. (Exception from HRESULT: 0x80131192)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Bad binary signature. (Exception from HRESULT: 0x80131192)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[BadImageFormatException: Bad binary signature. (Exception from HRESULT: 0x80131192)]
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +0
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +180
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +21
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +325
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +420
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +280
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +3607911
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +28
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +313
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +146
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +192
   System.Web.UI.Control.EnsureChildControls() +189
   System.Web.UI.Control.PreRenderRecursiveInternal() +60
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
asp.net
sql
iis
asked on Stack Overflow Apr 2, 2014 by max • edited Apr 3, 2014 by max

1 Answer

0

I had to follow these steps to fix iis:

from control panel => windows features, removed Internet Information Service

  1. deleteed C:\inetpub folder
  2. Rebooted
  3. from control panel -> windows features, added Internet Information Service
  4. registered dot net on iis using:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

  5. then redeployed the same apps and all is good.

answered on Stack Overflow Apr 7, 2014 by max

User contributions licensed under CC BY-SA 3.0