BizTalk Migration Issue from .Net 2.0 to .Net 4.0 - c#

Our team right now is upgrading our BizTalk 2009 server to 2010 and one of the process we need to undertake is to convert our codes from .Net Framework 2.0 to 4.0, but when we tried to test the newly converted codes, we hit this error that was not encountered when we are still using .Net Framework 2.0.
A message received by adapter "FILE" on receive location RL.CMSO.CHTR.WebService.SubmitOrder" with URI D:\Data\CMSO\CHTR\WebService\Retry\SubmitOrder*.xml" is suspended.
Error details: There was a failure executing the receive pipeline: CMSO.CHTR.Pipelines.ReceiveRequest, CMSO.CHTR.Pipelines, Version=10.7.1.0, Culture=neutral, PublicKeyToken=32f1cdb63bb6ffdb"
Source: "OrderUID Pipeline Component"
Receive Port: "RP.CMSO.CHTR.WebService.SubmitOrder"
URI: D:\Data\CMSO\CHTR\WebService\Retry\SubmitOrder*.xml"
Reason: Error initilalizing AssignOrderUID Execute method.
Exception Details: Object reference not set to an instance of an object.
MessageId: {B1A1A514-CD9E-4164-8767-BF9BB4788EA0}
InstanceID: {892341D0-CC5C-4AF6-A6F2-D8AF49D6E077}
Please be reminded that before we upgraded our BizTalk we can use our system successfully, the error was encountered after the conversion. Can someone help us identifying the root cause of this issue?

Related

Dynamics CRM 2011 SyncWorkflowExecutionPlugin unable to find assembly

