I tried this example for openid in
http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx
I applied the same code in my newly created project , I get this error when i click the google icon in the logon page. I din change any code from the sample project I downloaded from this website, still I get this error .
This sounds just like an MVC controller problem. your Account controller is expected to have an Authenticate action. And since we're seeing a 404, I suggest you investigate what's wrong with your routes.
Keep in mind that this URL should respond to both GET and POST requests.
Related
After extracting my database layers into different projects, each time I run my app, enter my credentials and press login, it will redirect me to Index.cshtml but I still get the "Login" and "Register" actions rendered at the top bar. After scaffolding and debugging Login.cshtml, I can see that the login is successful:
However, after redirecting to LoginPartial.cshtml, I can see that I am, in fact, not logged in:
Here is my project structure:
I am registering identity like so:
So I am guessing that the identity context that I see in Login.cshtml is somehow different from the one in LoginPartial.cshtml, but I am not sure. Has anybody any idea what might be going on here?
Ok I know now what was going on. I have not yet committed the changes where I extracted everything into it's own project and I compared the current solution with the one I had before the changes. I noticed that before I did the changes, the WebSite project was configured to use SSL. Somehow, that got disabled and the login failed for this reason. I don't know why there were no error messages, but in my case, I needed to check the "Use SSL" setting in the project settings of my WebSite project.
Now I am logged in and everything works as expected.
I am trying to set up a company website to use an adfs log in system, using the instructions found on https://www.linkedin.com/pulse/how-implement-sso-aspnet-mvc-application-adfs-tuomas-kesti, but my site does not redirect to the adfs page, and instead loads the home page of the site as if nothing happened. Looking at the network page in inspect element shows that the site never calls or redirects to the adfs page.
In my web.config file, the realm and reply values are set up to the main site, with the issuer value being the adfs site and follows the same format of "https://sts.domain.com/adfs/ls/". The adfs site is up and running with and the thumbprint from its certificate is added in the tag. passiveRedirectEnabled is set to true in the tag.
Im not sure what the problem is, and looking it up online doesn't find me any results. If anyone has an idea on why my site isn't autocratically redirecting, that would be appreciated.
Yes, it seems that the code in your tutorial doesn't redirect automatically when no JWT is available. I.e. the last code sample should contain an 'else' that responds with a redirect to the ADFS login page.
Have a look at these samples for Azure AD:
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-code-samples
I found them very helpful and they can (mostly) be used with a standalone ADFS as well. Most of all, they cover all sorts of solution architectures and framework versions.
I have gone through the same question links on the site and still I am unable to get answer for this question. I have registered an API, checked URL for site. Its exact location of file which I am executing. The OAuth is performed and I also get login screen. But when I try logging the error appears. I am still trying to understand what is going wrong.
I am currently having a strange issue that has taken me by surprise, I have not had the issue before and I have no idea why I am getting it now.
I have an asp.net mvc 3 website which has a number of controllers all with actions. It is important to note that this issue is only present with one controller and the problem is with all Actions.
The error I am getting is "HTTP Error 503. The service is unavailable."
However, this error only occurs if I browse to the page using the domain name, for example...
subdomain.example.com/controller
but everything works fine if I browse with the ip address and port number...
xxx.xxx.xxx.xxx:xxxxx/controller
remember all other controllers work fine regardless of the method used to browse.
I have tried looking for answers to this and trying to find any useful logging information but have found nothing of use. Hopefully somebody here will have seen this issue before
Ok I have created a sample mvc project with a Reports controller that works so I don't believe it is a problem with MVC.
I'd reccomend looking at your routes and your web.config and make sure you don't have anything intercepting it there into an httphandler or module. Then I'd look at the IIS instance and check for virtual directories. You pretty much are trying to figure out where exactly it is failing - is it even reaching ASP.Net?
One last option to look into is your company proxy - does going to the URL directly go through the proxy? I know at my company this can happen - so there may be a rule there that is intercepting it.
I am trying to get my first hello world application on facebook using asp.net with facebook toolkit.
I am hosting my files on www.aspspider.info/jasminm89/ using it as a canvasurl
and link to my facebook app is http://apps.facebook.com/mytesterapp/
At that location i have: default.html page with the h1 tag with plain text.
When I visit my app on facbook I get message:
The page cannot be displayed
The page you are looking for cannot be displayed because an invalid
method (HTTP verb) was used to attempt access. Please try the
following:
Contact the Web site administrator if you believe that this request
should be allowed. Make sure that the Web site address displayed in
the address bar of your browser is spelled and formatted correctly.
HTTP Error 405 - The HTTP verb used to access this page is not
allowed. Internet Information Services (IIS)
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search
for the words HTTP and 405. Open IIS Help, which is accessible in IIS
Manager (inetmgr), and search for topics titled Setting Application
Mappings, Securing Your Site with Web Site Permissions, and About
Custom Error Messages.
here source code from facebook, where it loads my page:
<form action="http://aspspider.info/jasminm89/"
method="post" target="iframe_canvas"
id="canvas_iframe_post_4e513da6b75410144827584"
onsubmit="return Event.__inlineSubmit(this,event)"><input
type="hidden" autocomplete="off" name="signed_request"
value="xxx....."></form>
One point here.
I setup my account on 000webhost.com and by default there is default.php created,
I copy the link to my facebook and it loads the page, it worked as well with plain index.html.
final
This error is because with IIS we can't use static html pages to be called in this way
I now upload plain .aspx page with some text and it worked.
First this sounds like an error with your server configuration, not with accessing the Facebook API/SDK.
Secondly, don't you need to add the call to the facebook SDK and include the <div id="fb-root"></div> ?
Or are you using the C# Facebook SDK?
I iis you can not handle post method coming from facebook including signed_request.
So firstly reconfigure IIS allowing handle post method. Or for simple start make index.html as the default document, put inside "hello world", then process the second step.