Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing a SOAP rating service request in a .NET 7 COM-enabled assembly fails with 'The given assembly name was invalid' #82640

Closed
1KByington opened this issue Feb 22, 2023 · 9 comments

Comments

@1KByington
Copy link

1KByington commented Feb 22, 2023

Description

We have a .NET class library assembly COM server that executes a client call to a SOAP service. It works fine in .NET framework 6.x but when we change the target framework to .NET 7.x it throws the exception 'The given assembly name was invalid' at the point where the proxy function for the SOAP service is called. Changing the target framework was the only change made. The application works as expected when the target is .NET 6.x.

Microsoft support case #2212020010001039

Reproduction Steps

See the included example project which duplicates the error.

Expected behavior

We would expect the application to work the same (no error when executing the SOAP service proxy method) when the only change to the project is to change the target framework from .NET 6 to .NET 7.

Actual behavior

The exception error message 'The given assembly name was invalid' is generated when the .NET assembly COM server attempts to invoke a SOAP web service method.

Regression?

Works as expected in .NET 6

Known Workarounds

Workaround is to target framework 6.0, not 7.0.

Impact

Prevents upgrading from .NET 6 to .NET 7.

Configuration

.NET version: 7.x
OS: Windows 10 and 11 and Windows Server 2019
Architecture: X86, Any CPU, x64

Other information

No response

@miloush
Copy link
Contributor

miloush commented Feb 22, 2023

Can the repro project by included here? Is this a WPF issue rather than .NET?

@1KByington
Copy link
Author

SOAPServiceExample.zip

@1KByington
Copy link
Author

1KByington commented Feb 22, 2023

Can the repro project by included here? Is this a WPF issue rather than .NET?

The Microsoft support person we are working with asked us to post the issue here. I don't know why he asked us to put it in the wpf area.

@miloush
Copy link
Contributor

miloush commented Feb 22, 2023

Yeah this doesn't even use WPF, so it should be transferred to a more appropriate repo. Note that your TestSOAPExample is referencing Calculate assembly which is not included.

@1KByington
Copy link
Author

1KByington commented Feb 22, 2023

Yeah this doesn't even use WPF, so it should be transferred to a more appropriate repo. Note that your TestSOAPExample is referencing Calculate assembly which is not included.

There is no Calculate assembly, that is a method in the SOAP service. There are two projects in the solution: SOAPServiceExample which is a COM-enabled assembly that invokes a method on a SOAP web service; and TestSOAPExample, which executes the CalculatePremium method of the COM-enabled assembly. The COM-enabled assembly tries to invoke a SOAP web service method (CalculateQuote) and it returns the error described.

@pchaurasia14 pchaurasia14 transferred this issue from dotnet/wpf Feb 23, 2023
@jkotas jkotas transferred this issue from dotnet/winforms Feb 24, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 24, 2023
@jkotas
Copy link
Member

jkotas commented Feb 24, 2023

This is regression introduced by https://github.com/dotnet/runtime/pull/62095/files#diff-e09e7f6880244829d1c3b16e19b451ab04d059a7df0d8a367cd3fd08230c9096R126 . It is not safe to assume that alc.Name is going to be a valid assembly name.

@jkotas
Copy link
Member

jkotas commented Feb 24, 2023

@ghost
Copy link

ghost commented Feb 24, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

We have a .NET class library assembly COM server that executes a client call to a SOAP service. It works fine in .NET framework 6.x but when we change the target framework to .NET 7.x it throws the exception 'The given assembly name was invalid' at the point where the proxy function for the SOAP service is called. Changing the target framework was the only change made. The application works as expected when the target is .NET 6.x.

Microsoft support case #2212020010001039

Reproduction Steps

See the included example project which duplicates the error.

Expected behavior

We would expect the application to work the same (no error when executing the SOAP service proxy method) when the only change to the project is to change the target framework from .NET 6 to .NET 7.

Actual behavior

The exception error message 'The given assembly name was invalid' is generated when the .NET assembly COM server attempts to invoke a SOAP web service method.

Regression?

Works as expected in .NET 6

Known Workarounds

Workaround is to target framework 6.0, not 7.0.

Impact

Prevents upgrading from .NET 6 to .NET 7.

Configuration

.NET version: 7.x
OS: Windows 10 and 11 and Windows Server 2019
Architecture: X86, Any CPU, x64

Other information

No response

Author: 1KByington
Assignees: -
Labels:

area-System.Reflection, untriaged

Milestone: -

@buyaa-n
Copy link
Contributor

buyaa-n commented Feb 27, 2023

This is regression introduced by https://github.com/dotnet/runtime/pull/62095/files#diff-e09e7f6880244829d1c3b16e19b451ab04d059a7df0d8a367cd3fd08230c9096R126

Right, this is duplicate of #80387. The fix is easy, just not decided yet if we should keep the ALC name (by replacing the special characters or just using same name for each ALC). Anyway, we will fix this soon and port into 7.0 , closing this issue as duplicate.

@buyaa-n buyaa-n closed this as completed Feb 27, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants