BAPI_MATERIAL_SAVEREPLICA throws "no update (test mode)" - c#

I am calling BAPI_MATERIAL_SAVEREPLICA for updating the material in SAP through my WCF Web service using Net connector 3.0 in C#.
Before i was getting the validation errors but after populating all validations now i am getting return message
Material successfully checked: no update (test mode)
If Is it because of missing parameters then how can i find which parameter is missing
or do i need to set the testing mode on somewhere in C# code or ABAP .
Thanks

I assume you have set the parameter TESTRUN to 'X'. The system is doing just what you specified: Check the data, but do not update anything. If you want to change the data for real, remove the flag.

Related

Error 28P01 - Password authentication failed

recently I have started my adventure with databases.
I have managed to install postgreSQL and create simple database.
I've tried to create simple app which will allow me to view data from DB.
I'm using VS 2017. I have managed to configure DataSource in my WindowsForm (NetFramework) project. Test connection was successful.
When I try to fill my ListBox with data from table I'm recieving error 28P01 (it seems to mean that I'm using wrong password / username).
It is impossible - im using default account (postgres) and passsword which allowed me to populate DB in datagrip.
Can anyone help me to understand what is going on?
Guys I have managed to work it out. The thing that I did bad was configuration of connection in VS DataSource configuration. I had choosen NOT to include sensitive data into connection string - I had to put it in my code or change setting to INCLUDE it.
I feel so dumb

Trouble with Quit() on VisualFoxPro Application within C#

I've created a WebAPI webservice that accepts requests from a legacy Visual FoxPro system. The service needs to parse the request and then launch the VFP runtime in order to execute some legacy FoxPro code to actually "process" the request.
I have some code like this:
try{
foxApp = new VisualFoxpro.FoxApplication();
foxApp.DoCmd(#"do hqinit with .T.");
...
foxApp.DoCmd("close all");
foxApp.DoCmd("release all");
foxApp.Quit();
}
catch{
...
}
The foxApp.Quit() constantly throws and error and the FoxPro Application is still left running (I can see it in the Task Manager).
Based on this SO post, I tried the following:
try{
foxApp = new VisualFoxpro.FoxApplication();
...
while(System.Runtime.InteropServices.Marshal.ReleaseComObject(foxApp) > 0) {}
However, while I no longer get the error I was getting when trying to foxApp.Quit(), VFP Application is still left running after each call to the web service.
How do I ensure that VFP gets closed down at the end of each web request?
Update
I just tested again and realized that the first code block does NOT throw an error. Rather, it simply hangs the server. However, if I add foxApp.DoCmd("clear all") before foxApp.Quit() I get an error stating that:
Cannot clear the object OPANEBROWSER because it is in use.
None of my code references an OPANEBROWSER object some I'm not sure where that is coming from.
Got it!
I had installed VFP9.0 SP2 on the server and technically, I'm launching the app itself. On my dev environments, I always disable the Task Manager pane that MS pops up by default. However, I had not done that on the server VFP environment.
Once I disabled the Task Manager in VFP environment so that it did not get displayed on Start of VFP, everything was golden.

App Insights Undefined Entries

I am using app insights in my web forms application and I get always entries with undefined description equal to the entities with named descritions.
Here is a snapshot: http://imgur.com/a/Coz8H
Always I get entries like this:
Why is the undefined tag count equal to the Windows 10 tag (almost always)?
What does the undefined tag mean, does it mean that the app insights has failed to recognize the operating system?
Is it because the undefined things are from the server side because I see many dependency calls to DATABASE and only POST requests when I further explore the tag's row.
Thanks.
Yes means Application Insights failed to recognize the operating system. THe reason it is equal to Windows10 tag looks purely coincidental.

Mathematica .Net/Link in an Asp.Net application

I am using the Mathematica .Net/Link platform to create a web service to format and calculate math problems. However I am unable to get it working.
I create it using this code:
_Log.IpDebug("Starting the Kernel Link");
if (string.IsNullOrEmpty(_MathLinkArguments))
_InternelKernel = MathLinkFactory.CreateKernelLink();
else
_InternelKernel = MathLinkFactory.CreateKernelLink(_MathLinkArguments);
_Log.IpDebug("Kernel Link Started");
_InternelKernel.WaitAndDiscardAnswer();
The value of _MathLinkArguments is -linkmode launch -linkname \"C:\\Program Files\\Wolfram Research\\Mathematica\\7.0\\Math.exe\".
This piece of code is called from the Application_Start method of the global.asax.cs file.
When it gets to the WaitAndDiscardAnswer() call it gives the server error:
Error code: 11. Connected MathLink program has closed the link, but there might still be data underway.
Note: The SampleCode given with the .NET/Link package (both a console app and a WinForms app) works.
Edit:
I copied the console app sample code given with Mathematica into an asp.net page and it gave me the same error the first load and then on subsequent loads it gave me:
Error code: 1. MathLink connection was lost.
Edit2:
I forgot to mention that when I have procmon and task manager open while running my app, I can tell that Math.exe starts but it immediately exits, which makes those error code make complete sense...but doesn't explain why that happened.
To allow the .Net/Link to work in Asp.net (at least in IIS 7.5) you need to enable the property loadUserProfile on the app pool for the web site.
I am not entirely sure why this is the case, but from what I found while trying to debug this, there are some things that are gotten from the user's profile. I know for a fact that the default location of the kernel is, which explains why I couldn't use it with no arguments, and so I can only assume that other things are needed as well and without the profile it couldn't determine that.
But whatever the reason is this is required, it is, or at least it is a fix if you are getting similar problems like this in your own application.
I got the same error in a .Net WinForm application.
mathKernel = new MathKernel();
mathKernel.Compute("<< XYZ`XYZGraphs`");
The error occurred on loading the package straight after instantiating the MathKernel.
To resolve it you can wait a couple of seconds and then instantiating the MathKernel works fine. During this state where there might still be data underway the following conditions are both false:
if (!MathKernel.IsConnected)
{
MathKernel.Connect();
}
if (MathKernel.IsComputing)
{
MathKernel.Abort();
}
Edit:
I've recieved the error again and this time was able to determine the problem.
Using a command line open the MathKernel.exe and view the error message:

how to update web reference location

i have an application wherein i am using a web-service. Now the ip address of the machine where this web-service was residing has changed.
i try to update the web reference in my application and it is still trying to access the web-service from the old location. How do i change this to the new location.
I have already updated the new location in my web.config file.
Please help!!
Thank you.
Right click the service, Choose configure and change the address.
If you're getting an unspecified error you could always remove the existing reference (which will break the build, so don't check anything in), then add the new one. Build and test to make sure it works and then check it in to source control.

Categories