Code Monkey home page Code Monkey logo

aspnetwebhooks's People

Contributors

alfhv avatar danroth27 avatar dependabot[bot] avatar dougbu avatar eilon avatar garora avatar icnocop avatar javiercn avatar jdmiedema avatar jeffproe avatar jenyayel avatar joeloff avatar juntaoluo avatar leggetter avatar maartenba avatar maitre-matt avatar marusyk avatar michael-baker avatar nockawa avatar pascalberger avatar pdekkers avatar petetheman79 avatar pfrendo avatar pranavkm avatar rick-anderson avatar terrajobst avatar tryolki avatar twsouthwick avatar ups216 avatar wtgodbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnetwebhooks's Issues

Addition of new Storage for the WebHooks

Hi WebHooks,
I am a young professional and recently learned WebHooks and implemented them in some of our projects.
As we use different database storage other than SQL Server so I have built the complete library to handle that storage. That is MongoDB storage. Now I want to help others as well and make that storage a part of this repository for the ASP.NET. How should I proceed? Do I need to get some permission or whatever is the procedure? Kindly let me know.
Again sorry to do this type of comment here but I could not find any other place to contact you. I didn't find any contribution guide. As that page is not found i.e. https://github.com/aspnet/AspNetCore/blob/dev/CONTRIBUTING.md
You can answer me on my email i.e. [email protected]
Thanks!

Change Security Model from ASP.NET

Hi,

I have tested using Microsoft.AspNet.WebHooks.Custom.SqlStorage and can successfully store a registration when using ASP.NET Security. However i would like to implement Webhooks using my own custom security.

How can i override the webhooks/registrations route so that i can authorise and store subscriptions in the sql database?

Call NotifyAsync out of a controller

Can someone let me know if it is possible to call the custom webhook's NotifyAsync outside of a MVC or WebApi controller? I already send webhooks within controllers but now also need to add NotifyAsync to a WCF callback. I cannot see how I can get access to the Web hook manager.

Old version of Windows.AzureStorage used in Custom.AzureStorage

The project uses version 4.3.0 With newer versions of the storage libaray (we use 8.5) there is a binary incompatibility with the TableOperation.Retrieve function used in StorageManager -> ExecuteRetrievalAsync which results in a missing method exception.

AzureWebHookStore.QueryWebHooksAcrossAllUsersAsync downloads entire table into memory

From reading the code it seems this library downloads the entire content of the Azure Table to memory in order to query existing web hooks for ones which match specific actions. Is that correct?

var query = new TableQuery();
var entities = await _manager.ExecuteQueryAsync(table, query);

Has this been tested at scale i.e. is this used by any service with 1000+ active web hooks? As the table content grows, downloading and deserializing the entire table in memory can get pretty slow and eat up a lot of memory. There are also $ costs associated with table operations and network bandwidth at scale. Has that factor been taken into consideration?

Thanks, just trying to understand.

working paypal

hey out there,

this is more of a general question than an issue...

has anyone managed to get this successfully working with paypal and if they have, why did they go with this library rather than using a web api controller?

i've noticed this in the 'about' for the project:

Libraries to create and consume web hooks on ASP.NET 4.x (Due to other priorities this project is currently in maintenance mode only. There are no planned releases at this time. No new features are planned and we are only addressing critical issues as required.)

which would suggest that it is still working and current so i'm keen to use it...

...but the fact i can't get it working has led me to use a web api controller!

if anyone can share any feedback on the above, especially with an example of how they got it working, that would be amazing.

cheers,

jake

Paypal sample returning 400 error...

I tried to run the PayPal sample code by using the nuget library for the PayPal webhooks instead of compiling the entire source. Compilation goes alright but every time I try to run it it is showing 400 error. I am using ngrok and testing with the PayPal simulator.

I tried many things but getting the same error. Github sample code works fine. Here is my code in the dropbox in case anyone wants to try it out.

https://www.dropbox.com/s/n0f6v7ffkym6wow/Webhook.zip?dl=0

Webhook Sender for .NetCore project

Hi,

I have a requirement to create webhooks senders in my project. My project is based on .Net Core 3.1.

I am unable to get any reference for the same for .Net Core Project as all documentation or Packages available are for ASP .NET.

Could anyone please help me out here?

Hardcoded Connection String Name

For: Microsoft.AspNet.WebHooks.Custom.SqlStorage

Is there any reason the connection string name cannot be overridden?

We're (regrettably) in a hosting environment which limits the addition of connection strings. We would like to store this information in the same SQL database as our main application data.

In: Microsoft.AspNet.WebHooks.WebHookStoreContext.cs
internal const string ConnectionStringName = "MS_SqlStoreConnectionString";

Can this be a configurable setting via app setting or otherwise?

If so, I'd be happy to submit a PR for it. Otherwise, we have to grab all this source and copy into our project :(

