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

Can you please remove dependency from System.Web.dll #903

Open
23W opened this issue Apr 28, 2023 · 2 comments
Open

Can you please remove dependency from System.Web.dll #903

23W opened this issue Apr 28, 2023 · 2 comments

Comments

@23W
Copy link

23W commented Apr 28, 2023

Is your feature request related to a problem? Please describe.

Redundant resources consuming. Dependency from whole .Net Framework (System.Web is not part of the .NET Framework Client Profile).

Describe the solution you'd like

Box.V2 .Net Framework. version has dependency from System.Web.dll that was designed to be used in ASP.NET MVC or ASP.NET Web application, i.e. for backend side not for clients. This is a big and heavy dependency that consumes process memory.

For client side applications Microsoft recommends to use other classes and methods than those in System.Web.dll assembly.
For example: for HttpUtility methods they recomend to use WebUtility equivalents

To encode or decode values outside of a web application, use the [WebUtility](https://learn.microsoft.com/en-us/dotnet/api/system.net.webutility?view=net-8.0) class.

Describe alternatives you've considered

In most cases app has dependency from System.Web because of utility class HttpUtility . But in most cases it can be replaces by alternatives from System.Net namespace:

  • HttpUtility.HtmlDecode -> WebUtility.HtmlDecode
  • HttpUtility.HtmlEncode -> WebUtility.HtmlEncode
  • HttpUtility.UrlDecode -> WebUtility.UlrDecode
  • HttpUtility.UrlEncode -> WebUtility.UrlEncode
  • HttpUtility.ParseQueryString -> Uri extension Uri.ParseQueryString from small nuget package Microsoft.AspNet.WebApi.Client

Additional context

@23W
Copy link
Author

23W commented May 17, 2023

Any plans on this issue?

@mwwoda
Copy link
Contributor

mwwoda commented May 22, 2023

Hi @23W

Sorry for the late reply. I see that the SDK uses System.Web.dll in the .NET Framework part to get the correct MIME types for avatar related requests. I am not aware of any lightweight Microsoft replacement library for this functionality. It seems to me that there are two paths we can take

How important is it to your project?

I have created a ticket to track this is issue internally (SDK-3142), but I can't give any timeframe at the moment when this change will be implemented. PRs are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants