Implement Cookies banner for Azure app service application - azure

I have one Azure app service,where multiple (web app)app services with different names are running.
I have to modify already implemented cookie banner which says “We are doing ....”
The banner is showing when website load. From browser, After doing “F12” I can see, where are the text written.However, when checked the source code from Visual Studio, I can’t find the text ( that is, Checked in “Index.cshtml” page from the code. ). Searched the text in entire solution as well.
Is it somewhere implemented in App services?, so that it will be visible for different applications “Index.cshtml” page load? Or am I missing something?
Note, as per my previous on prem application, it should be implemented in the code itself. Quite unsure,why am I unable to find this.
Please help.thanks.

Related

How to open a link clicked in an external application in my, already openend application

So we all know how smooth switching between browsers and apps can be from our androids and iPhones.
My question is:
Can we archieve anything similiar on windows machines?
Scenario:
1. I get a link in a windows application like skype or outlook.
2. I press the link.
3. Magic: Somehow, somebody checks if my web application is already open in the clients browser.
4. The browser opens the already existing instance of my web application, recieves the parameters from the link and does his work.
Possible Solution/Hack that I though of:
1. When a link is openend in my application, notify the server and check if the user is already active in a different tab.
2. If yes, we show a info-page in the newly opened tab, that states that the link has been forwarded to the server and will be processed by the already existing instance of the web application.
Is there a built in way in Windows?
I've looked around for a while but haven't found anything useful that would be applicable for more than only one application (through plugins / browser extensions)
Thanks!

How to build web application that run in WeChat in app browsers?

I am trying to build a simple web application, which capture users photo and sent it my custom server there by connected to some other business use-case. My web page uses HTML's file input control to launch native camera or gallery pick up option.
var input = document.createElement('input');
input.setAttribute('accept', 'image/*');
input.setAttribute('capture', 'camera');
input.setAttribute('type', 'file');
input.click();
This web app, I placed in local webserver with a name "PhotoLocker" and testing with url like
https://localhost(ipaddress to access via mobile browser)/PhotoLocker/index.html
This link is working fine both on desktop and mobile chrome browsers and am able to debug any issues. Where as same link, I try to access from WeChat browser (just opening above link from chat window), it is not at all opening my application in WeChat in app browser.
After googling, I found that https URL scheme is not supported by WeChat. is it True? When I paste the same app url as weixin://ipaddress/PhotoLocker/index.html, I am able to see my web app home page but it is not working as expected.
My Question is - how to debug my webpage opened in WeChat browser? Do I need a official WeChat Dev account even to develop and test sample apps?
Additional Info :
I am able to debug webpage from WeChat web devloper tool as mentioned in below link. But, unable to debug mobile wechat page in this tool. It is always opening chrome dev tools.
https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140&t=0.06697335132505233#1
I am a frontend developer in China, Chinese. Forgive my English for any mistake, misunderstanding I could make. Some links (dev docs mostly) below contain sites complete in Chinese, because I can not find corresponding English ones for now.
how to debug my webpage opened in WeChat browser?
Tencent provide an IDE for developing regular web interface and WeChat-mini-program, with which developer can directly interact with:
JSSDK (basically a special weixin
Object lives only in in-WeChat-browser);
API provided in WeChat-mini-program.
If you download that IDE:
First it will ask you is to use you WeChat to scan the QRCode, then confirm login with your WeChat account;
Next it will show up two square button (image below), left one is for WeChat-mini-program, the right one is for you to testing regular web page.
Click the right blue one, then you can find your way out, it's just something built top on project Blink.
As you can see the part of debugging regular webpage in WeChat IDE is no more than a simulator (in the WeChat-mini-program part, developer can write code directly in it), and in my experience it does have bugs, you will still need to test code in real machine.
For that Tencent provide another tool called vConsole, tutorials here, with it you can do following things directly in in-WeChat-browsers:
View console logs;
View network requests;
View document elements;
View Cookies and localStorages;
Execute JS command manually
and so on
Do I need a official WeChat Dev account even to develop and test sample apps?
Depends.
You may know the Official Account inside WeChat, with webpages directly opened in any context inside in-WeChat-browser, it will have the ability to interact the weixin Object, or have some API like login with WeChat, pay with WeChat Pay:
API like close current in-WeChat-browser, hide-share-button will not required anything special, you don't need to register any Official Account;
But if you want yo do the Pay, Login thing, you need an Official Account and pay for the ability every year (not sure about this outside China).
The localhost problem you faced
I don't have my working machine with me now so I can not test. Regularly I can proxy localhost with Charles then debugging in WeChat, but never do the https, I will try it later.
All the information got regarding how to debug webpage opened in wechat browser redirects to how to see log or ajax/netwrok calls analysis.
Even with WeChat web devloper tool as mentioned in below link, I am unable to debug mobile wechat page in this tool. It is always opening chrome dev tools.
https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140&t=0.06697335132505233#1.
Hence further analyzed remote mobile webpage debugging and found that there is no way to put break points, watch, expressions and all just like in chrome dev tools is not possible.
As a work around - you are able to debug code, when you simulate page in dev tools but no way to debug webpage in mobile device.
Same webpage when tried to do remote debugging as per WeChat web devloper tool documentation. here we can only see console logs and network calls.

