Migrate enterprise web application #355
Replies: 4 comments 8 replies
-
Hi, .NET Remoting is deprecated; migration to something else, in your case gRPC, is a precondition for net48 to net9 migration. Client side Here you can still sit on net48 and concentrate on migration to gRPC only. Server side The application must host a web server in order to accept HTTP/2 requests, and it is about ASP.NET Core. Choice: migration to gRPC and .NET at the same time. Choice: still sit on net48 and concentrate on migration to gRPC only. Be aware that Grpc.Core.Server is in maintenance mode and will be deprecated in favor of gRPC .NET. See Grpc.Core.DesignTime and Grpc.Core.ReflectionEmit Contract, data marshaling BinarySerializer is deprecated as well as ISerializable interface. DataContractSerializer behavior is very close to BinarySerializer, may be it is a good choice for the begining. See also MessagePackMarshaller, ProtobufMarshaller. Synchronous calls sync or async or both is your choice: [ServiceContract]
public interface IFoo
{
[OperationContract]
Bar GetBar(); // blocking unary call
[OperationContract]
Task<Bar> GetBarAsync(); // async unary call
} see also SyncOverAsync |
Beta Was this translation helpful? Give feedback.
-
Under the hood ServiceModel.Grpc does some code generation. With
Usually, after building the solution and restarting IDE, the problem should disappear. Related to Roslyn Source Generators and IDE integration.
Certainly not. |
Beta Was this translation helpful? Give feedback.
-
need to double-check.
var server = new Grpc.Core.Server
{
Ports = { new ServerPort("localhost", 8082, ServerCredentials.Insecure) }
};
server.Services.AddCalculator(
new Calculator(),
options =>
{
// ...
});
server.Start();
Console.ReadLine();
await server.ShutdownAsync();
For method declarations in your example, it is expected behavior. This is a feature Sync over async.
As soon as it will be supported by C#. // Error CS1988 Async methods cannot have ref, in or out parameters
static async Task TestAsync(out string value1, ref string value2) { } |
Beta Was this translation helpful? Give feedback.
-
Follow MessagePackMarshaller.AOT example. For
The provided |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we have an old web application(client) which communicate via .Net Remoting to a windows service application(server) via tcp. The web app and the service are build with .Net Framework 4.8. The app is very big and we cannot migrate at once. As one step we plan to replace .Net Remoting with ServiceModel.Grpc.
My question is, what is the best approach to create a server and a client under .Net Framework 4.8? It should be possible that we can switch to .Net 9 or 10 without refactor the whole grpc tech again.
We have around 150 MarshalByRefObject classes in the server with a lot of methods. All calls are synchronous.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions