The operation could not be completed” error adding references to Visual Studio 2017

cd C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies
 
gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
Kategoria: 

yield - deferred execution

http://jakubmaguza.pl/2017/05/o-odroczonej-egzekucji-yield-return/

http://jakubmaguza.pl/2017/05/lazy-loading-vs-deferred-execution/

public static IEnumerable<string> Deferred(string filepath)
    {
        using (StreamReader sr = new StreamReader(filepath))
        {
            string line;
            while ((line = sr.ReadLine()) != null)
            {
                yield return line;
            }
        }
    }

Source: http://jakubmaguza.pl/2017/05/o-odroczonej-egzekucji-yield-return/

Kategoria: 

IIS and WebDeploy and Management Service

It seems that when you install Web Deploy using the Web Platform Installer, not all features are available. So I went back to the download page but this time I select the x64 link instead of clicking on the big Install button.

Sources:

http://bartwullems.blogspot.com/2012/06/iis-management-service-delegatio...

Kategoria: 

ASP.NET target 4.5

Another thing you can try is setting the "Run All Managed Modules for All Requests" option under in your applicaiton's Web.config.

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
    <handlers>
      <remove name="UrlRoutingHandler"/>
    </handlers>
  </system.webServer>

You need the managed modules to run on incoming requests if you require Forms Authentication to access your application, because Forms Authentication is a managed module. So if you're requiring Forms Authentication, but that module isn't running, IIS just gives a 403 error because it can't get you the kind of authentication the application requires.

default

  <system.webServer>
    <handlers>
      <remove name="UrlRoutingHandler"/>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" 
preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="ApplicationInsightsWebTracking" />
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>
  </system.webServer>
Kategoria: 

Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. Manifest definition does not match the assembly reference

To solve this, I ensured all my projects used the same version by running the following command and checking the results:

update-package Newtonsoft.Json -reinstall

And, lastly I removed the following from my web.config:

  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
  </dependentAssembly>

Strony

Subskrybuj Notatnik RSS