Social sharing for specific assets

I am developing an analytical app using NodeJS and Express and I would like to give the user the option to share the currently filtered graph along with a title and a sample description. I would like to have an option to share to Facebook, Twitter and Google +. I have done some research and I have managed to find a few libraries that were supposed to suite me. One of which was social-share (https://www.npmjs.com/package/social-share). The problem with this library is that I was unable to upload images to Facebook or Twitter, as well as the missing Google+ option.
The other library I have found is twit (https://github.com/ttezel/twit) which I still have not tried but either way it is for Twitter only.
After some time of trying to find a trivial solution, I started looking into the "build my own" option. I registered my app in the Facebook Developers console. I followed all the steps there to setup the SDK and the smple share code. The problem there was that the URL I wanted to share (http://127.0.0.1:3000/ or localhost at my case) was not "in the allowed domains for the application". I have tried a number if solutions for this error but none seemed to work. I have creadet a "Test app" under the original app in Facebook Dev Console. I have also tried creating an entirely new application for purely development purposes. (Note: in both previously stated caces I have switched the app ids obviously). I also tried the settings options for "Add platform" with "localhost" as the site URL. I have tried adding it as allowed domains and other options but I could not seem to get it to work.
What I also tried was the "Add This" option to share, leveraging the meta og: tags for image. The content is dynamically generated so I figured I should update the contents of the meta tags dynamically as well (using jQuery in my case). The problem I see there is the following: Facebook scrapes the page periodically and therefore the dynamic content from the og: tags is not fetched. Also the share button always used the information scraped from the url that I tried to share.
So after all this my questions are: Is there a trivial way in which I can have simple share buttons which the user can share the currently visible content (Highcharts graph) along with a title and text (prefilled by the app)? Is this supported for Facebook, Twitter and Google +?
Thank you in advance!

Google Chrome could not load the webpage because myPortalapps-12812b1f934c6c.myPortal.apps.com took too long to respond

Trying hello world hosted app but getting this error on deployment,
Google Chrome could not load the webpage because
myPortalapps-12812b1f934c6c.myPortal.apps.com took too long to respond
I can ping myPortalapps.myPortal.apps.com but not myPortalapps-12812b1f934c6c.myPortal.apps.com
I also had some similar problems facing sharepoint web app's this forum post helped me out alot:
When troubleshooting performance issues where more than one
person/computer is impacted, the first place I like to start is by
running a sniffer like Fiddler:
http://www.fiddler2.com/fiddler2/version.asp
Fiddler will let you now exactly how long it takes to load the page,
and break down each and every resource that is also loaded in order to
render the page. This is also a great tool for determining what is
and what is not being cached.
I take the output of this and see if there is anything being loaded
that I'm not expecting. Every once in awhile I'll see where a user
might reference an image housed on an external site or server. This
can have serious consequences to load times.
I also look at the actual SharePoint page to see if there are any
hidden web parts loading list data. Most users accidentaly click
"Close" and not "Delete" so those web parts or list views are still
there. In some cases there could be significant data being loaded and
just not displayed.
Likewise I'll also take a look to see if any audiences are being used
since Audiences can be used to show/hide content.

Azure based Umbraco site - when logging in, I get logged back out immediately

I have recently installed a website project on Azure and that was relatively easy to do thanks to great docs online. We are having a problem with the back office (admin) login though, it's a bit strange, as it didn't happen straight away, I shall elaborate....
When I go to http://www.keelycattschoolofdance.co.uk/umbraco/ it takes me to the login page, which seems fine.
(The url at this point becomes www.keelycattschoolofdance.co.uk/.../login.aspx)
I then login, which works and it starts to display the admin panels but then bounces back to the login and the URL becomes www.keelycattschoolofdance.co.uk/.../login.aspx
I am running this on Azure using the Accelerator, latest version of Umbraco and using SQL CE 4.0 rather than SQL Server.
has anyone seen this before?
Please let me know if you need more information, I shall respond :-)
Thanks in advance
Nick
It sounds like it may be a Session error. This is a problem for Azure and Umbraco because Azure uses round robin load balancing.
The normal way of setting up an Umbraco site using the accelerator would be to have a separate session DB where the shared session state is stored.
Make sure you are using this accelerator for Umbraco on Azure as it's the latest and best.
http://waacceleratorumbraco.codeplex.com/
We have several large production sites using this and I can confirm they all work fine (including the backend editing environment).
Things to watch out for are that you need to follow the instructions closely as they are easy to get wrong :-)
Make sure you don't have dashes in your db names as this makes things go wrong as well.
Finally if you are using more than one web role the Umbraco preview can sometimes yellow screen, as the preview XML may not be on the server that gets to the preview request. This is again because of the round robin load balancing.

Resources