A strange error suddenly cropped up on our Dynamics CRM 2011 server - a specific plugin assembly can not be found when the plugin execution is triggered through a workflow process, with the error:
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[324f29aa-6082-ea11-80ee-005056837add: ]
Starting sync workflow 'workflow name', Id: 2d4f29aa-6082-ea11-80ee-005056837add
Sync workflow 'workflow name' terminated with error 'The type initializer for '<Module>' threw an exception.'
And exception stack trace ultimately leads to:
Inner Exception: <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException)
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
Inner Exception: System.Runtime.Serialization.SerializationException: Unable to find assembly 'AssemblyName, Version=8.75.0.267, Culture=neutral, PublicKeyToken=4e4051c21cef725b'.
The assembly is present on the server, version, culture, and public key token all match. Oddly enough the plugin steps work fine when the execution is triggered directly through a create/update/etc request - it's only when the execution is triggered through a workflow that the error occurs. And by triggered through a workflow I don't mean running code activity from that assembly, I mean a situation like:
Entity is created
OnCreate plugin from Assembly1 runs without issues
Workflow runs that updates a related entity, triggering OnUpdate plugin from Assembly1 - ERROR
This issue cropped up initially after a server restart. Another restart fixed it temporarily, until two days later it started happening again. We've tried everything we can think of - updating the assembly, unregistering/re-registering it, restarting all services, restarting the server again. Does anyone have any idea what might be the cause of this and how to fix it?
We discovered the issue was caused by a Windows update that had been applied before the initial restart, which had installed .NET framework v4.8 on the server. Although the application was still using an older version, apparently just having v4.8 installed was enough to cause errors. Reverting back to an earlier .NET version fixed the problem.
I am not certain what is the exact technical reason for this - seems to be something related to App Domains (https://learn.microsoft.com/en-us/dotnet/api/system.appdomain?view=netframework-4.8). But if you encounter a similar issue, check your .NET framework version.

Getting an error message "An error occurred while starting the application." after publishing an API app from Visual Studio 2017

I have a class library project based on .NET Framework 4.6.1. And another project is .NET service again based on .NET Framework 4.6.1. When I publish my service from visual studio 2017 to an API app in Azure, I get below error screen.
Few logs found:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred. IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly. IIS was not able to process configuration for the Web site or application. The authenticated user does not have permission to use this DLL. The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Note: Publish is successful without any error, but the application can't start.
Can anyone help me to resolve this error?
As I mentioned in comment, many factors can cause this generic error page, and it is difficult to find the root cause of the issue based on generic error message an error occurred while starting the application. For troubleshooting, you can use CaptureStartupErrors and the detailedErrors key to display details of startup exceptions.
Capture Startup Errors
new WebHostBuilder()
.CaptureStartupErrors(true)
Detailed Errors
new WebHostBuilder()
.UseSetting("detailedErrors", "true")

Identify the ASP.NET version of a site

I debug a site. I need to identify the .NET and ASP.NET version of the running site (on a local IIS).
When I have an .NET Error, the a page is displayed, like this:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a
configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.
Parser Error Message: Unrecognized attribute 'requestValidationMode'.
Note that attribute names are case-sensitive.
Source Error:
Line 120: Line 121: Line
122: Line 123: Line
124:
Source File: C:\mysite\opt\root\web.config Line: 122
Version Information: Microsoft .NET Framework Version: 4.0.30319;
ASP.NET Version: 4.6.1038.0
Is there a way to obtain that data in other way than a error message, to be able to identify that versions at demand?
I would like to stress that .NET and ASP.NET are different, and I need both of them.
PS. I would prefer, if possible do not have to modify the code, but rather via IIS...
You can try either of this below
typeof(Page).Assembly.GetName().Version; //ASP.NET Version
This gives your running ASP.NET version which in my case 4.0.0.0. You can find the same information if you expand your Reference folder -> find System.Web dll -> right click and choose properties -> check the Version information.
System.Environment.Version.ToString(); //Framework Version
This gives the version information of the CLR.
.NET Framework - registry check?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx
Environment.Version
should give you the ASP.NET version

MonoTouch - System.ServiceModel.Dispatcher.ClientOperation fails ("Could not Load signature of [type]).

We have a custom JSON WCF binding that we use in our .net SDK (to support JSON similar to the WebHttpBinding). Our SDK is a PCL supporting .net 4.5, Win8, IOS, Android profile - It works in our Windows Desktop application, and Android without any problem. We are just diving into MonoTouch, and have been tracing down why our custom WCF bindings were not working correctly. We were able to identify that in our WCF class that implements the System.ServiceModel.Description.IOperationBehavior interface, MonoTouch fails when trying to handle System.ServiceModel.Dispatcher.ClientOperation.
The exact error is mono "Could not load the signature of (our custom type) Failed for unknown reasons."
When I configure the .csproj Linker Options to "Link SDK assemblies only" and attempt to compile, I get the error:
Xamarin.iOS 8.6.1 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk
MTOUCHTASK: error MT2002: Failed to resolve "System.ServiceModel.Dispatcher.ClientOperation" reference from "System.ServiceModel.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Task "MTouchTask" execution --
Looking for any kind of work around, as we need the client operation to configure the "Formatter" property when passed in via the ApplyClientBehavior method.
Any assistance would be greatly appreciated.
I submitted this problem to Xamarin, and they confirmed that my report is a bug in Mono 3.1 - they have resolved it in Mono 4.0 but that is not out yet at the time of this writing. Hope this helps someone else out who might spend hours trying to resolve it.
Issue was the PCL library ClientOperation wouldn't work, but under the MonoTouch assmebly it was fine. Xamarin opened a private bug, so I don't have a reference number.

Crazy .net / Sharepoint error involving random temp files not found

Logged into a customer environment today to check logs and just generally do an inspection, only to notice some tasks had failed in one application.
Application is written in c# .net v4 running inside of IIS and exports to Sharepoint 2007.
I can't be 100% sure if .net or SharePoint is the culprit. These are the errors I got:
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\qbckfur1.dll'.
Export 26.05.2011 15:00:21 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\2shjg2xb.dll'.
Export 26.05.2011 15:30:13 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\b7utp199.dll'.
Export 26.05.2011 16:00:15 Failure
Task Failed: Server was unable to
process request. ---> Could not find
file 'C:\Windows\TEMP\ozr2umkm.dll'.
Does this look familiar to anyone?
This is a problem with XmlSerialization (beleive it or not). I ran into this with a custom ASP.NET MVC app. Apparently, when you call Serialize or Deserialize on types marked as "Serializable", .NET will generate an assembly on-the-fly to support the serialization and it attempts to write that assembly into 'c:\windows\temp'.
Even if Everyone has full control access to that directory I have still seen this occur when running an app from within an IIS App Pool. Especially in applications that has a lot of serialization activity.
If this sounds like your problem, the solution is to "pre-compile" the Serialization assembly and include it in your application with sgen, part of the Windows SDK.
This post highlights a similar issue: Serialization issue on MSDN Social
Here is the MSDN article on the tool: sgen reference
Final Note: There is a separate version of the Tool for .NET 4.0 so make sure you are using the correct version when generating your assembly.

Categories