Posts tagged with c#

I have added the NuGet Google.AdWords 24.10.1 package to a .net core console app. In the SDK documentation they say that .net core is supported. The problem is that the library functions crash on first call with tho following error:

Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.":"System.Web.Hosting.HostingEnvironment"}

I cant understand if this package is supported or not in the core app?

This line causes a crash: AdWordsUser user = new AdWordsUser();

I want to develop a webhook for adding leads automatically from google lead form into CRM. Google can call a webhook url to submit such leads.

Refer to the link: https://developers.google.com/google-ads/webhook/docs/overview

This link at microsoft : https://learn.microsoft.com/en-us/aspnet/webhooks/ have mentioned several nuget packages to build webhook receiver but none for google lead form.

Can any one help me to identify how can I build such webhook that can be called through google to add lead automatically into CRM.

TIA.

As I need to send message on user's whatsapp number so I have downloaded WhatsApp API from nuget packages. and also I implemented code according to that. But after so many search I found that I need to register mobile number to get password...using WART but I think this application is not working and not able to get password from WhatsApp.

So if anyone implement this feature of sending message on whatsapp number in Asp.net c# then please update me how to do this using WhatsApp Api.. even I don't know whatsapp is provide any API or not.

I have tried with below code...but I need password before that..

            string fromMob = "919xxxxxxxxx";             string toMob = txtMobileNo.Text.Trim();             string msg = "This is first WhatsApp Message Whatsapp API";             WhatsApp wa = new WhatsApp(fromMob, "RequiredPassword", "SD", false, false);             try             {                 wa.OnConnectSuccess += () =>                 {                     wa.OnLoginSuccess += (phoneNumber, data) =>                     {                         wa.SendMessage(toMob, msg);                     };                     wa.OnLoginFailed += (data) =>                         {                             msg = "Login Failed" + data;                         };                 };                 wa.OnConnectFailed += (ex) =>                     {                         msg = "Connection Failed" + ex;                     };                 wa.Connect();             }             catch { }