Import Datasnap Connector in Smart Mobile Studio - datasnap

I've got problem with Smart Mobile Studio: I want connect with datasnap server, I import datasnap connector ( Tools>Import Datasnap Connector...) but when I execute code it prodece message:
[INFO] Building project 'test'...
[INFO] Compilation successful [101 ms]
[INFO] Generating JavaScript successful [286 ms]
[INFO] Linking...
Resource file [$(DataSnap)\connection.js] not found
Resource file [$(DataSnap)\serverfunctionexecutor.js] not found
[ERROR] Linking failed: Error: Some resources (2) were not found
It's weird because I work with that server in my HTML5 Builder projects, and Delphi apps, and everything works fine. How fix it (or configure SMS) and force to work properly?

You have to configure DataSnap server to generate these JavaScript files. It is a server feature available in the New DataSnap Server wizard. Did you check the option? SMS needs those files.
Also article on website Smart Mobile Studio how to use DataSnap connector:
Using DataSnap Connector Importer

Related

Remote debug Azure web job with .NET 6 in Visual Studio 2022

I followed this tutorial to create a simple web job in Azure: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-get-started. The web job itself does its job, consumes the message in the queue and I see them appear in Application Insights.
However, I want to debug the function on my local machine by using the tools available in Visual Studio 2022.
I have published with following profile settings:
Next I've attached the debugger under het Hosting menu:
First thing I noticed is a message about no symbols being loaded when putting a breakpoint in the function:
When I add a message to my queue, it gets consumed by the web job but the breakpoint is never hit. I've been reading a lot of similar questions regarding a this issue but I'm not progressing any further.
In Azure Portal, I've enabled Remote debugging under Configuration > general settings
In Visual Studio 2022, I checked if the correct process is attached
Here I'm a bit confused thou, the connection target is connecting through port 4024, which is according to this document, the port for Visual Studio 2019. However, a connection target with port 4026 is not found.
What am I missing here? Am I forgetting another setting somewhere?
If have tried changing the stack setting .NET version from APS.NET V4.8 to NET 6 (LTS) but that didn't help.
Should the platform architecture match the architecture of my machine in order to get it to work? Or is this not linked in any way with the debugger?
Is there anything else that I should check or try? Because my hair is turning grey here :)
Apologies for the delay here!
It should be 4024 for both 32 and 64 bit.
See this Azure doc: Remote Debugger Ports on Microsoft Azure App Service
Typically, the error “The breakpoint will not currently be hit. No symbols have been loaded for this document.” -- This error message indicates we can start debug process and attach, but cannot set a breakpoint on any or some lines of code in the project.
Most, likely cause: Application is built without debug symbols or debug symbols are not available
Kindly try these steps:
Verify Debug Symbols are being used and published and in sync
Workaround the issue by disabling “Enable Just My Code” from the
Tools >> Options >> Debugging >> general menu in Visual Studio
Other things to narrow-down the issue:
Debug symbols must be available locally or deployed to the Azure App Service, and must match the local code you are trying to debug.
It is recommended to use Cloud Explorer over Server Explorer to
connect and debug which requires the Azure SDK.
You could optionally Manually Attach a Debugger to Azure Web Apps to troubleshoot this further or recommend this as a workaround.
(old blog, try similar steps)
Kindly verify the port (Visual Studio remote debugger port assignments ) required is open in the corporate firewall and on your local machine.
As a test, you may use tool like Wireshark/netmon, to see if the port successfully connects to the port (4024) needed by the process.

Azure: Updated ASP.Net Core SDK to 1.0 to 2.1.203 and getting error about System.Data.SqlClient

