You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Executing a SOAP rating service request in a .NET 7 COM-enabled assembly fails with 'The given assembly name was invalid' #82640
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
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.
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.
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.
Activity
miloush commentedon Feb 22, 2023
Can the repro project by included here? Is this a WPF issue rather than .NET?
1KByington commentedon Feb 22, 2023
SOAPServiceExample.zip
1KByington commentedon Feb 22, 2023
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 commentedon 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 commentedon Feb 22, 2023
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.
jkotas commentedon 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 commentedon Feb 24, 2023
cc @buyaa-n @vitek-karas @teo-tsirpanis
buyaa-n commentedon Feb 27, 2023
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.