I recently deployed a web app to test out Azure as a hosting platform.
The configuration is php 8 with local git. I was able to connect through git and deploy a website. When I try to navigate to the site I get a 404 error. I did some digging and if I use: myapp.azurewebsites.net/.auth/login/aad/callback it will redirect a couple times and take me to a landing page and then from there on I can navigate to my website... at least until the session ends and then I'm back to 404 errors.
This is a free azure deployment there is no special configuration or setup... I'm really just testing out azure as a hosting platform and wondering how to solve this issue.
The site is also configured such that only members of the tenant can access the site, which is by design, and I can authenticate and access the site but only after using myapp.azurewebsites.net/.auth/login/aad/callback
I would have expected.. so long as I have logged in and have an open session / cookie then I can freely navigate the page without first needing to use the callback
I suspect some sort of authentication or redirect issue but I've also followed the instructions in:
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad
The app registration from step 1 was already done as part of the deployment of the site. Kind of odd that after I use the callback URL I'm able to access the site as normal for a while.
Suggestions?
Thanks!
Related
As you can probably tell, I am new to Magento2 and I am trying to figure out some of the basics. I'm a full-stack developer that is use to developing (frontend and backend) myself then using docker and finally hosting it on an AWS:S3/EC2 or AWS: Elastic Beanstalk. With that said, Magento seems like a completely different beast to conquer.
I have a family member who is wanting me to do some basic frontend stuff for their website (such as changing Navbar design and a potential home page overhaul later on), naturally wanting to help them out I agreed to have a look and see what I can do. I have access to their Magento 2 dashboard area and have been looking around with no sure luck thus far. I have researched online that Magento 2 allows for a "Page Builder" or a "WYSIWYG" type functionality. But I am unable to use these types of tools because my family member had the website built by a Magento 2 developer firm awhile back and everything is coded manually and could cause problems if using one of the above mentioned tools. Due to this I am trying to get access to their site directory so that I can go in and make the necessary changes and upload the files. But I am really struggling on how to access the codebase.
I have read that an admin needs to send me the code??? Or grant me access to the code or something along those lines? I do have the host, port, root, username, password, etc. for the live server but still having trouble.
Any help would be greatly appreciated.
You need to use ssh to access the server
ssh user#host -p port
After you get into the server, you should set up a git repository in the project root and push the code from the server to the repository, then clone the repo to your local environment.
From there on, it's the normal development flow. You can use a clean database with sample data or you can dump the db from the live env and use it on your local env, but this will require some changes in the db after the import.
Detailing all the steps required to do this task would take forever and would cover a lot of different issues/steps.
"I have read that an admin needs to send me the code???"
Not sure what you mean by this, but a Magento admin is just a user on the backend side of the website. He does not have access to any code.
A git repository admin(probably previous dev) could grant you access to the code repository, but this doesn't seem like an option.
I have just migrated a Drupal 8 site to AWS EC2 instance. Everything seems to be working except for one thing - when I log in, I get Access Denied message.
It appears that the website validates the user admin credentials and redirects to the correct page at user/1 but the authentication cookie/session are not handled properly.
I have found this ticket but am not sure how much it pertains to my situation since I am not using (as far as I know) the Cloudfront.
Password access not working with AWS Cloudfront website using Drupal
Any help or advice on this is appreciated.
As per the title - I'm trying to trigger an Azure Website "triggered" WebJob from our custom PHP deployment application hosted external to Azure websites.
Thanks to what I believe is Active Directory, I'm able to navigate the /api URLs in my browser and get a JSON output without having to reauthenticate. For example, /api/triggeredwebjobs outputs the triggered WebJob information (that I've set up inside Azure Portal) in my browser.
I've gotten as far in my PHP app as sending a POST request and it is successfully authenticating using basic auth, but every single /api URL that I set in my PHP app returns:
"No route registered for '/api/triggeredwebjobs/{webjobname}'"
where {webjobname} is my custom name for the web job, hidden for privacy of the client. Every URL returns this, but if I navigate in my browser, I only get that error if I navigate to a URL that doesn't exist, such as /api/blahblahblah.
I've set up a deployment user which is what it's using to authenticate... I've even logged in to https://{azuresite}.scm.azurewebsites.net/basicauth using the deployment user and successfully gotten output from each /api page in my browser.
If it helps, I'm using Httpful.phar to handle the HTTP requests.
Thank you very much for taking the time to read and possibly assist.
A colleague helped me get to the bottom of this - the documentation was out of date. I have opened an issue on the Kudu Github Repo to get them to review this:
https://github.com/projectkudu/kudu/issues/1466
To solve the issue for future readers of this question, the correct URL to use within the requester app is:
https://{yoursite}.scm.azurewebsites.net/jobs/triggered/{jobname}/run
Good luck!
I am starting my first Facebook app, hosted on Heroku. I have set up an app on Heroku for production and a separate app running locally on my own machine for development. Currently, the app (which has very little functionality) runs on localhost just fine. But I don't understand if the app should be able to run like a typical canvas app on the localhost with Facebook functionality. For example, will the Requests Dialog run in a canvas app locally. Should I be able to use that functionality locally as I develop? If so, what steps do I need to take to get that working?
The differences
The only real difference between a standalone site and a canvas app (or page tab) you'll see is that you won't have a signed_request passed in when you load your page.
App dialog will still work, but in popup instead of directly on the page. Plus, you'll be able to login user like you would if you set your local dev URL (eg http://localhost:5000) in the Facebook app settings under "Website with Facebook Login" (or mobile web).
There's also some stuff you won't be able to test on the server like realtime update where facebook send a request to your site to notify an update.
There may be some other things, but this is what I can think about right now.
Working locally
So, what I usually do, is develop it locally. To manage the missing signed_request, I only provide a stub one or I just don't count on it being present so my app can run out of facebook too.
For login methods, I tend to rely only on the JS SDK as most of server side login through a canvas app will rely on the signed_request - and enaway, I found the UX login better via the JS SDK.
Then, I only setup two FB app, one staging and one for release. The staging app point to my locals urls so my Facebook will allow connection from it.
At this point, it should mostly work fine out of the box!
But I don't understand if the app should be able to run like a typical canvas app on the localhost with Facebook functionality
Your app should behave the same way whether it is on localhost or on the final production server.
Facebook dialogs (requests, messages..) should display on your local (dev) machine as they do on the live server. In my case to make this work I setup a secondary "facebook app" with different values for App Domains, Site URL and Canvas URL.
This allows you to run your app from localhost. If you app is canvas-only it will run inside an iframe (which points to Site URL) but will be displayed within Facebook.
Also, make sure you're including Facebook's JS API if you want to see any of the Facebook modal boxes rather than pop-up windows.
The only difference you should notice is that if you share a page from your localhost dev site via the FB API, Facebook won't be able to crawl your site and get any icon, image or description should it need to.
I'm working with a client's proprietary ASP.NET app, to which we added a PHP wiki to a subdirectory on the same server. The PHP app authenticates against the cookies that the .NET app uses. This all works fine.
When you login to the .NET app and then visit the PHP app (Dokuwiki), and then visit any page on the .NET app, it reports that the session is expired and asks you to log back in.
Both apps generate cookies, but none of them conflict in name. I stripped out the code in the PHP app that authenticates against the cookie to make sure I wasn't causing the issue with the PHP authentication, but the issue persisted.
With the exception of some front-end things, I have no control over the ASP.NET backend, but I did create a stray .ASPX page in one folder which successfully forces authentication if a user visits it. I created this page in a plaintext editor, not in Visual Studio, so it didn't generate any code behind files. If you visit this page after visiting the PHP app, it does not report the session as having been expired.
My question is that I'm trying to track down what is causing this behavior, first, and then looking at options for correcting it. I'm sorry for the dearth of more technical detail -- as mentioned, I only have limited access to the client's app. Any help would be very appreciated, and if any more information is needed to help troubleshoot, I'll gladly provide what I can.
I've had similar problems with classic ASP sites running on the same server as ASP.NET sites.
I'm usually able to fix the problem by creating 2 application pools under IIS: one for the ASP sites and one for the ASP.NET sites.
Do you have access to the server's IIS manager, or can you contact someone who does? If so, create 2 separate app pools: one for PHP sites and one for ASP.NET sites. Then move each site into the appropriate app pool. Restart IIS if you can, and then see if anything's changed.
Hope this helps!
I called in the original developer to troubleshoot this. He solved it by switching from SQL Server based session state to "In Process." That seems to have taken care of it.