파일 또는 어셈블리 'DotNetOpenAuth.Core를로드 할 수 없습니다.
asp net mvc 4 응용 프로그램을 시작할 때 다음 오류가 발생합니다.
Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies.
The system cannot find the file specified
오류 로그입니다.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = notebook\Guilherme
LOG: DisplayName = DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246
(Fully-specified)
LOG: Appbase = file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/
LOG: Initial PrivatePath = C:\Users\Guilherme\Documents\Visual Studio 2012\Projects\Gedi\Gedi\bin
Calling assembly : Microsoft.Web.WebPages.OAuth, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Guilherme\Documents\Visual Studio 2012\Projects\Gedi\Gedi\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core/DotNetOpenAuth.Core.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/2635bb56/154c3fbb/DotNetOpenAuth.Core/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core.EXE.
LOG: Attempting download of new URL file:///C:/Users/Guilherme/Documents/Visual Studio 2012/Projects/Gedi/Gedi/bin/DotNetOpenAuth.Core/DotNetOpenAuth.Core.EXE.
패키저 관리자를 사용하여 DotNetOpenAuth에서 모든 참조를 이미 제거했습니다. 또한 내 프로젝트에있는 모든 Auth 어셈블리에 대한 자체 참조를 확인했지만 아무것도 없습니다.
이것은 내 packages.config입니다.
<packages>
<package id="AutoMapper" version="2.2.0" targetFramework="net45" />
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="jQuery" version="1.7.1.1" targetFramework="net45" />
<package id="jQuery.UI.Combined" version="1.8.20.1" targetFramework="net45" />
<package id="jQuery.Validation" version="1.9.0.1" targetFramework="net45" />
<package id="knockoutjs" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.Data" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages.WebData" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Ajax" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.5.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Repository" version="1.0.2.12" targetFramework="net45" />
<package id="RestSharp" version="103.4" targetFramework="net45" />
<package id="WebGrease" version="1.1.0" targetFramework="net45" />
</packages>
감사
OAuth를 사용하지 않으려면 WebPages OAuth DLL ( Microsoft.Web.WebPages.OAuth.dll 1 ) 및 DotNetOpenAuth DLL 모두 참조를 제거하십시오 .
1 : 파일 이름은 Calling assembly
. 그래서, 모든 제거 calling assembly
의 것은 DotNetOpenAuth.Core
당신을 위해 작동합니다. 이 접근 방식은 사용되지 않는 다른 누락 된 참조에 대해 작동합니다.
비슷한 문제가있었습니다. 프로젝트가 하루 전에 정상적으로 실행되고 있었기 때문에 정말 이상했습니다.
Removing obj and bin folders from the project folder, cleaning the solution and rebuilding it worked.
Hope that helps.
I've seen this happen when deploying an MVC application as bin deploy
. When you right-click on a project and select Add deployable dependencies
VS will add the references to Oauth if you check the box next to ASP .NET Webpages with Razor syntax
.
To fix this, delete the _bin_deployableAssemblies
folder, and your application's bin
folder and then clean and rebuild your application and it will work again.
In my case the MVC4 application was running fine in the VS2012 debugger, but I was getting the "Could not load file or assembly 'DotNetOpenAuth.Core'" error when I publish the application on the server.
Checking the "Delete all existing files prior to publish" checkbox on the settings tab of Publish Web window solved the issue.
I solved the problem by installing the package using Nuget
Install-Package Microsoft.AspNet.WebPages.OAuth
Just select "Remove additional files at destination" on publish settings. This works for me
By installing the following two packages I resolved this problem on VS2012 Professional Update 4 RC:
Open the Package Manager Console from the Menu:
Tools| Library Package Manage | Package Manager Console
Install-Package DotNetOpenAuth.AspNet
- Install-Package Microsoft.AspNet.WebHelpers
Hope this helps for you!!!
Try doing a global solution search (ctrl+shift+f if you haven't changed it) for the value '2780ccd10d57b246'. I'm guessing you'll find it in your web.config.
for me, it worked like the following, using packager manager console, I've uninstall the packages, by the following order sequence and I re installed it, it solved my issue..
Uninstalling
Uninstall-Package Microsoft.AspNet.WebPages.OAuth
Uninstall-Package DotNetOpenAuth.AspNet
Uninstall-Package DotNetOpenAuth.OpenId.RelyingParty
Uninstall-Package DotNetOpenAuth.OpenId.Core
Uninstall-Package DotNetOpenAuth.OAuth.Consumer
Uninstall-Package DotNetOpenAuth.OAuth.Core
Uninstall-Package DotNetOpenAuth.core
Build, If you are not using the above packages then this should solve the problem, to Install the above again in case you need it, do the following..
Reinstall
install-Package DotNetOpenAuth.AspNet
install-Package Microsoft.AspNet.WebPages.OAuth
install-Package DotNetOpenAuth.OpenId.RelyingParty
install-Package DotNetOpenAuth.OpenId.Core
install-Package DotNetOpenAuth.OAuth.Consumer
install-Package DotNetOpenAuth.OAuth.Core
install-Package DotNetOpenAuth.core
recommanded:
- go to the bin folder of the project, clear it
- when to publish to the IIS, delete the virtual directory and assign the website again to the IIS, since I faced that issue of having cash in the server which was making the problem...
One more solution option is to have assembly dependency as follows:
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet"
publicKeyToken="2780ccd10d57b246"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core"
publicKeyToken="2780ccd10d57b246"
culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
I do not have the reputation to comment but I can verify that I had this exact problem and Jack gave the correct solution for me. I had recently pressed Add Service Reference and it broke the program with the above error message.
Deleting the _bin_deployableAssemblies folder, and your application's bin folder and then clean and rebuild your application made it work again.
In case this helps anyone - I was unable to uninstall the DotNetOpenAuth components through Nuget, so I resolved this error by deleting them from the references list directly and then re-installing dotnetopenauth through nuget.
I was getting this error as well, but with an ASP.NET MVC 5 project. I solved it by installing the Package DotNetOpenAuth.Mvc5 and calling AsActionResultMvc5() instead of AsActionResult()
For me helped adding to csproj file the following section:
<PropertyGroup>
<PostSharpHostConfigurationFile>web.config</PostSharpHostConfigurationFile>
</PropertyGroup>
I had the same problem here. My published web.config didn't have the lines:
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="1.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
Just added and it worked.
Simply remove BIN folder from wwwroot, and publish again.
I was able to resolved it on my end by removing Microsoft.AspNet.Membership.OpenAuth
I run into this issue when working on updating all of ours libraries. this link helped me fix this issue. https://www.devexpress.com/Support/Center/Question/Details/Q554890/the-could-not-load-file-or-assembly-dotnetopenauth-core-version-4-0-0-0-error-message-is .
Specially I added these binding redirects to my web.config file.
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780CCD10D57B246" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-4.1.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780CCD10D57B246" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-4.1.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
Remove any Microsoft.Web.WebPages.OAuth dependencies everywhere in your projects.
참고URL : https://stackoverflow.com/questions/13942653/could-not-load-file-or-assembly-dotnetopenauth-core
'programing' 카테고리의 다른 글
이 WCF 오류의 의미 : "사용자 지정 도구 경고 : wsdl : portType을 가져올 수 없습니다." (0) | 2020.09.23 |
---|---|
자바의 무한 루프 (0) | 2020.09.23 |
dplyr을 사용하여 data.frame의 전체 케이스 필터링 (케이스 별 삭제) (0) | 2020.09.23 |
FloatMath.sqrt () 메서드를 찾을 수 없습니다. (0) | 2020.09.23 |
Knockout JS의 라디오 버튼에 참 / 거짓 바인딩 (0) | 2020.09.23 |