I'm creating web application on ASP.NET WebForms, and one of my tasks is copy/paste data to excel from web page. I/m using window.clipboardData, and it works for my user (local admin). But for other users it doesn't work. How can I fix it? Thank you.
This is a browser level permission, that need to be set depending of the browser.
In the documentation of your application you need to specify where and how to enable it on the browser.
I recommend you to explore each browser options, for your documentation.
For Internet Explorer you can go to Internet Options>Security>Add the Website/link to the trusted sites (Make sure https checkbox is checked, if your website is not using https). After adding it, go to Custom Level in the same window. It will pop another window, you can explore all the options for any other think you may need. The option to allow access to clipboard show be "Allow Programmatic clipboard access" and set it to enabled.
It may be a ActiveX Control that can make it automatically, but will work only for Internet Explorer.
Related
When you navigate to https://stackoverflow.com in IE11, it redirects the user to Edge with the following tab open: https://support.microsoft.com/en-us/office/the-website-you-were-trying-to-reach-doesn-t-work-with-internet-explorer-8f5fc675-cd47-414c-9535-12821ddfc554?ui=en-us&rs=en-us&ad=us
How do I implement this in my own site? Is there a meta tag that can enable this?
EDIT: Here's a clip of what it looks like. Tried on Windows 10. https://streamable.com/nwtt22
Ah yes, I wondered this too, and also assumed to be a browser only thing.
Sure enough!
It's the ie_to_edge_bho (Browser Helper Object) DLL file found in the Edge Program files.
I was curious enough to Hex edit the DLL file and found the URL in which it pulls these approved sites from... almost like a master/default list.
Yes, it's built into the BHO, no it's not stored locally from what I can tell.
(Screenshot of Hex editor)
Here is the link: https://go.microsoft.com/fwlink/?linkid=2133855
Which forwards to https://edge.microsoft.com/neededge/v1
I have no idea how you get your own site on this list, but I figured I would add this information. :)
I was wondering this too. After reading Joshua Joppie's answer, I did some Googling and found this webpage.
Turns out, you need to e-mail Microsoft to get your site added to the Edge-only list (how to do so is explained on that page). I'm not sure if they'll take a request from anyone, or whether you need to be a big website, like Stack Overflow. It's worth trying anyway, as the only requirement they give is this:
The IE compatibility list is designed to work with public sites only.
To be honest, I've no idea why they didn't just make a <meta> tag for it. It would be much easier.
If I have time (which I doubt), I plan to make a JS programme that mimics the functionality of a website's presence on this list and I will link to it here. You could always do a user agent check that redirects the user to microsoft-edge:https://example.com (where example.com is your website) if it detects them using Internet Explorer.
Need to add the below script in the head tag to redirect your website in Edge browser
<script>
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
window.location = 'microsoft-edge:' + window.location;
setTimeout(function() {
window.open('', '_self', '').close();
// window.location = 'https://support.microsoft.com/en-us/topic/we-recommend-viewing-this-website-in-microsoft-edge-160fa918-d581-4932-9e4e-1075c4713595?ui=en-us&rs=en-us&ad=us';
}, 0);
}
</script>
This is controlled by Edge Chromium group policy not code. You can refer to the steps below to set the group policy to achieve the goal:
1. Send all sites not included in the Enterprise Mode Site List to Microsoft Edge
This setting lets you decide whether to open all sites not included in the Enterprise Mode Site List in Microsoft Edge. If you use this setting, you must also turn on the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list policy setting and you must include at least one site in the Enterprise Mode Site List.
Open Group Policy Editor.
Click Computer Configuration > Administrative Tools > Windows Components > Internet Explorer.
Double-click Send all sites not included in the Enterprise Mode Site List to Microsoft Edge.
Select Enabled.
Click OK or Apply to save these settings.
2. Configure which channel of Microsoft Edge to use for opening redirected sites
This policy enables you to configure up to three versions of Microsoft Edge to open a redirected site (in order of preference).
In the same path of Group Policy Editor, double-click Configure which channel of Microsoft Edge to use for opening redirected sites.
Select Enabled.
Under Options, select your top three choices for the channel to use - Internet Explorer will redirect to the highest ranked choice that the user has installed on that device:
Microsoft Edge Stable
Microsoft Edge Beta version 77 or later
Microsoft Edge Dev version 77 or later
Microsoft Edge Canary version 77 or later
Microsoft Edge version 45 or earlier
Click OK or Apply to save these settings.
3. Use the Enterprise Mode IE website list
This policy setting lets you specify where to find the list of websites you want opened using Enterprise Mode IE.
Create or reuse a Site List XML. Sample file is like below:
site.xml:
<site-list version="8">
<created-by>
<tool>EMIESiteListManager</tool>
<version>10.0.14357.1004</version>
<date-created>08/20/2020 07:45:39</date-created>
</created-by>
<site url="www.example.com">
<compat-mode>IE7</compat-mode>
<open-in>IE11</open-in>
</site>
</site-list>
In the same path of Group Policy Editor, double-click Use the Enterprise Mode IE website list.
Select Enabled.
Under Options, type the location of website list. If it's in local, you can set it like this: file://D:/site.xml.
Click OK or Apply to save these settings.
It's quite simple to add your domain to the redirection list.
https://learn.microsoft.com/en-us/microsoft-edge/web-platform/ie-to-microsoft-edge-redirection#request-an-update-to-the-ie-compatibility-list
https://learn.microsoft.com/en-us/deployedge/edge-learnmore-neededge
Request an update to the IE compatibility list The IE compatibility
list is an XML file on microsoft.com. The list is regularly updated in
response to user and website developer requests to have websites added
or removed. Updates to the list are automatically downloaded to user
machines.
Email the following information to ietoedge#microsoft.com for your
website to be added or removed from the IE compatibility list.
Owner name Corporate title Email address Company name Street address
Website address
I'm fairly certain that Microsoft checks its "Enterprise Mode Site List" in order to decide whether to open the webpage or direct users to Edge. You can find more information about it here: https://learn.microsoft.com/en-us/internet-explorer/ie11-deploy-guide/what-is-enterprise-mode
I'm using a Chrome extension to help me work on a webpage but it's setting cookies from doubleclick.net even though I've disabled third party cookies in the Chrome settings. It's annoying because they're filling up my console with messages.
They're not appearing in document.cookie so is there any way to delete them in JavaScript? Or some other way to stop them being set?
I personally the use EditThisCookie extension for chrome when developing web apps using cookies. It allows creation, editing, deleting and most importantly for you blocking of cookies.
You can block a domain from setting a cookie by:
1. Select the cookie from the menu and click block.
2. This opens a menu where you can set a rule blocking the domain from creating new cookies.
I've got an html file on my desktop that runs some javascript and activex within IE, so naturally when it opens it prompts to allow activex. My question is, is there anyway to auto allow activex for this specific local site/file? Allowing all ActiveX from all sites is obviously a security issue, so I'm attempting to see if I can allow for JUST this local site.
Add the URL to intranet zone and modify the settings for intranet zone only
Hope this helps.
Our Web application is based on IE9, which means only IE9 can open the pages in our site. We'll prevent user to browse our site when their browser is not IE9.
But sometimes we had to send a link to user's email box to complete some actions and they will open the link directly with their default browser, the problem is here, if the default browser is not IE9 then they can't open the link, they have to copy the link to IE9. Our user don't want do this manually, they want open the link in IE9 directly no matter what the default browser is.
I have tried using ActiveXObject, but it only works in IE. I want have a script which can open IE browser in Firefox/Chrome page.
It sounds like you want to have a link in an email that activates a specific program on the user's computer rather than the program that they've identified should be used (e.g., their default browser). I don't believe you can do that.
You can install "protocol handlers" in both Chrome and Safari (I suspect Firefox as well), which would let you send a link like ie://example.com/path/to/app. Your protocol handler would launch IE and take you to the relevant site. (Apple does this with iTunes.) But your users would have to install the handler (and, of course, you'd have to write it).
An easier answer might be to have the users install any of the ubiquitous "open in IE" add-ons/extensions that exist for Chrome, Firefox, etc. They follow the link, then choose "open in IE" from some kind of menu. (If they're using webmail, they may even be able to right-click the link and choose that line item, depending on the extension.)
Side note: Obviously, though, barring it being impossible I'd recommend making your application compatible with Chrome and Firefox.
No you can't do it..
but there is some alternatives:
Install your users IE tab:
FireFox - http://lifehacker.com/135297/internet-explorer-in-a-firefox-tab?tag=softwarewebpublishing,
Chrome - https://chrome.google.com/webstore/detail/hehijbfgiekmjfkfjpbkbammjbdenadd
Use a batch file that will launch your link in explorer.
use this Firefox plugin makes it possible to use (host) ActiveX controls in Firefox - http://code.google.com/p/ff-activex-host/
instead of ActiveX try using Netscape Plugin Application Programming Interface (NPAPI) - a cross-platform plugin architecture used by many web browsers.
Similar as with a batch file, you may create a link file to the page you need using the ".website" file extension with IE, which is configured in windows by default to open with ie. Put it in your webserver public folder and then add a link to that file in your website
You don't have to write code to create a custom protocol handler in Windows. See this page for how to define one in the registry.
You can use User agent switcher for chrome or firefox
For Chrome :
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
For Firefox :
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/
I wrote a scripting logic in using ActiveX. When the application runs it is blocked by popup blocker. When I enabled it works fine, but I want to enable the popupblocker using JavaScript (especially in IE).
Obviously a website cannot modify the popup blocker settings. And that's a good thing.
You should avoid using ActiveX Controls because it is only supported by IE. Trying running your page on Firefox and it won't work.
Now the actual problem -
Firstly you need to understand what ActiveX Objects are used for? They basically allow a web application to interact with the client machine. For example it can use resources on my local hard drive. This is a security risk. So IE gives a warning for the same. You may disable it in your browser by going to Tools-> Internet Options -> Security Tab. Click "Custom Level" and change all the boxes with ActiveX text in it to "Enable".
But it will still show up in your client browsers.
So the point is try finding an alternative for it.
Hope this helps!
You cant. What you could do is have a message on screen which requests the user to turn off the popup blocker .