ASP.NET Web Api with enabled versioning + WebHooks

I would like to use for our project the Microsoft.AspNet.WebHooks.Receivers.Stripe library. However my WebApi is ApiVersion (Microsoft.AspNet.WebApi.Versioning) enabled. That somehow interferes with the WebHooks default Url which is:

https://<host>/api/webhooks/incoming/<receiver>

I am using the sample StripeWebHookHandler from the AspNet samples. I tried putting the ApiVersion on the WebHookHandler like this with no success:

[ApiVersion("1")]
[RoutePrefix("api/v{version:apiVersion}/webhooks/incoming/stripe")]
public class StripeWebHookHandler : WebHookHandler

I am guessing that this must be a common problem however I haven't found any solution to this, is there anyway:

  1. to have the webhook URL versioned using the provided StripeWebHookHandler.

  2. to disable the versioning for this particular URL (also tried the [ApiVersionNeutral] attribute).

Issue with having Webhooks and 2.0 version of DependencyInjection in same project

Reopening the issue: aspnet/WebHooks#229 in this repo.


Hi,

Microsoft.AspNet.WebHooks.Custom.AzureStorage.dll has a dependency on 1.0 version of Microsoft.Extensions.DependencyInjection.dll.

In our application we have a hard dependency on 2.0 version of Microsoft.Extensions.DependencyInjection. Because of this we get the following exception:

System.MissingMethodException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'. at Microsoft.AspNet.WebHooks.DataSecurity.GetDataProtector() at System.Web.Http.HttpConfigurationExtensions.InitializeCustomWebHooksAzureStorage(HttpConfiguration config, Boolean encryptData)

Other frameworks also seem to have similar issues. See dotnet/orleans#3325.
We raised this issue on the DependencyInjection repo first and the suggestion is to recompile WebHooks with 2.0 version of DependencyInjection. See dotnet/aspnetcore#2788.

What is the best way to solve this problem?

Thanks,
Raghavendra

[WebHooks.Receivers.VSTS] WorkItemUpdatedFields is limited to a few predefined system fields

From @NenoLoje on Sunday, June 11, 2017 2:22:10 PM

This issue is for: Microsoft.AspNet.WebHooks.Receivers.VSTS

The WorkItemUpdatedFields class has 9 fields defined.

VSTS offers many more fields (system and custom ones) that could be part of this event as well. This does not seem to be implemented currently.

