SOAP Request conversion error - soap

Due to a NDA I cannot share any code so hopefully someone can help me here.
I'm trying to do a SOAP call to a backoffice of a client which works until I ask for the result. Now my project is divided into 3 separate project files
Main App (netcoreapp1.0)
Models (netcoreapp1.0)
Services (netcoreapp1.0)
When I execute the async task the following error occurs.
System.String, System.Private.CoreLib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e is not assignable
from System.String[], System.Private.CoreLib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e
What I can say about the call is that I assign a string to a class that contains one property (string). So I'm not exactly sure what is the problem here.
Hopefully someone had this problem before and can point me to the fix !
Tx

I had a similar problem. I had 2 dimensions arrays "array[][]", simply I changed the 2 dimensions array "array[][]" to 1 dimension array "array[]" and it works fine. Check this post:
https://forums.asp.net/t/1469891.aspx?Unable+to+generate+a+temporary+class+result+1+error+CS0030+

Related

How to fix "Assembly "AjaxControlToolkit, Version=3.5.605" error on executing JMeter Script?

I have created a JMeter load test script for .Net Version 4.8 framework. It's successfully passed but on re-execution or on increasing thread group count it throws an error like "Assembly "AjaxControlToolkit, Version=3.5.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" does not contain a script with hash code "de1feab2"." in View result Tree in JMeter.
Please let me know the exact steps to get it fixed for successful execution.
I think you need to pass view state value and ScriptManager’s hidden value while reposting it in .Net.
Below article may help u..
https://devio.wordpress.com/2012/07/12/configuring-jmeter-for-asp-net-sites/

Error after login in M2 Backend in dev mode only

Anybody experience with this error? I see nothing in the logs that helps me.
Exception #0 (LogicException): Could not create an acl object: Invalid
Document Element 'resource': The attribute 'title' is required but
missing. Line: 5
0 /generated/code/Magento/Framework/Acl/Builder/Proxy.php(95): Magento\Framework\Acl\Builder->getAcl()
I have also experienced this issue some time ago. Actually, the problem is one of your custom or third party module contains <resource> tag in acl.xml in etc folder file and the title attribute is missing over there, which is the cause of this exception. Therefore, I would suggest you to check acl.xml files and if title attribute is missing in any of your module then add a title to <resource> tag something like this:
File etc/acl.xml in one of your module:
<resource id="Custom_Module::config" title="Module Title" />
You can also check this Magento 2.2.0 Invalid Document Element 'resource': The attribute 'title' is required but missing from where I found the solution to my problem.
I had the same issue because I had disabled all MSI modules.
Try to enable them and check if this fixed your issue.
In Addition to verifying the title against the most inner resource tag, also verify that you have not added extra id="Custome_Module::config" in any of your acl.xml or some spelling mistake etc.

0x80048470 - Importing CRM Solution

I am trying to import an unmanaged solution but for some reason I am getting the following error:
Failure: 0x80048470 - The entity relationship role of the referencing entity is required when creating a new one-to-many entity relationship business_unit_new_contract.
It's interesting because I've opened the costumizations.xml and the relationship is there. Also, when I look up at the exported solution entity that has the relationship, the relationship is also displayed.
At first, I was receiving an 0x8004803A error as shown:
Failure: 0x8004803A - The import has failed because component of type 50 is not declared in the solution file as a root component. To fix this, import again using the XML file that was generated when you exported the solution.
So, I opened the solution.xml and added a new for that particular type, which was not in the file.
Has anyone ever experienced that? Also, This relationship shown is between businessunit and one of my entities.
Is there any way of fixing it through database? What would be the best solution?
Thanks in advance,
Dem
I'll just try to explain your second problem (0x8004803A), since it happened to me today.
By the way, this was one of the few times when 'Download log' was actually helpful (it contained the real error).
The import has failed because component of type 50 is not declared in the solution file as a root component.
Entity type code 50 apparently stands for (global) Application Ribbon. This can happen when manually adding the <RibbonXmlDiff /> section to customizations.xml. If this happens it is enough to add following line to solution.xml:
<RootComponents>
...
<RootComponent type="50" schemaName=":RibbonDiffXml" />
</RootComponents>

Rehosting workflow designer

I'm creating an application that rehost the workflow designer and that can load an xoml only workflow.
When I deserialize my xoml-only workflow. There is an error stating : {"Could not deserialize object. The type 'MyCustomActivity' could not be resolved."}
my xoml looks like this:
<SequentialWorkflowActivity x:Name="Workflow2" xmlns:ns0="clr-
namespace:MyCustomActivities;Assembly=MyCustomActivities, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null" xmlns:x="http://schemas.microsoft.com/winfx
/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow">
<ns0:MyCustomActivity x:Name="myCustomActivity1" /></SequentialWorkflowActivity>
I'm kinda stuck on this, my workflow is pretty basic. I just want to load it to see if I could see it.
MyCustomActivities is a library containing all my custom activities.
Found the problem was related to the fact that the library was not in the same folder as the designer.

MetadataException when using Entity Framework Entity Connection [duplicate]

