I'm attempting to get Recaptcha for .NET working with ASP.NET MVC 4.0 on an https site that is using SSL. I've been reading up on it and the problem seems prolific, but I'm having a hard time finding a solution.
I've seen this related topic here Stackoverflow Question and it did not solve the problem. I am following the documentation here : RecaptchaNET Documentation
I have made an ad-hoc solution work by running the page in non HTTPS and just copying and pasting the raw HTML code, and changing the various URLS. But I'd like to make this work with the actual HTML helper. Can anyone help? Has this changed since that original topic?
There are a few posts about this out there for the change google made to the api. Basically, RecaptchaNET wasn't supporting google's latest api endpoints for this.
If you check your version, this is fixed in version 1.3.
Try downloading the latest version from CodePlex and using that dll.
or the nuget here.
Related
As part of an evaluation process for a commercial project I'm searching for any full fledged example of authentication/authorization using the websharper stack. I'd like to use OWIN, since it seems to be a well designed protocol, but I'm open to alternatives.
Some requirements:
use Mono
use the Suave server.
For now, we have been trying to adapt this tutorial for the websharper toolchain: https://www.codeproject.com/tips/849113/four-easy-steps-to-set-up-owin-for-form-authentica
This is what we currently have: https://github.com/Denommus/cookies-problem/blob/master/Main.fs
I would also like to mention that the default method ctx.UserSession.LoginUser has this issue: https://github.com/intellifactory/websharper/issues/647
But the cookies file is not being generated for some reason, probably because we're missing something obvious. Anyone able to help?
EDIT
I think I figured out the reason why the cookies file is not being generated: the Suave server doesn't actually run OwinStartup, so I need to figure out another way to configure the IAppBuilder of my application. But I still don't know how to do it, so if anyone can help I'll appreciate.
EDIT 2
I think I fixed the configuration of OWIN in my application, but I still don't have cookies being generated.
I have a web application which uses twitter api. It was working fine.But suddenly it stopped work. I started googling & came to know about that twitter upgraded their api. So I need to use the library which supports v1.1
Have anybody worked with v1.1 library please help me
Thanks in advance.
Take a look at this project on GitHub. Don't be confused by the title - it has been updated since Twitter's API update to 1.1.
The jQuery plugin on the page has been re-purposed to be a Rendering engine, i.e. it helps with rendering your feeds.
The important part, however is in the "Server-Side Examples and Setup" directory. Go there, read and follow the directions in the SETUP_INSTRUCTIONS document. When you are done, if you are using PHP, use the file in the "Plug_And_Play" directory as a start point. If you are using C#, you can use this library. It is still under development, but it is updated regularly and mimics the Twitter API's specifications as closely as possible.
P.S. I am the author of both of those projects, so if you need any help, let me know. Good luck! :)
In my ASP.NET MVC 4 project, I am using the Microsoft.Web.Helpers (from the NuGet package) and my code is a very basic implementation of ReCaptcha. In my view I have:
#ReCaptcha.GetHtml(theme: "clean")
In my controller I have:
Microsoft.Web.Helpers.ReCaptcha.Validate();
The complexity comes with the SSL implementation we are using.
I have added the appropriate settings to my web.config:
<system.net>
<defaultProxy>
<proxy proxyaddress="http://***proxy script settings**"
autoDetect="False"
usesystemdefault="False"
bypassonlocal="True" />
</defaultProxy>
</system.net>
There seems like there is nothing further I can do in terms of config, but I am getting the error message
The remote server returned an error: (404) Not Found
when I hit the recaptcha validate method on the form post method in my controller.
Ive found a number of other answers on here but they all seem to suggest that you change the url, or upgrade. As Im using a NuGet package I would have thought I was using the latest version. Any ideas or links with more information greatly appreciated. Ive already done quite a bit of looking both on this site and google
edit:
I have found that earlier versions of firefox have trouble actually rendering the recapture box given our network conditions, but the latest one is fine. As the validation is done on the controller though, I suppose there is no issue here.
After much pulling of hair and general confusion, I discovered that the problem was that the POST (but not the GET) to the google API was being blocked by our corporate firewall. I had previously discounted this, because I could navigate to the service that recaptcha uses (http://www.google.com/recaptcha/api/verify).
I found this by constructing an HTML page of the requisite parts for the post and submitting it in a browser. The corporate "This page is blocked" appeared - however in code the error that is returned is a 404. The error is somewhat misleading, but this is bizarre behavior from our infrastructure department.
I was using a wordpress plugin "Twitter for Wordpress" located in wordpress plugins directory then it seems to suddenly stopped fetching my tweets showing "No public Twitter messages".
I went to the plugin url and find that the demo showing the same error message and I tried to contact the developer for code update as this plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress with no success.
As being not familiar with PHP I am asking anyone who may assist me with code modifying so that the plugin could back to work.
First of all, can you look at plugin configurations or inside PHP code for Twitter resource URLs? Since Twitter has dropped version "0", legacy code is probably the issue.
See https://dev.twitter.com/docs/api/1.1
Else, you should look at another plugin solution. Twitter is always improving, you need a plugin that follows updates
I'm working on a Grails 2.0 app, deploying it on Heroku, with a launchpage on kickofflabs and a DNS on CloudFlare. I'm looking for a simple way to password-protect my app in private beta and give access to it only to a few selected people, all that without adding any code to my app.
Back when I used Cloudbees, it had a nice private mode to do just that. But I couldn't find any equivalent in Heroku, either natively or using an add-on. I also had a look at CloudFlare apps but no success there either.
Does anyone know any simple way to do that? It seems generic enough to me.
There's the Invitation Only plugin
Never used it myself though...
And not sure if it needs updating for 2.0 :-/
And I guess this needs some coding... So this answer basically doesn't answer your question... Sorry about that...
Can you not front it with Apache and use mod_jk to connect to your Tomcat with the Grails application. This way you can have .htaccess do the access control?