MsDeploy - Can't update Application Pool - c#

I've been browsing dozens of sites to help me deploy a web service to an IIS using MsDeploy.
I need to create the application, modify application pool and enable protocols, and update a appSetting (that contains a connection string, don't ask me why).
I can do all of these, except applying the good Application pool.
Here's the parameters.xml file I added to the project :
<parameters>
<parameter tags="IisApp" defaultValue="Default Web Site/MyWebService" name="IIS Web Application Name">
<parameterEntry match="#defaultValue" scope="IisApp" kind="ProviderPath"/>
<parameterEntry match="#defaultValue" scope="setAcl" kind="ProviderPath"/>
</parameter>
<parameter name="Configuration Connection String" defaultValue="Some real Connection String in there" tags="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/appSettings/add[#key='ConfigurationSQLConnectionString']/#value" />
</parameter>
<parameter name="Application Pool" defaultValue="MyOwnAppPool" description="Application pool for this site">
<parameterEntry kind="DeploymentObjectAttribute" scope="application" match="/application/#applicationPool" />
</parameter>
</parameters>
Here's the way I generate the package :
MsBuild MyWebService.csproj /T:Package /P:PackageLocation="c:\somewhere\package.zip" /P:IncludeAppPool=true /P:IncludeIisSettings=true
Here's the generated archive.xml file :
<sitemanifest MSDeploy.ObjectResolver.dirPath="Microsoft.Web.Deployment.DirPathObjectResolver" MSDeploy.ObjectResolver.filePath="Microsoft.Web.Deployment.FilePathObjectResolver">
<appHostConfig path="Default Web Site/MyWebService" MSDeploy.path="2" MSDeploy.MSDeployLinkName="Child1" MSDeploy.MSDeployKeyAttributeName="path" MSDeploy.MSDeployProviderOptions="some stuff">
<application path="/MyWebService" MSDeploy.path="2" applicationPool="DefaultAppPool" MSDeploy.applicationPool="1" enabledProtocols="http" MSDeploy.enabledProtocols="1" serviceAutoStartEnabled="false" MSDeploy.serviceAutoStartEnabled="1" serviceAutoStartProvider="" MSDeploy.serviceAutoStartProvider="1" MSDeploy.MSDeployLinkName="PathElement" MSDeploy.MSDeployKeyAttributeName="path">
<virtualDirectoryDefaults path="" MSDeploy.path="1" physicalPath="" MSDeploy.physicalPath="9" userName="" MSDeploy.userName="1" password="" MSDeploy.password="1" logonMethod="ClearText" MSDeploy.logonMethod="1" allowSubDirConfig="true" MSDeploy.allowSubDirConfig="1" MSDeploy.MSDeployLinkName="virtualDirectoryDefaults" />
<virtualDirectory path="/" MSDeploy.path="2" physicalPath="C:\somewhere\MyWebService" MSDeploy.physicalPath="8" userName="" MSDeploy.userName="1" password="" MSDeploy.password="1" logonMethod="ClearText" MSDeploy.logonMethod="1" allowSubDirConfig="true" MSDeploy.allowSubDirConfig="1" MSDeploy.MSDeployKeyAttributeName="path" />
</application>
</appHostConfig>
<contentPath path="C:\somewhere\MyWebService\obj\Debug\Package\PackageTmp" MSDeploy.path="2" MSDeploy.MSDeployLinkName="Child2" MSDeploy.MSDeployKeyAttributeName="path" MSDeploy.MSDeployProviderOptions="some other stuff">
<MSDeploy.dirPath path="C:\somewhere\MyWebSerivce\obj\Debug\Package\PackageTmp" MSDeploy.MSDeployLinkName="contentPath" />
</contentPath>
<setAcl path="C:\somewhere\MyWebService\obj\Debug\Package\PackageTmp" MSDeploy.path="2" isDest="AA==" MSDeploy.isDest.Type="Microsoft.Web.Deployment.DeploymentObjectBooleanAttributeValue" setAclUser="" MSDeploy.setAclUser="1" setAclAccess="Read" MSDeploy.setAclAccess="1" MSDeploy.MSDeployLinkName="Child3" MSDeploy.MSDeployKeyAttributeName="path" MSDeploy.MSDeployProviderOptions="still some stuff" />
<setAcl path="C:\somewhere\MyWebService\obj\Debug\Package\PackageTmp" MSDeploy.path="2" isDest="AA==" MSDeploy.isDest.Type="Microsoft.Web.Deployment.DeploymentObjectBooleanAttributeValue" setAclUser="anonymousAuthenticationUser" MSDeploy.setAclUser="1" setAclAccess="Read" MSDeploy.setAclAccess="1" MSDeploy.MSDeployLinkName="Child4" MSDeploy.MSDeployKeyAttributeName="path" MSDeploy.MSDeployProviderOptions="final stuff I guess" />
</sitemanifest>
Here's the generated parameters.xml :
<parameters>
<parameter name="IIS Web Application Name" defaultValue="Default Web Site/MyWebService" tags="IisApp">
<parameterEntry kind="ProviderPath" scope="AppHostConfig" match="^Default\ Web\ Site/MyWebService$" />
<parameterEntry kind="ProviderPath" scope="contentPath" match="^C:\\somewhere\\MyWebService\\obj\\Debug\\Package\\PackageTmp$" />
<parameterEntry kind="ProviderPath" scope="setAcl" match="^C:\\somewhere\\MyWebService\\obj\\Debug\\Package\\PackageTmp$" />
<parameterEntry kind="ProviderPath" scope="IisApp" match="#defaultValue" />
<parameterEntry kind="ProviderPath" scope="setAcl" match="#defaultValue" />
</parameter>
<parameter name="IIS Web Application Pool Name" defaultValue="DefaultAppPool">
<parameterEntry kind="DeploymentObjectAttribute" scope="application" match="application[#applicationPool='DefaultAppPool']/#applicationPool" />
</parameter>
<parameter name="IisVirtualDirectoryPhysicalPath" defaultValue="C:\somewhere\MyWebService" tags="PhysicalPath">
<parameterEntry kind="DestinationVirtualDirectory" scope=".*" match="^C:\\somewhere\\MyWebService$" />
</parameter>
<parameter name="Configuration Connection String" defaultValue="Some real Connection String in there">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/appSettings/add[#key='ConfigurationSQLConnectionString']/#value" />
</parameter>
<parameter name="Application Pool" description="Application pool for this site" defaultValue="MyOwnAppPool">
<parameterEntry kind="DeploymentObjectAttribute" scope="application" match="/application/#applicationPool" />
</parameter>
</parameters>
And finally, here's the command I launch to deploy the package :
msdeploy.exe -verb:sync -allowUntrusted -enableLink:AppPoolExtension -source:package="c:\somewhere\Package.zip" -dest:auto,computerName="https://destinationserver:8172/MsDeploy.axd?site=WebSite_Deployment",userName="destinationserver\deploymentUser",password="shouldKeepItSecret",authType="basic" -setParam:name="IIS Web Application Name",value="WebSite_Deployment/MyWebService" -setParam:name="Configuration Connection String",value="The Real Connection String" -setParam:name="Application Pool",value="FinalAppPool" -setParam:name="IIS Web Application Pool Name",value="FinalAppPool" -verbose
I get the following log :
Verbose: Parameter entry 'IIS Web Application Pool Name/1' is applicable to 'sitemanifest/appHostConfig[#path='Default Web Site/MyWebService']/application[#path='/MyWebService']' because of its scope.
Verbose: Parameter entry 'Application Pool/1' is applicable to 'sitemanifest/appHostConfig[#path='Default Web Site/MyWebService']/application[#path='/MyWebService']' because of its scope.
But finally, the application pool that is set DefaultAppPool (and not FinalAppPool as expected). I first thought that msdeploy took the default application pool value for the parameter "IIS Web Application Pool Name". but it always take DefaultAppPool.
I just don't understand why.
As you can see, I'm using basic authentication with a non administrator account. I've activated Management Delegation Service on destinationServer to delegate contentPath, iisApp and setAcl to current user, and createApp and appHostConfig to WDeployConfigWriter.
The fact that I added the parameter "Application Pool" is because I found this here.
But even if I keep only one of those two parameters (Application Pool and IIS Web Application Pool Name"), the 2nd one is always in the archive.xml because of the msbuild package parameter IncludeIisSettings=true. And the result is the same.
It doesn't seem to be a right issue, as long as the application pool is really set by msdeploy. It's just that it doesn't take the provided application pool.
We also have a similar problem for Enable Protocols.
Sorry for the length, but I wanted to be exhaustive.

Don't know how you're deploying, but maybe you can use a script (with postSync argument) as mentionned there:
.net WebDeploy is there any way to run command/script on the target machine after deploy
In this script you can do everything you want with appcmd:
https://learn.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-appcmdexe

Related

Get Errors when adding a Service Reference to a project

I have built a Visual Studio project to consume a a 3rd party web service. The goal is to export CSV data. This is my first time consuming a web service so not sure what I am doing.
Here is the information that the web service has provided me (some info changed to protect my data):
Web Services Page, WSDL, and DataSource for Web Services Export:
https://reportservices.credtest.com/reports/ExportService.asmx
Encrypted Connection String:
GG3FakeStringgvwkdR4aCjKiu591-aUB2cfN18cYlNyqcpLD0V291y1gnZawA__
Query for Dataset Export:
<Query>
<SoapAction>
https://reportservices.credtest.com/ExportDataSet
</SoapAction>
<Method Namespace="https://reportservices.credtest.com/" Name="ExportDataSet">
<Parameters>
<Parameter Name="connection" Type="String">
<DefaultValue>
GG3FakeStringgvwkdR4aCjKiu591-aUB2cfN18cYlNyqcpLD0V291y1gnZawA__
</DefaultValue>
</Parameter>
<Parameter Name="start_date" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="end_date" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param1" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param2" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param3" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">
ExportDataSetResponse{}/ExportDataSetResult{}/diffgram{}/NewDataSet{}/Table{CPT_Code,Description,Other_Code,CPT_Modifier,Service_ID,Service,Service_Description,Program_ID,Program,Pgm_Dsc,Start_Minutes,End_Minutes,Matrix_ID,Start_Age,End_Age,Claim_Format,Credential_Group,RollUp_Code,Rate,Deaf_Rate,Fixed_Units,First_Unit_Minutes,Unit_Minutes,Unit_Multiplier}
</ElementPath>
</Query>
Query for XML Export:
<Query>
<SoapAction>
https://reportservices.credtest.com/ExportXML
</SoapAction>
<Method Namespace="https://reportservices.credtest.com/" Name="ExportXML">
<Parameters>
<Parameter Name="connection" Type="String">
<DefaultValue>
GG3FakeStringgvwkdR4aCjKiu591-aUB2cfN18cYlNyqcpLD0V291y1gnZawA__
</DefaultValue>
</Parameter>
<Parameter Name="start_date" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="end_date" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param1" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param2" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
<Parameter Name="custom_param3" Type="String">
<DefaultValue>
</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="true">
ExportXMLResponse{}/ExportXMLResult{}/diffgram{}/NewDataSet{}/Table{CPT_Code,Description,Other_Code,CPT_Modifier,Service_ID,Service,Service_Description,Program_ID,Program,Pgm_Dsc,Start_Minutes,End_Minutes,Matrix_ID,Start_Age,End_Age,Claim_Format,Credential_Group,RollUp_Code,Rate,Deaf_Rate,Fixed_Units,First_Unit_Minutes,Unit_Minutes,Unit_Multiplier}
</ElementPath>
</Query>
Here is the description of what is happening.
Every time I try to add a Connected service I get an error, either when adding the service (WCF) or when doing a build (gRPC or OpenAPI).
I go to Connected Services > Manage Connected Services
This opens the Service References (OpenAPI, gRPC, WCF Web Service) window.
I click on “Add a new service reference”. This opens the Add Service Reference window and shows 3 choices to pick from (OpenAPI, gRPC, WCF Web Service).
I have tried both OpenAPI and gRPC and get errors when doing a build.
WCF gives me an error during the
If I choose Open API then the “Add a new OpenAPI service reference” window opens.
I fill out the form with the following information:
URL: https://reportservices.credtest.com/reports/ExportService.asmx (link changed to protect my data)
Namespace: CredNS
Class Name: CredCN
Code Generation Language: C#
Severity : Error
Code: MSB3073
Description: The command ""C:\Users\dwoodard.nuget\packages\nswag.msbuild\13.0.5\build../tools/Win/NSwag.exe" openapi2csclient /className:CredCN /namespace:CredNS /input:C:\Users\dwoodard\source\repos\CredibleCoreWebApp\CredibleCoreWebApp\OpenAPIs\ExportService2.asmx /output:obj\ExportService2Client.cs " exited with code -1
Project CredibleCoreWebApp
File: C:\Users\dwoodard.nuget\packages\nswag.apidescription.client\13.0.5\build\NSwag.ApiDescription.Client.targets
Line 28
Column 5
Suppression State
If I choose gRPC then the “Add a new gRPC service reference” window opens.
I fill out the form with the following information:
URL: https://reportservices.credtest.com/reports/ExportService.asmx
Select the type of class to be generated: Client (I have also tried server and “Client and Server”)
I get the result “Successfully added service Reference(s)”.
If I click on “view generated code” then I get the following error:
Unable to get the generated codefiles for gRPC service reference ExportService2. You may need to build the project first.
I immediately do a build and get 82 errors.
Error #1:
Severity : Error
Code:
Description: \src\github\grpc\workspace_protoc_windows_x64\third_party\protobuf\src\google\protobuf\compiler\parser.cc:648] No syntax specified for the proto file: Protos/ExportService2.asmx. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
Project: CredibleCoreWebApp
File: C:\Users\dwoodard\source\repos\CredibleCoreWebApp\CredibleCoreWebApp[libprotobuf WARNING T
Line: 1
Column: 1
Suppression State:
The many errors following are like this:
Expected top-level statement (e.g. "message").
Need space between number and identifier.
"e" must be followed by exponent.
WCF Gives errors when trying to add so never succeeds.
I enter the URI: https://reportservices.credtest.com/reports/ExportService.asmx
Click GO
Services: reports/ExportService.asmx (automatically populated)
Status: Warning: One or more errors occurred.
Error Details:
Cannot import wsdl:port\r\nDetail: \r\nXPath to Error Source: //wsdl:definitions[#targetNamespace='https://www.credtest.com/']/wsdl:service[#name='ExportService']/wsdl:port[#name='ExportServiceHttpPost']
Cannot import wsdl:binding\r\nDetail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.\r\nXPath to Error Source: //wsdl:definitions[#targetNamespace='https://www.credtest.com/']/wsdl:binding[#name='ExportServiceHttpPost']
Cannot import wsdl:port\r\nDetail: \r\nXPath to Error Source: //wsdl:definitions[#targetNamespace='https://www.credtest.com/']/wsdl:service[#name='ExportService']/wsdl:port[#name='ExportServiceHttpGet']
Cannot import wsdl:binding\r\nDetail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.\r\nXPath to Error Source: //wsdl:definitions[#targetNamespace='https://www.credtest.com/']/wsdl:binding[#name='ExportServiceHttpGet']

.Net Framework 4.8 MVC - ${aspnet-TraceIdentifier} is always empty

In my .Net 4.8 MVC application I'm trying to write logs with NLog. One of the field is traceId - ${aspnet-TraceIdentifier}, which suppose to be supported by NLog.Web.
So I followed the documentation and installed:
NLog v4.7.6
NLog.Extensions.Logging v1.6.5
NLog.Web v4.9.3
I placed my NLog.config in project's directory:
<?xml version="1.0" ?>
<nlog autoReload="true"
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
throwExceptions="true"
internalLogLevel="trace"
internalLogFile="c:\test\internal-nlog.txt">
<targets>
<target name="ws" xsi:type="WebService" protocol="JsonPost"
url="https://log-api.com/log/v1">
<parameter name="time" layout="${date}" />
<parameter name="level" layout="${level:upperCase=true}"/>
<parameter name="message" layout="${message}" />
<parameter name="host" layout="${machinename}" />
<parameter name="threadid" layout="${threadid}" />
<parameter name="ActivityId" layout="${activityId}" />
<parameter name="processId" layout="${processId}" />
<parameter name="threadid" layout="${threadid}" />
<parameter name="event-properties" layout="${all-event-properties}" />
<parameter name="exception" layout="${exception}" />
<parameter name="traceId" layout="${aspnet-TraceIdentifier}" />
<parameter name="environment" layout="Production" />
<parameter name="serviceName" layout="company-api2222222" />
<parameter name="session" layout="${aspnet-session}"/>
<parameter name="sessionId" layout="${aspnet-sessionid}"/>
<header name="X-License-Key" layout="${environment:LICENSE_KEY}"/>
</target>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="ws" />
</rules>
</nlog>
According to the documentation, further configuration is not needed:
"Simply install the package. NLog will detect the extension automatically."
So, inside my controller I simply getting current class logger and logging:
NLog.LogManager.GetCurrentClassLogger().Info("Hello World");
But unfortunately, ${aspnet-TraceIdentifier} value is empty, and the worst thing is that I cannot find any documentation about how to make it works.
I tried to put extensions tag above targets in NLog.config file
<extensions>
<add assembly="NLog.Web"/>
</extensions>
and even tried this as well:
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
But nothing changed. Can anyone help? There is something that I am missing? maybe a configuration problem after all?
It's unclear if you're using ASP.NET or ASP.NET Core.
So an answer for both:
ASP.NET (non core)
For ASP.NET you should use <add assembly="NLog.Web"/> and the NLog.Web package
For ASP.NET with IIS needs IIS ETW feature enabled: https://learn.microsoft.com/en-us/iis/configuration/system.webServer/httpTracing/ (IIS7 - Win2008)
internally HttpWorkerRequest.RequestTraceIdentifier will be used.
ASP.NET Core
For ASP.NET Core you should use <add assembly="NLog.Web.AspNetCore"/> and the NLog.Web.AspNetCore package
NLog uses these for the traceindentifier:
ASP.NET Core 3-5: use System.Diagnostics.Activity.Current.Id (default) or HttpContext.TraceIdentifier
ASP.NET Core 1+2: HttpContext.TraceIdentifier
For ASP.NET Core 3-5 you maybe need ignoreActivityId. e.g. ${aspnet-TraceIdentifier:ignoreActivityId=true} - if true - HttpContext.TraceIdentifier will be used instead of System.Diagnostics.Activity.Current.Id

How to change app settings of Web.Config using targets.wpp

I have created a wpp.targets file which does all the deployment in azure. I want to change the appsetting property of webconfig during deployment to azure. I found a sample in http://sedodream.com/PermaLink,guid,25ddd39e-59de-4e35-becc-de19dcc5e4ea.aspx , which uses the pubxml and parameters.xml. I want to use wpp.targets instead of pubxml.
<appSettings>
<!-- TODO: set this in the azure config -->
<add key="customer" value="xyz" />
</appSettings>
Need to update the customer value to "client" during deployment and web.config file should reflect the changes in the deployed folder like below
<appSettings>
<add key="customer" value="client" />
</appSettings>
ANSWER
I have achieved using the ProjectParametersXMLFile in msDeploy
msbuild Api.csproj /p:ProjectParametersXMLFile="c:\parameter.xml"/p:PublishSettingsFile=%publishFileLocation%
You can use parameter xml file
for example
<parameters >
<parameter name="customer" description="web Job queue name" defaultValue="sitetest1">
<parameterEntry kind="XmlFile"
scope="\\web.config$"
match="/configuration/appSettings/add[#key='customer']/#value" />
</parameter>
<parameter name="customer" description="web Job queue name" defaultValue="sitetest">
<parameterEntry kind="XmlFile"
scope="\\app.config$"
match="/configuration/appSettings/add[#key='customer']/#value" />
</parameter>
</parameters>
this file will change the appsettings when you deploy in azure based on default value you provide

Using Enterprise Library DAAB in C# Console Project

How can I prepare the configuration settings (App.config, maybe?) I need to use Enterprise Library Data Access Application Block in a C# console project?
Following is what I currently trying with an App.config in the console project. When I call DatabaseFactory.CreateDatabase(), it throws an exception which says:
"Configuration system failed to initialize"
<configuration>
<dataConfiguration>
<xmlSerializerSection type="Microsoft.Practices.EnterpriseLibrary.Data.
Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<enterpriseLibrary.databaseSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" defaultInstance="Northwind"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
<databaseType name="Sql Server" type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" />
</databaseTypes>
<instances>
<instance name="Northwind" type="Sql Server" connectionString="Northwind" />
</instances>
<connectionStrings>
<connectionString name="Northwind">
<parameters>
<parameter name="Database" value="Northwind" isSensitive="false" />
<parameter name="Integrated Security" value="True" isSensitive="false" />
<parameter name="Server" value="local" isSensitive="false" />
<parameter name="User ID" value="sa" isSensitive="false" />
<parameter name="Password" value="sa1234" isSensitive="true" />
</parameters>
</connectionString>
</connectionStrings>
</enterpriseLibrary.databaseSettings>
</xmlSerializerSection>
</dataConfiguration>
</configuration>
Use the Enterprise Library Configuration Tool which is integrated into Visual Studio once you install the Enterprise Library - it will ensure your configuration XML is setup correctly.

NLog not saving large string In Database with Buffer and asynchronously options

I am working on a project which need to log SOAP messages request. Some requests have very large string more then 14 million XML characters. Issue is when these kind of messages are send to database, these messages are not saved neither any kind of exception occur in application. I try to switch on N-Log exception property but nothing happened. You can find my configuration settings below
<targets>
<target name="main" xsi:type="AutoFlushWrapper" asyncFlush="true">
<target name="database_buffer"
xsi:type="BufferingWrapper"
bufferSize="50"
flushTimeout="120000">
<target xsi:type="FallbackGroup"
name="String"
returnToFirstOnSuccess="true">
<target xsi:type="Database"
name="database_inner"
connectionString="${event-context:item=dbConnectionString}"
commandText="INSERT INTO [Log] ([Level],[Message],[Application],[MethodInfo],[Exception]) VALUES(#Level,#Message,#ApplicationName,#MethodInfo,#Exception)">
<parameter name="#Level" layout="${level:uppercase=true}" />
<parameter name="#Message" layout="${event-properties:item=Message}" />
<parameter name="#ApplicationName" layout="${event-properties:item=SourceName}" />
<parameter name="#MethodInfo" layout="${event-properties:item=MethodInfo}" />
<parameter name="#Exception" layout="${event-properties:item=Exception}" />
</target>
</target>
</target>
</target>
</targets>
There is no internal log file created or application crash in debug mode. On the same end small strings and normal length messages are successfully going into database. In database I have Nvarchar Max datatype for column.
I can't find option here to upload file so I am attaching this link to download exact message which I am trying to save in database. Here is it.
This file text successfully insert in database when I remove Buffer and asynchronously options or I insert with Ado.net components.
So please guide me the where I am wrong and what is the issue.

Categories