This question already has answers here:
MetadataException: Unable to load the specified metadata resource
(47 answers)
Closed 6 years ago.
This code:
using (EntityConnection conn = new EntityConnection("name=ELSCommonEntities"))
{
conn.Open();
}
Gives me the following error:
Test method ELS.Service.Business.IntegrationTest.Base.ServiceBaseIntegrationTest.StartLoggingTestMethod threw exception: System.Data.MetadataException: Unable to load the specified metadata resource..
With the following stack trace:
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
System.Data.EntityClient.EntityConnection.SplitPaths(String paths)
System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
System.Data.EntityClient.EntityConnection.InitializeMetadata(DbConnection newConnection, DbConnection originalConnection, Boolean closeOriginalConnectionOnFailure)
System.Data.EntityClient.EntityConnection.Open()
ELS.Service.Business.Base.ServiceBase.StartLogging(String userWindowsLogon) in C:\C-TOM\ELS-RELEASE1\ELS.Service.Business\Base\ServiceBase.cs: line 98
ELS.Service.Business.IntegrationTest.Base.ServiceBaseIntegrationTest.StartLoggingTestMethod() in C:\C-TOM\ELS-RELEASE1\ELS.Service.Business.IntegrationTest\Base\ServiceBaseIntegrationTest.cs: line 65
However, this code which uses the same connection string:
using (ELSCommonEntities db = new ELSCommonEntities())
{
var res = from c in db.Logging
select c;
int i = res.Count();
}
Does not give an error.
The connection string is:
<add name="ELSCommonEntities" connectionString="metadata=res://*/Common.CommonModel.csdl|res://*/Common.CommonModel.ssdl|res://*/Common.CommonModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhost;Initial Catalog=els5_demo;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
I have also opened up the dll in reflector and the metadata looks ok.
Found the problem.
The standard metadata string looks like this:
metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl
And this works fine in most cases. However, in some (including mine) Entity Framework get confused and does not know which dll to look in. Therefore, change the metadata string to:
metadata=res://nameOfDll/Model.csdl|res://nameOfDll/Model.ssdl|res://nameOfDll/Model.msl
And it will work. It was this link that got me on the right track:
http://itstu.blogspot.com/2008/07/to-load-specified-metadata-resource.html
Although I had the oposite problem, did not work in unit test, but worked in service.
I had the same error message, and the problem was also the metadata part of the connection string, but I had to dig a little deeper to solve it and wanted to share this little nugget:
The metadata string is made up of three sections that each look like this:
res://
(assembly)/
(model name).(ext)
Where ext is "csdl", "ssdl", and "msl".
For most people, assembly can probably be "*", which seems to indicate that all loaded assemblies will be searched (I haven't done a huge amount of testing of this).
This part wasn't an issue for me, so I can't comment on whether you need the assembly name or file name (i.e., with or without ".dll"), though I have seen both suggested.
The model name part should be the name and namespace of your .edmx file, relative to your assembly.
So if you have a My.DataAccess assembly and you create DataModels.edmx in a Models folder, its full name is My.DataAccess.Models.DataModels. In this case, you would have "Models.DataModels.(ext)" in your metadata.
If you ever move or rename your .edmx file, you will need to update your metadata string manually (in my experience), and remembering to change the relative namespace will save a few headaches.
There are several possible catches.
I think that the most common error is in this part of the connection string:
res://xxx/yyy.csdl|res://xxx/yyy.ssdl|res://xxx/yyy.msl;
This is no magic. Once you understand what is stands for you'll get the connection string right.
First the xxx part. That's nothing else than an assembly name where you defined you EF context clas. Usually it would be something like MyProject.Data.
Default value is * which stands for all loaded assemblies. It's always better to specify a particular assembly name.
Now the yyy part. That's a resource name in the xxx assembly.
It will usually be something like a relative path to your .edmx file with dots instead of slashes. E.g. Models/Catalog - Models.Catalog
The easiest way to get the correct string for your application is to build the xxx assembly. Then open the assembly dll file in a text editor (I prefer the Total Commander's default viewer) and search for ".csdl". Usually there won't be more than 1 occurence of that string.
Your final EF connection string may look like this:
res://MyProject.Data/Models.Catalog.DataContext.csdl|res://MyProject.Data/Models.Catalog.DataContext.ssdl|res://MyProject.Data/Models.Catalog.DataContext.msl;
As Shiraz Bhaiji answered, the metadata=res:///Model.csdl|res:///Model.ssdl|res://*/Model.msl was the case.
However I still had problems with constructing the proper string based on my Model localization, namespaces and assemby name. The very simple solution was to rename the .edmx file in Visual Studio(after than rename and get back to the original name), which triggered the automatic refreshing of the string in my Web.config
I had the same problem with three projects in one solution and all of the suggestions didn't work until I made a reference in the reference file of the web site project to the project where the edmx file sits.
I moved my Database First DataModel to a different project midway through development. Poor planning (or lack there of) on my part.
Initially I had a solution with one project. Then I added another project to the solution and recreated my Database First DataModel from the Sql Server Dataase.
To fix the problem - MetadataException when using Entity Framework Entity Connection. I copied my the ConnectionString from the new Project Web.Config to the original project Web.Config. However, this occurred after I updated my all the references in the original project to new DataModel project.
It might just be a connection string error, which is solved by the above process, but if you are using the dll's in multiple projects then making sure the connection string is named properly will fix the error for sure.
I had this problem when moving my .edmx database first model from one project to another.
I simply did the following:
Deleted the connection strings in the app.config or web.config
Deleted the 'Model.edmx'
Re-added the model to the project.