Publishing my webapp gives me an error that i don't know how to resolve.

Chester Rowe 0 Reputation points
2023-06-04T18:35:58.5566667+00:00

The error I get is:

Transformed Web.config using D:\OneDrive\Desktop\Website\Web.Debug.config into C:\Users\chetr\AppData\Local\Temp\WebSitePublish\Website-850341849\obj\Debug\TransformWebConfig\transformed\Web.config.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(2311,5): Error : Object reference not set to an instance of an object.


Because this error appears to be related to me Web.config file, I've added it below.

My web.config file is as follows:

?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="rptBuildProvider"
          type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
      </sectionGroup>
    </sectionGroup>
  </configSections>
  <appSettings>
    <!-- 
            RichTextEditor.NET provides added layer of security by
            Encrypting vital QueryString. You can set your password
            by setting the below value.
      -->
    <add key="rteCryptoKey" value="t%B*7jM+"/>
    <!-- 
      For Full / Licensed version of RichTextEditor.NET set LicenseKey provided with you order.  
    -->
    <add key="rteLicenseKey" value="EVP7TK-FDA7BT-4GPFT4-EOPPRY-D2KG6"/>
  </appSettings>
  <connectionStrings>
    <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\InvData.mdb;Persist Security Info=True"
      providerName="System.Data.OleDb"/>
    <add name="conn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\InvData.mdb;Persist Security Info=True"
      providerName="System.Data.OleDb"/>
    <add connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\InvData.mdb" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.7.1" />
      </system.Web>
  -->
  <system.web>
    <sessionState timeout="14400"/>
    <!-- 
            session state timeout = 10 days
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <identity impersonate="true"/>
    <httpRuntime/>
    <customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.8">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

        <add assembly="Microsoft.VisualBasic.PowerPacks, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.VisualBasic.Compatibility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="AjaxControlToolkit"/>
        <!--<add assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
        <add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>-->
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <!--<add assembly="dbAutoTrack.DataReports, Version=1.7.0.0, Culture=Neutral, PublicKeyToken=40b2134825d59165"/>-->
        <!--<add assembly="dbAutoTrack.DataReports.Design, Version=1.7.0.0, Culture=Neutral, PublicKeyToken=40b2134825d59165"/>-->
        <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        <add assembly="Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
      <buildProviders>
        <add extension=".rdlc"
          type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        <add extension=".rpt"
          type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
      </buildProviders>
    </compilation>
    <!--<authentication mode="Forms">
      <forms name=".ASPXFORMSDEMO" loginUrl="logon.aspx"
      protection="All" path="/" timeout="30" />
    </authentication>-->
    <!--<authorization>
      <deny users ="?" />
      <allow users = "*" />
    </authorization>-->
    <httpModules>
      <add name="UploadModule"
        type="dbAutoTrack.RichTextEditor.UploadModule,dbAutoTrack.RichTextEditor, Version=4.4.0.0, Culture=neutral, PublicKeyToken=40b2134825d59165"/>
    </httpModules>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
  </system.web>
  <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <modules>
      <add name="UploadModule"
        type="dbAutoTrack.RichTextEditor.UploadModule,dbAutoTrack.RichTextEditor, Version=4.4.0.0, Culture=neutral, PublicKeyToken=40b2134825d59165"/>
    </modules>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd"
        type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
    </handlers>
  </system.webServer>
  <businessObjects>
    <crystalReports>
      <rptBuildProvider>
        <add embedRptInResource="true"/>
      </rptBuildProvider>
    </crystalReports>
  </businessObjects>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.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.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    </compilers>
  </system.codedom>
</configuration>
Developer technologies | Visual Studio | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.