Невозможно опубликовать sh остальные веб-службы - PullRequest
0 голосов
/ 03 февраля 2020

Я создаю веб-сервис RestFul, и они работают на моем локальном p c. Но когда я пытаюсь опубликовать sh для развертывания на стороне сервера, я получил странную ошибку от Visual Studio:

>Connection to C:\Users\michele.castriotta\Desktop\WSAnalisiHRV in progress...
2>Trasformation of Web.config by D:\VISUAL_STUDIO_WORKSPACE\WSAnalisiHRV\WSAnalisiHRV\Web.Release.config in obj\Release\TransformWebConfig\transformed\Web.config.
2>Copy all file in temporary path indicated below for project publication/package:
2>obj\Release\AspnetCompileMerge\Source.
2>C:\windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p D:\VISUAL_STUDIO_WORKSPACE\WSAnalisiHRV\WSAnalisiHRV\obj\Release\AspnetCompileMerge\Source -u D:\VISUAL_STUDIO_WORKSPACE\WSAnalisiHRV\WSAnalisiHRV\obj\Release\AspnetCompileMerge\TempBuildDir 
2>Execution of aspnet_merge.exe.
2>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\aspnet_merge.exe D:\ERESULT\VISUAL_STUDIO_WORKSPACE\WSAnalisiHRV\WSAnalisiHRV\obj\Release\AspnetCompileMerge\TempBuildDir -o eresult.WSAnalisiHRV.dll -copyattrs obj\Release\AssemblyInfo\AssemblyInfo.dll -a  
2>aspnet_merge(0,0): Errore occurred: Error during assembly merge: reference to an object not set on an object instance..
2>

Это мой файл web.config

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=301879
  -->
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/>
  </configSections>
  <appSettings>
    <!-- <add key="pathFile" value="D:\SITI_HTTP\Pubblicati\WSCartellaClinica\Rehab-Dem\AnalisiHRV\"/>-->
    <add key="pathFile" value="D:\"/>
  </appSettings>
  <!--
    Per una descrizione delle modifiche al file web.config, vedere il sito Web all'indirizzo http://go.microsoft.com/fwlink/?LinkId=235367.

    Gli attributi seguenti possono essere impostati sul tag <httpRuntime>.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.webServer>
    <handlers>
      <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>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="0.0.0.0-5.2.4.0" newVersion="5.2.4.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:Default /nowarn:1659;1699;1701">
        <providerOption name="CompilerVersion" value="v4.0"/>
      </compiler>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+">
          <providerOption name="CompilerVersion" value="v4.0"/>
      </compiler>
    </compilers>
  </system.codedom>
  <log4net>
    <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
      <AppendToFile value="true"/>
      <maxSizeRollBackups value="10"/>
      <maximumFileSize value="10MB"/>
      <staticLogFileName value="true"/>
      <file value="Logs\myLog.log"/>
      <layout type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="%date [%thread] %-5level %logger [%method] - %message%newline"/>
      </layout>
    </appender>
    <root>
      <level value="DEBUG"/>
      <appender-ref ref="LogFileAppender"/>
    </root>
  </log4net>

</configuration>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...