Error: Could not load file or assembly 'DotNetOpenAuth.AspNet' or one of its dependencies

2

I'm having this error running the application:

  

Could not load file or assembly 'DotNetOpenAuth.AspNet' or one of its   dependencies. The parameter is incorrect. (Exception from HRESULT:   0x80070057 (E_INVALIDARG))

The start will be problems with the DLL DotNetOpenAuth.AspNet, however I have tried to solve this dependency of the various forms that I know: Make clean and rebuild of the solution; Remove the DLL and add it again; Delete the directory /bin and /obj in the project folder; And even restarting the PC ... I also tried going to NuGet to remove and add the component again but I can not because it gives a problem with dependencies.

Web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <sectionGroup name="devExpress">
      <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
    </sectionGroup>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="MvcTesteLayout.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <connectionStrings>
    <!--<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-MvcTesteLayout-20131023143453;Integrated Security=False;AttachDBFilename=|DataDirectory|\aspnet-MvcTesteLayout-20131023143453.mdf" providerName="System.Data.SqlClient" />-->
  </connectionStrings>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <add key="Server" value="localhost\SQLEXPRESS" />
    <add key="Database" value="OleoTorres" />
    <add key="UserID" value="OleoTorres" />
    <add key="pathFiles" value="D:/MediaOleotorres/uploadsOleotorres"></add>
    <add key="pathFilesImagens" value="D:/MediaOleotorres/imagens"></add>
    <add key="pathFilesGerarPDF" value="D:/MediaOleotorres/gerarPDFOleotorres"></add>
    <add key="pathFilesGerarExcel" value="D:/MediaOleotorres/gerarExcelOleotorres"></add>
    <add key="pathFilesGuiasComunicacao" value="T:/Dep_Software/Software/Software_CPS/Software_EP/Oleotorres/3.MemoriaDescritiva/Gar's"></add>
    <add key="pathFilesDestinoGuiasComunicacao" value="D:/MediaOleotorres/guiasComunicacaoTratadas"></add>

    <add key="pathartcmd" value="D:\XmlServer_780_rev13"></add>
    <add key="pathfch" value="D:\ArtSoft\Fich_780"></add>
    <add key="nomeemp" value="OLEOTORRES"></add>
    <add key="licenca" value="127.0.0.1:2500"></add>
    <add key="pathform" value="D:\ArtSOFT\Forms"></add>
    <add key="plugins" value=""></add>
    <add key="userArtSoft" value="admin"></add>

  </appSettings>
  <system.web>
    <roleManager enabled="true" defaultProvider="SimpleRoleProvider">
      <providers>
        <clear />
        <add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData" />
      </providers>
    </roleManager>
    <membership defaultProvider="SimpleMembershipProvider">
      <providers>
        <clear />
        <add name="SimpleMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" />
      </providers>
    </membership>
    <compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="DevExpress.Data.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxHtmlEditor.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxSpellChecker.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxTreeList.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxThemes.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxPivotGrid.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Utils.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Office.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.RichEdit.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.SpellChecker.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Charts.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraCharts.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraGauges.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraGauges.v14.1.Presets, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxGauges.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraCharts.v14.1.Web, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Printing.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraReports.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraReports.v14.1.Web, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraPivotGrid.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.PivotGrid.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.XtraScheduler.v14.1.Core, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.ASPxScheduler.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
        <add assembly="DevExpress.Web.Mvc.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
      </assemblies>
    </compilation>
    <httpRuntime targetFramework="4.5" maxRequestLength="4096" requestValidationMode="2.0" executionTimeout="110" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <pages validateRequest="false" clientIDMode="AutoID">
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Optimization" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
        <add namespace="DevExpress.Utils" />
        <add namespace="DevExpress.Web.ASPxClasses" />
        <add namespace="DevExpress.Web.ASPxGridView" />
        <add namespace="DevExpress.Web.ASPxGridView.Export" />
        <add namespace="DevExpress.Web.ASPxEditors" />
        <add namespace="DevExpress.Web.ASPxCallbackPanel" />
        <add namespace="DevExpress.Web.ASPxDataView" />
        <add namespace="DevExpress.Web.ASPxDocking" />
        <add namespace="DevExpress.Web.ASPxMenu" />
        <add namespace="DevExpress.Web.ASPxNavBar" />
        <add namespace="DevExpress.Web.ASPxPopupControl" />
        <add namespace="DevExpress.Web.ASPxRoundPanel" />
        <add namespace="DevExpress.Web.ASPxSplitter" />
        <add namespace="DevExpress.Web.ASPxTabControl" />
        <add namespace="DevExpress.Web.ASPxTreeView" />
        <add namespace="DevExpress.Web.ASPxFileManager" />
        <add namespace="DevExpress.Web.ASPxImageSlider" />
        <add namespace="DevExpress.Web.ASPxUploadControl" />
        <add namespace="DevExpress.Web.ASPxHtmlEditor" />
        <add namespace="DevExpress.Web.ASPxSpellChecker" />
        <add namespace="DevExpress.Web.ASPxTreeList" />
        <add namespace="DevExpress.Web.ASPxTreeList.Export" />
        <add namespace="DevExpress.XtraCharts" />
        <add namespace="DevExpress.XtraCharts.Web" />
        <add namespace="DevExpress.XtraReports" />
        <add namespace="DevExpress.XtraReports.UI" />
        <add namespace="DevExpress.XtraReports.Web" />
        <add namespace="DevExpress.XtraPivotGrid" />
        <add namespace="DevExpress.Data.PivotGrid" />
        <add namespace="DevExpress.Web.ASPxPivotGrid" />
        <add namespace="DevExpress.Web.ASPxPivotGrid.Export" />
        <add namespace="DevExpress.Web.Mvc" />
        <add namespace="DevExpress.Web.Mvc.UI" />
        <add namespace="DevExpress.XtraScheduler" />
        <add namespace="DevExpress.XtraScheduler.Native" />
        <add namespace="DevExpress.Web.ASPxScheduler" />
        <add namespace="Omu.Awesome.Core" />
        <add namespace="Omu.Awesome.Mvc.Helpers" />
      </namespaces>
    </pages>
    <httpHandlers>
      <add type="DevExpress.Web.ASPxUploadControl.ASPxUploadProgressHttpHandler, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" validate="false" />
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" validate="false" />
    </httpHandlers>
    <httpModules>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </httpModules>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-PT" uiCulture="pt-PT" />

  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
      <add type="DevExpress.Web.ASPxUploadControl.ASPxUploadProgressHttpHandler, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" name="ASPxUploadProgressHandler" preCondition="integratedMode" />
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" name="ASPxHttpHandlerModule" preCondition="integratedMode" />
    </handlers>
    <modules>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v14.1, Version=14.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </modules>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="30000000" />
      </requestFiltering>
    </security>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <devExpress>
    <themes enableThemesAssembly="true" styleSheetTheme="" theme="MetropolisBlue" customThemeAssemblies="" />
    <compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="true" />
    <settings doctypeMode="Html5" rightToLeft="false" />
    <errors callbackErrorRedirectUrl="" />
  </devExpress>
  <applicationSettings>
    <MvcTesteLayout.Properties.Settings>
      <setting name="MvcTesteLayout_com_frotasoft_www_API" serializeAs="String">
        <value>...</value>
      </setting>
    </MvcTesteLayout.Properties.Settings>
  </applicationSettings>
</configuration>
    
asked by anonymous 06.02.2015 / 15:22

1 answer

3

Try two more things:

  • Delete the /bin directory of the project;
  • Delete directories within C:\Users\SeuUsuario\AppData\Local\Temp\Temporary ASP.NET Files .
  • Also delete the directories below the following directories, if they exist:
    • C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
    • C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
    • C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
    • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
06.02.2015 / 15:49