Skip to content

Conversation

@ShreyasJejurkar
Copy link
Contributor

Fixes #4773

Base automatically changed from master to main January 22, 2021 01:33
@BrennanConroy BrennanConroy added the community-contribution Indicates that the PR has been added by a community member label Jan 22, 2021
@halter73
Copy link
Member

@MCCshreyas do you think you'll have time to come back to this? If not, no worries.

@ShreyasJejurkar
Copy link
Contributor Author

Hi @halter73, Sorry for the delay!
I will get this done and checked this weekend!

Thanks!

@ShreyasJejurkar
Copy link
Contributor Author

@davidfowl Can you please tell me the command via which the resource method gets autogenerated with parameter? I have updated the resource string with the parameter, now I need to generate its corresponding method!

Thanks!

@davidfowl
Copy link
Member

@davidfowl Can you please tell me the command via which the resource method gets autogenerated with parameter? I have updated the resource string with the parameter, now I need to generate its corresponding method!

@dougbu can you help out here? Is there a doc on how you generate resx? I recall it was build.cmd resx but I don't think there's a build in this solution folder anymore

@dougbu
Copy link
Contributor

dougbu commented Mar 28, 2021

Is there a doc on how you generate resx?

See https://github.com/dotnet/aspnetcore/blob/main/docs/BuildFromSource.md#resx-files

Note the generated files aren't usually checked in and the resources are compiled during builds.

@davidfowl
Copy link
Member

@MCCshreyas are you going to finish this?

@davidfowl
Copy link
Member

@MCCshreyas are you going to finish this change?

@ShreyasJejurkar
Copy link
Contributor Author

Yeah, this weekend.

@ShreyasJejurkar
Copy link
Contributor Author

@dougbu Not sure why I am getting this error. Am running this command from the same folder where the csproj is

image

@davidfowl
Copy link
Member

Your command looks wrong. Do this:

dotnet msbuild /t:Resgen

You have typo: t:/Resgen instead of /t:Resgen, you also don't need to specify the project file, that folder only has one.

@ShreyasJejurkar
Copy link
Contributor Author

Thanks, @davidfowl, It worked. Seems like a typo in docs! Lol. I will get that fixed that as well!

…method.

2. Changed the callsite, so that we can pass maxRequestBodySize to exception method.
@davidfowl
Copy link
Member

##[error]src/Servers/Kestrel/Core/src/Internal/Http/MessageBody.cs(179,98): error CA1305: (NETCORE_ENGINEERING_TELEMETRY=Build) The behavior of 'long.ToString()' could vary based on the current user's locale settings. Replace this call in 'MessageBody.AddAndCheckObservedBytes(long)' with a call to 'long.ToString(IFormatProvider)'.

@ShreyasJejurkar
Copy link
Contributor Author

ShreyasJejurkar commented Apr 10, 2021

@davidfowl, I was looking for example, on how people have passed string argument to this one, but they were having an argument in string type already, but in my case, MaxBodyRequestSize is in long?, so anyhow I need to convert that before passing!

So to pass the instance of IFormatProvider should I take a constructor dependency for this or the method dependency? Any example for me to refer to in the existing codebase! Or it is ok to pass CultureInfo.InvariantCulture?

Thanks!

@davidfowl
Copy link
Member

InvariantCulture is what you want

Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@halter73
Copy link
Member

@MCCshreyas I also saw your reddit post about minimal hosting. Thanks for putting the word out!

@ShreyasJejurkar
Copy link
Contributor Author

No worries, @halter73. Just putting some initial awareness about new features! 😅😅
Atleast I can do that! 😇😇

@halter73 halter73 merged commit 1006e04 into dotnet:main Apr 22, 2021
@ghost ghost added this to the 6.0-preview5 milestone Apr 22, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kestrel error messages should include body size information with "Request body too large" exception

6 participants