Sample C# Web application to connect

Hi , I have downloaded the sample C# console application and I am able to login and create a jobsite .
When I try to to use the same code with same assembly references included in web application project . I am getting Could not load type ‘System.Web.HttpContext’ from assembly ‘System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.’ error. can some one provide help what piece am I missing here .

Thanks

HI Raon. It looks like you’re missing an assembly reference in your new project that you’ve created. You’ll need to add that reference.

Thank you for your quick response on this.

I have tested by adding reference to the System.Web.dll assembly and import the System.Web namespace in the class file.
I am still getting the same error.
Thanks

Hi raon. I’d do a search on stackoverflow. Sorry we’re not much help. This would be related to your project settings, not really anything to do with our libraries.

Thank you again for your reply.

When I compared Console application and Web application . The target frameworks were different .
So my specific question would be " if my web application is using .net core framework as target framework in project settings. do I need different avontus dlls or do you have any documentation or help on this scenario please.

Thank you.

Hi raon. We are currently on .NET 4.7 and I believe your web project will need to target the same. We do have plans to migrate to .NET Standard in the future but it will be a bit of a ways out there.