Webclient Error

Hi Team,

what does this error mean and how we can fix it.

Kindly note:

Taken from:

So, when starting new use directly the HTTPClient for it

i am getting as below

should i select HTTPClientFactory for it, or should i add any components for HTTPClient method to appear.

was not mentioned by us as we mentioned HttpClient

Let us know if your project is set to Windows - Legacy

@devasaiprasad_K

try the full namespace then you can find

System.Net.Http.HttpClient or System.Net.Webclient

cheers

1 Like

i tried typing the namespaces but its not appearing…

image

image

that’s why we asked

using legacy we would have to reference a package

Working within Windows Compatibility it should be available

Hi @ppr the current studio version i am using is 2023.12.0 and i am sure there is no option for windows-Legacy in the version.

@devasaiprasad_K

directly type it in your assign or wherever you are using

cheers

can you give me syntax of directly writing in the code.

@devasaiprasad_K

New System.Net.Http.HttpClient

cheers

we had only asked, what is used at your end.

so import the namespace:
grafik

Try again to create a variable of type:
grafik

As a last resort:

  • close all XAMLS
  • take a backup from the XAML
  • open it within a text editor (e.g. notepad++)
  • Add manually the Assembly reference
    grafik
 <AssemblyReference>System.Net.Http</AssemblyReference>
  • Save an close (notepad++)
  • click refresh
    grafik
  • open XAML and try again

i have followed the steps and some how i did not face any error while compiling but something like Invoke Method: Value cannot be null. (Parameter ‘TargetObject’)

what is still missing

@devasaiprasad_K

Target object is not intialized

cheers

1 Like

Hii @ppr

i tried using HTTPClient but getting error ex: DownloadFile property

Available methods from HTTPClient Class can be checked here:

as most of the methods do have a return it can also be used within an Assign Activity

Also we would like to mention

1 Like

Thank you anil so much for clear Guidance

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.