compat.browser

a few months ago, I was asked to disable the mobile view of my company's SharePoint 2010 site. I researched this and found the compat.browser file that I need to change. I went through the file changing all instances of "isMobileDevice" from true to false. I was excited to find that my mobile devices no longer displayed the mobile version of my site. I thought I was never going to deal with this file again... I was wrong.

Since I modified the file, I've run into a problem that returns at a frequency of once a month and requires me to replace the modified compat.browser files with backups.

https://support.microsoft.com/en-us/kb/2025676?wa=wsignin1.0 Error: The browser or gateway element with ID SKTDevicesSamSung cannot be found

When the error occurs, I know that SKTdevices are no longer supported in asp.net 2.0 and throw an error because the file contains browser configurations that are not supported.

What I can't figure out is why the files are getting overwritten and what to do prevent this from happening. I'd even be ok, if the file was replaced and simply turned on mobile views, but why the entries for browsers that are not supported are added  is beyond me. What can I do to prevent SKTdevices from being added to the compat.browser file?

I know that I could create a batch file that copies and replaces the instances of compat.browser  on the server and have it run every night at midnight, but that seems a bit extreme.

Any Ideas?

Mike

May 28th, 2015 3:07pm

Hi,

According to your description, my understanding is that you want to prevent web.config being overwritten.

Unfortunately SharePoint does update web.config from time to time by design. So, its not possible to prevent web.config being overwritten.

A similar post for your reference:

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/9eea30de-6a93-46b9-89f2-823c71d4abfb/dropdownlist-date-format-infopath-2010-browser-form

As a workaround, I suggest you to create a batch file that copies and replaces the instances of compat.browser  on the server and have it run every night at midnight. Besides, users could add ?mobile=0 at the end of the URL when they use mobile devices.

Best Regards,

Dean Wang

Free Windows Admin Tool Kit Click here and download it now
June 1st, 2015 2:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics