Skip to content

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

Closed

Description

@1KByington

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

Activity

  1. miloush commented on Feb 22, 2023

    @miloush
    Contributor

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

  2. 1KByington commented on Feb 22, 2023

    @1KByington
    Author
  3. 1KByington commented on Feb 22, 2023

    @1KByington
    Author

    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.

  4. miloush commented on Feb 22, 2023

    @miloush
    Contributor

    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.

  5. 1KByington commented on Feb 22, 2023

    @1KByington
    Author

    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.

  6. transferred this issue fromdotnet/wpfon Feb 23, 2023
  7. transferred this issue fromdotnet/winformson Feb 24, 2023
  8. ghost added
    untriaged
    on Feb 24, 2023
  9. jkotas commented on Feb 24, 2023

    @jkotas
    Member
  10. jkotas commented on Feb 24, 2023

    @jkotas
    Member
  11. buyaa-n commented on Feb 27, 2023

    @buyaa-n
    Contributor

    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.

  12. ghost removed
    untriaged
    on Feb 27, 2023
  13. ghost locked as resolved and limited conversation to collaborators on Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions