Favicon not working on my login page - asp.net

I have a favicon on my website. It does not show up when i go to my login page, but works perfectly after logging in. I am using forms authentication on my website.

If the favicon is in your root directory, most browsers should display it automatically.
I visited the page and did not receive a favicon (as you suggested) but checked the source and noticed you do not link to the favicon explicitly. Try to add a line similar to the following in your own <head> section:
<link href='corbyhaas/favicon.ico' type='image/png' rel='icon' />
For more information, check out w3's How To Favicon.
Edit: This is the source I see for the head tag in your login page.
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="Styles/masterstyle.css" />
<title>OnCall APP_ADMIN</title>
</head>
Obviously you're including the necessary information in the rest of your application; just do the same thing in whatever builds the <head> tag on the login page.

Related

Redirect request to persist POST method? (cXML)

I have integration that uses cXML standard, where customer connects from his own system, to our system, to buy goods and then to be redirected back to his own system, with all those goods created in his system.
We already implemented this to work between Odoo and Ariba/SAP, but its not working properly with Dynamics 365. Problem happens on final step, when user needs to be redirected back to his system to end his purchase.
Every time it is redirected, it looks like it converts POST request to get and then gives this as a result:
From requests, it looks like it starts fine with a POST (and 308 redirect to persist that), but then it becomes GET.
So I am not sure if its Dynamics 365 doing that or maybe I am missing something to make it work properly? It also loooks like it triggers login to Dynamics (even though that user is already logged in).
I tried various ways to finish this step, but in all cases it ends up the same:
I tried simple submit with HTML/JS to see if maybe my implementation is doing something wrong:
<form id="cxml_form" method="POST" action="https://some-subdomain.dynamics.com/punchout/cxml/COOKIE" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="cXML-urlencoded" value='payloadPlaceholder'>
</form>
<script type="text/javascript">document.getElementById('cxml_form').submit()</script>
Basically same thing.
Also tried to do it with flask:
#app.route('/cxml', methods=['POST'])
def send_cxml():
return redirect(
"https://some-subdomain.dynamics.com/punchout/cxml/COOKIE",
308,
)
There is also this site to test CXML: https://punchoutcommerce.com/tools/cxml-order-tester
So using that, it receives response something like this:
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html dir="ltr" class="" lang="en">
<head>
<title>Sign in to your account</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<link rel="preconnect" href="https://aadcdn.msauth.net" crossorigin>
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//aadcdn.msauth.net">
<link rel="dns-prefetch" href="//aadcdn.msftauth.net">
...
...
It looks like it just tries to redirect to login page (even though I am logged in to dynamics)?

Check dynamic web page is modified

I want to check if page https://m.nn.ru/f/1238 has been updated periodically.
I ran
curl https://m.nn.ru/f/1238 | head -c 4096
And it's output is below:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="1;url=https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238" />
<title>Redirecting to https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238</title>
</head>
<body>
Redirecting to https://passport.ngs.ru/check/?name=ngs_token&return=http%3A%2F%2Fm.nn.ru%2Ff%2F1238.
</body>
</html>
So I am redirected to login page and brought back to m.nn.ru/f/1238
When I open m.nn.ru/f/1238 in browser it doesn't show the redirection link but the contents of m.nn.ru/f/1238 (though I am not logged in and I think there are no cookies set)
How to get the contents of https://m.nn.ru/f/1238 ?
Another alternative is to use https://nn.ru/community/hobby/advance which has a 301 redirect
I found a workaround. I installed elinks text-mode browser and save the page:
elinks https://m.nn.ru/f/1238 > 1

Node Express + CSS

I am requesting a single EJS file (setting Express, Request).
app.get('/space', function(req, res){
res.render('space.ejs');
});
The file actually renders but only two of three CSS stylesheet link are work when opening the page with my node app. The link that does not work is W3 school. (the only http of all three, could that be the reason?)
However, the all three links work when I open the file directly in browser.
Could someone explain this behavior?
Here is the .ejs file.
<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<html>
You might be trying to access an insecure resource over a secure connection, if your site is on https you cannot request an http asset. Try changingnthe w3 link to https. It could also be CORS blocked, do you see any errors in the console?
you have written
app.use(express.static(__dirname + '/public'));
<link rel="stylesheet" href="/css/w3.css"/>
you need to add "static" in link tag
<link rel="stylesheet" href="/static/css/w3.css"/> and it should work for you.
in your case your server.js file in lib dir that is why you should do this
app.use(express.static(process.cwd() + '/public'));

Facebook Meta Tags Not Passing to Facebook Through PHP SDK

Good day -- I'm currently using Facebook's PHP SDK to share a link (see: https://developers.facebook.com/docs/php/howto/postwithgraphapi/), but when I attempt to customize the image, title and description via the Facebook meta tags, they do not take effect (FB always renders the defaults instead).
Here is my html head information:
<head prefix="og: http://ogp.me/ns#">
<title>Share to Facebook Custom Image</title>
<meta property="og:title" content="Share to Facebook Custom Image">
<meta property="og:type" content="website">
<meta property="og:url" content="http:...">
<meta property="og:image" content="http://www.millennialmedia.com/images/home/mmedia-2.png">
<meta property="og:description" content="add a short description of the page or content">
<meta property="fb:app_id" content="751866978175179">
</head>
Can someone please advise as to what I might be doing wrong? Much obliged!
Go to facebook debugger (ex linter) and paste the url. That should help debug. Facebook caches a copy and debugger refreshes it. Try that. Another thing that might help as well is clearing your browser's cache as the last solution.
EDIT SOLVED
You are using XHTML and XHTML is strict on errors. That was causing the facebook url parser to fail getting the information due to an invalid <br /> tag that you are using (</br>). Fix that and it will work. If going on with XHTML look here for common mistakes
I recommend switching to html like so:
<!doctype html>
<head prefix="og:http://ogp.me/ns# fb:http://ogp.me/ns/fb#">
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
As for your image not displaying issue upload a bigger image bigger from 200x200 pixels if I remember correctly.

OGP endpoints that point to Facebook entities being incorrectly parsed by FB crawler?

Our app renders Like buttons that point back to an actual Facebook page. However, instead of pointing the Like button's href directly to the FB url, we proxy it through our servers through an opengraph endpoint. This is helpful because it allows us to have more detailed analytics on when these endpoints are used (amongst other things.) When these endpoints are hit with a user agent like 'facebookexternalhit', they render something like the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta property="fb:app_id" content="158708354177049" />
<meta property="og:site_name" content="BandPage" />
<meta property="og:url" content="http://www.facebook.com/stormystrongmusic" />
<meta property="og:type" content="band" />
<meta property="og:title" content="Stormy Strong" />
<meta property="og:description" content="..." />
<meta property="og:image" content="https://graph.facebook.com/20501829906/picture" />
<title>Stormy Strong</title>
<link rel="canonical" href="http://www.facebook.com/stormystrongmusic"/>
</head>
<body>
</body>
</html>
Note that both og:url and the link rel="canonical" point to the actual Facebook Page. In practice, this looks like it behaves fine when we try running the link through Facebook's debugger: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.bandpage-s.com%2Fogp%2F11601543111380992
However, there is a problem where, after an interval, the Like buttons appear to not resolve back to the page anymore. This results in the Like count being off, the button not being 'Liked' if you already like the page, etc. Manually triggering a re-scrape by going to the OG debugger url above solves the problem, for a time.
Obviously manually re-triggering these scrapes is not a tenable solution. Are there multiple scraper behaviors happening here? It seems like the scraper that is triggered w/ the debugger is different than the one that periodically re-scrapes automatically.
Why does this happen? Is there anything we can do to get around this, except for getting rid of our ogp endpoint 'middle-man' here? This seems like a perfect utilization of og:url.

Resources