Questions:

  1. How can I access other custom fields? Any plans to extend this class?
  2. Would you be willing to accept PRs for other built-in system fields (like `System.IterationPath``)?

Thanks,
--Neno

Copied from original issue: aspnet/WebHooks#143

Support Azure Activity Log alerts

From @dougbu on Wednesday, December 13, 2017 4:51:49 PM

The current Azure Alert receivers (ASP.NET and ASP.NET Core) support Azure Metric alerts and (modulo #146) Availability / Web Test alerts. However Activity Log alerts use a completely different JSON schema, one that does not contain the required context:name field.

To support Activity Log alerts, update how the Azure Alert receivers find event names. One option is to search the schema for something like an event name (see https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-activity-log-alerts-webhook and linked details e.g. https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-service-notifications). Another option is to fall the event name back to a constant value or to allow the event name to be null.

Secondarily, should add strong types per Activity Log alert types e.g. one for Administration alerts and another for Service Health alerts.

Copied from original issue: aspnet/WebHooks#203

Build errors with non-English .NET

From @fabiodaniele on Wednesday, August 9, 2017 3:30:42 AM

Hi,
I cloned the repo and tried to build it with the build.cmd script, but it fails due to many errors occurring in many test projects.

Could it depend on the configuration of my development environment?

My machine has Visual Studio 2017 installed.

Copied from original issue: aspnet/WebHooks#150

Cannot set a URI for generic webhooks with a route different than /api/*

I cannot seem to find a way to set a URI like this for generic webhooks with a route that begins with something like /portalapi/v1/*. E.g. something like this:

            config.Routes.MapHttpRoute(
                name: "PortalApi",
                routeTemplate: "portalapi/v1/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

The webhook receiver only seems to respond to posts from URIs in the form api/*:

           config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

Am I missing something? Or is this a bug? Has anyone been able to change the beginning of the route and have it accepted by the webhook call?

Posted this question on stackoverflow as well:
https://stackoverflow.com/questions/69713805/cannot-set-a-uri-for-asp-net-generic-webhooks-with-a-route-different-than-xyz-co

Handlers are resolved from root scope when using Autofac

From @robpex on Monday, September 18, 2017 8:25:29 AM

I believe this is the same question that was brought up in issue #22, but I didn't want to reopen an old issue. In that issue, @cwoolum posted some code they used to work around the issue by resolving things from the AutofacWebRequest lifetime scope, but I had some trouble getting that working in my application. I put some debugging around Autofac resolving components, and I noticed that my WebHookHandler is resolved from the root scope rather than AutofacWebRequest and, according to http://docs.autofac.org/en/latest/lifetime/ ...

It is important to always resolve services from a lifetime scope and not the root container.

As a result, the rest of my dependencies are also resolved from root which isn't desired. This seems like something that should be handled via WebHooks, perhaps in one of the registration extensions? Hacking around to get it working with Autofac seems like more work than just implementing web hooks the traditional way so it's difficult to justify using the project without this fixed.

Copied from original issue: aspnet/WebHooks#157

Microsoft.AspNetCore.WebHooks nuget packages

.Net Target version : dotnet 7

Seems like still all the packages for webbooks are "rc" versions. Just wondering is there any plans to upgrade and have a stable version released.

WebHooks for Office 365

From @rposener on Monday, April 4, 2016 7:37:55 PM

Saw some of this at build, would be nice if we had a package that would work with the Office 365 WebHooks. Once the asp.net core port gets a bit further, I will be glad to work on it and submit a pull (for the .net core), but need to figure out an asp.net core port first.

Copied from original issue: aspnet/WebHooks#51

Is there a roadmap available?

Is there any roadmap available for this project? It seems there haven't been any releases for over a year now... is this still under active development?

Creating an array in CreateWebHookRequest instead of a JSon object

From @divad4686 on Monday, February 13, 2017 7:31:15 AM

I'm building a Webhook provider library, and one of the requirements I have is to change the default Webhook request body. I can do this by overriding the CreateWebHookRequestBody in the WebHookSender class.

The problem is that my request body have to be wrapper in an array ( it is a requirement for Rest Hooks in Zapier) but the functions CreateWebHookRequest, CreateWebHookRequestBody and SignWebHookRequest all work with JObject class, making it impossible to wrap the body in an array.

I fixed this by overriding the 3 functions in my own class, but most of the work was copy-pasting the default implementation, replacing JObject for JContainer and using JArray.FromObject in CreateWebHookRequestBody.

I think I could do a pull request here in the project with this commit so people will have it easy later to use JArray or JObject in their own implementations. This should not have any side effect, since in the end, outside CreateWebHookRequestBody, all it is done with this object is a. .ToString()

The only problem I could see is that it would not compile the project for people that already override CreateWebHookRequestBody

Copied from original issue: aspnet/WebHooks#115

Dependency to Microsoft.Tpl.Dataflow does not allow package manager console to update or reinstall all packages in a solution in one shot.

From @nnoorbakhsh on August 28, 2018 21:22

I believe the dependency to Microsoft.Tpl.Dataflow should be removed, and most probably replaced with System.Threading.Tasks.Dataflow. The mentioned dependency causes package manager console to fail when trying to update or reinstall all Nuget packages in a solution (e.g. using update-package -reinstall), forcing the user to reinstall packages one-by-one, which can be tedious in a very large solution (e.g. with 100+ projects, which is my case). Found the following issue which was opened 1 year ago, but the same problem still persists today: https://github.com/dotnet/corefx/issues/24547 . Thank you in advance.

Copied from original issue: aspnet/WebHooks#323

Update www.oauthforaspnet.com link in InstagramReceiver Readme

As @Eilon noted in PR #8, oauthforaspnet.com is a parked domain. The InstagramReceiver sample's Readme still links there and should not.

From https://web.archive.org/web/20160919024307/http://www.oauthforaspnet.com/providers/instagram/, it seems this page described installing and using the Owin.Security.Providers.Instagram package or Owin.Security.Providers meta-package. Those packages come from https://github.com/TerribleDev/OwinOAuthProviders but that site has no similar documentation.

Could use

  1. https://www.jerriepelser.com/blog/owin-oauth-provider-github/, an even-older blog containing some of the documentation
  2. The above GitHub link
  3. the above https://web.archive.org link
  4. https://github.com/TerribleDev/OwinOAuthProviders/blob/29be30bfd72475cbb135cc007433024e27cc0196/OwinOAuthProvidersDemo/App_Start/Startup.Auth.cs#L58 which shows the one Startup line needed to use the Owin.Security.Providers.Instagram package

Trello Webhooks request can not be verified

I created a project with TrelloReceiver and deployed it on appharbor. In the file I wrote the following:
<add key="MS_WebHookReceiverSecret_Trello" value="My Secret"/>
And when the request comes, in the logs I see the following:

The WebHook signature provided by the 'x-trello-webhook' header field does not match the value expected by the 'TrelloWebHookReceiver' receiver. WebHook request is invalid.

External links in README.md redirect to unexpected pages

Update nuget package

It'd be great if you guys could update the Microsoft.AspNet.WebHooks.Receivers.VSTS package with the latest bits ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.