using azure function in visual studio

2 Answers 409 Views
Fiddler Classic
Diana
Top achievements
Rank 1
Diana asked on 26 Apr 2023, 08:21 PM | edited on 02 Aug 2024, 04:51 PM

If I have the fiddler classic running and i try to debug my azure function .net 7  I get an error in the attachment.  I'm not using grpc in my function it literally is an endpoint that calls another Rest endpoint.  Is there any way that I can have fiddler running and a azure function in debug running at the same time

 

 

Okay.  I finally got a  fiddler everywhere license.   Now, I need help in getting this tool to work with visual studio 2022 and running an azure function locally from my machine.  When I start the fiddler everywhere, i see the traffic coming through including Http/2 traffic.  When I go run the visual studio 2022 and start my azure function I get this message:  Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.    Is there something I have to change in vs 2022 ?  As soon as I turn off fiddler everywhere the function works fine?

2 Answers, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 27 Apr 2023, 06:22 AM

Hello Diana,

 

Fiddler Classic works as a local forward proxy and does not change the type of client requests. The proxy stands in the middle and establishes a connection with the client application (in your case, with the NET 7 app) and then establishes a connection with the server. It is important to note that Fiddler Classic does not support HTTP/2, and as gRPC utilizes HTTP/2, it also does not support gRPC. Fiddler cannot change the used protocol to gRPC or create its own gRPC call.

That said, and based on the screenshot error, it looks like some part of the client NET7 application relies on gRPC and tries to make a gRPC call. This leads to the error because the Fiddler Classic proxy does not support HTTP/2 and gRPC. You should be able to trace where the gRPC is being used by following where the NET application uses the Grpc.Core NuGet library (which is the library that produces the error).


As a side note, the latest version of Fiddler Everywhere (a different product from Fiddler Classic) now supports gRPC and HTTP/2. If applicable, you could test your application using Fiddler Everywhere as a local proxy. More about the support of gRPC in Fiddler Everywhere in the following blog post: https://www.telerik.com/blogs/introduction-grpc-fiddler-everywhere 

 

Regards,
Nick Iliev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Nick Iliev
Telerik team
answered on 05 Aug 2024, 07:25 AM

Hello Diana,

 

While its hard to pinpoint what exactly went wrong on your side, you could try the following:

- Turn on the "ignore server certificate errors" option in Fiddler Everywhere

- Within the .NET gRPC relateds-code try to change the default HTTP handler when creating a gRPC channel. For example, if your application is using a code similar to this one

// the line
GrpcChannel.ForAddress("https://localhost:5001");
// should become
GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions
{     
    HttpHandler = new HttpClientHandler()     
    {
        Proxy = new WebProxy("localhost", 8866)
    }
});
- Try excluding the localhost traffic from being decrypted (this is an unverified approach, as suggested in this thread)

 

Regards,
Nick Iliev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Fiddler Classic
Asked by
Diana
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or