I updated and migrated my local project to start using ASP CORE 2.1.0 from 1.0. I followed the ASP CORE migration guideline from Microsoft here:
https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/?view=aspnetcore-2.1
Then 2.0 to 2.1 here:
https://learn.microsoft.com/en-us/aspnet/core/migration/20_21?view=aspnetcore-2.1
And everything works just fine on my local machine.
After pushing the code, it builds and runs just fine. So no error occurred when running the website. But when I hit the website on my browser, Azure is throwing 500 internal error messages. I checked the logs, and this is what I find:
2018-08-01 07:05:25.682 +00:00 [Error] Microsoft.AspNetCore.Server.Kestrel:
Connection id "0HLFNDIE4UDCG", Request id "0HLFNDIE4UDCG:00000003": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot find compilation library location for package 'System.Data.SqlClient'
at Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths(ICompilationAssemblyResolver resolver, List`1 assemblies)
at Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths()
...
I tried adding System.Data.SqlClient to my local code using Nuget, and pushed to Azure, and still I get the same problem.
Can someone please explain what's happening here? And why Azure needs this package when it's not part of my project?
This is a reference path issue.
Check for System.Data.SqlClient in the references and verify the location form which the package is referred. It looks like the path is there in your local machine and not available after deployment.
I figured out what I could do.
I went into the azure console, and typed this in:
nuget install System.Data.SqlClient
And it added the package into the system. The error now stopped.

Windows App Certification Kit - supported API test goes wrong

I am uploading a HoloLens app. Everything is fine until the Windows App Certification Kit - supported API test goes wrong. It said API "D3D12GetDebugInterface in d3d12.dll is not supported for this application type. UnityPlayer.dll calls this API. which does not exist in my app.
My app is in a release configuration, and .NET Native tool chain is checked.
When Unity 3D generates the project it creates 3 different configurations, debug, release, and master. You mostly packaged up "release" for the app store, you should package up "master" for the app store and you will not get that submission error.

Unable to remote debug asp.net mvc core application on IIS8 (AWS EC2)

I have an MVC core website written in C# which is deployed to an AWS EC2 Instance with Windows Server 2012 R2 and IIS8 deployed on it.
I am trying to remote debug the application as I am getting errors thrown which I don't when running locally (details for another post maybe).
On AWS Console, I have a security group with the following Rules as guided by here:
and when I click on Debug->Attach to process, and browse to my AWS instance, I can see the correct dnx.exe process, however, when I attach to that process,
I get the The breakpoint will not currently be hit. No symbols have been loaded for this document
I've tried going to Tools->Options->Debugging->Symbols and clicking Load all symbols as it is my understanding that since VS2012 the symbols do not need to be deployed, but rather just on the local machine doing the debugging, taken from here.
In versions of Visual Studio before VS 2012, debugging managed code on a remote device required that the symbol files were also located on the remote machine. This is no longer the case. All symbol files must be located on the local machine or in a location specified in the Debugging / Symbols page of the Visual Studio Options dialog box. See .NET Remote Symbol Loading Changes in Visual Studio 2012 and 2013 on the Microsoft Application Lifecycle blog.
I can see the connections being initiated in the MSVSMON process on the EC2 instance.
I feel like I'm close but I'm just missing one simple thing.
You need to check on which port the Remote Debugger is running and allow inbound traffic on that port by opening Inbound Port [4024 in my case] with a Custom TCP Rule for Remote Debugging.
You can check the port used by Remote Debugger at Tools > Options in the Remote Debugger Menu.

Microsoft Sync framework Architecture Conflict

I have developed an application using Microsft Sync framework 2.1, It works fine on my local system which is a 32bit windows 8 PC. However when I deployed the Server side of the project to azure (which is a 64bit platform) I get the popular "Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
which usually means there is a conflict in the system architecture and the Sync library refrenced.
My direct question is, Must the client and server both be on the same architecture for Sync framework to work i.e can we have server on 64bit and client on 32 bit
if you're deploying two tier, the client and server platform do not need to match. but the build target for your app must match the platform for the Sync Fx you installed.
e.g., If the target platform of your app (check your Project properties in VS), is x86, then you should have x86 Sync Fx installed

Resources