Overcome/ignore compatibility view IE11 for particular page/site - iis

I have a sharepoint site and loading an external website in a content page. I have enabled compatibility mode for my sharepoint site, and the external site will not work in IE lower versions. Since i have enabled compatibility view for the site, the external site not loading in iFrame of my content page.
Is it atleast possible to turn off or bypass the compatibility view setting for the particular page? Since i have enabled the compatibility view for the domain, the meta tags are ignored.
I tried to modify the user agent string in URL rewrite also.
Any advise?

I've never tested this with an iframe that has an external reference,
but if you are talking about one of your site pages, Try to add the follwoing to your config file
<location path="Your_Page_Path">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=Edge" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>

Related

Can you turn off Visual Studio 2013 Browser Link on a page by page basis

I like the inspector feature of Visual Studio 2013 Browser Link. However, I have a small number of pages, mostly custom audio/video Media Players, which cause the browser to make an exorbitant amount of signalr requests per second... in the range of 200 per second. So, I would like to disable the feature on those particular pages.
I know it can be disabled accross the entire application or a section of the application by putting the following key in the web.config file.
<add key="vs:EnableBrowserLink" value="true" />
Is there a way to disable it on a single page?
Put all of your Media Players in one folder. Add a custom web.config for the folder. Add the key to the web.config.
<appSettings>
<add key="vs:EnableBrowserLink" value="false" />
</appSettings>

SharePoint Designer 2010 Can't open Page Layout in Edit Mode

Every time I try to open any page layout in my site collection SharePoint Designer 2010 throws the the following error at me.
Can't figure out what's wrong. I've used it fine with other site collections before.
Any ideas?
when opening your site collection, try to specify the full name for this collection.
for example, instead of http://localhost, try something like this:
http://fullname.domain.com
Or, probably a better way to fix it: go to Central Administration (/_admin/AlternateUrlCollections.aspx) and check your alternative access names. When you open your collection in Designer you have to use exactly the same URLs.
I have since found out what caused this issue.
I was missing the following handler for asmx within my web.config file
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Port ASPX page to Sharepoint

I'm trying to port an existing ASPX page, which is part of an existing web site, into a new Sharepoint site. The ASPX page is a relatively simple form with some server-side controls, the ability to email form submissions and "Captcha". The current website has the Newtonsoft.CaptchaControl dll registered in the bin folder. So what I need to do is:
Port the ASPX page into the proper location within the content of a Sharepoint site
Properly register the CaptchaControl dll with Sharepoint and link allow the ASPX page to utilize it
Set up application page
The ASPX page would be called an 'application page' in SharePoint. You can copy the ASPX to the layouts folder under the "12 Hive". ("%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS"). It would then be accessible from any SharePoint site under {URL}/_layouts/CustomPage.aspx (e.g. http://site/_layouts/CustomPage.aspx or http://site/subsite/_layouts/CustomPage.aspx).
Add safe control entries
It looks like you know to place any DLL for your aspx page as well as CaptchaControl.dll in the bin folder for the SharePoint site under IIS. The DLLs must be signed with a strong name key. You also need to add the strongly-named signature of the DLLs to the SafeControls list in the web.config file for the SharePoint site. If you open up the web.config you'll see examples, e.g.:
<SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" />
Configure code access security
Assuming your controls actually do something, you need to mark them as trusted in the Code Access Security file that SharePoint uses. Change the trust level in web.config from WSS_Minimal to WSS_Custom. Go to "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\CONFIG" and copy wss_minimaltrust.config to wss_customtrust.config. Edit wss_customtrust.config and make new CodeGroup entries using the public key of your DLLs. For example:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="StrongNameMembershipCondition"
version="1"
PublicKeyBlob="002400000480435694000000060200000024245452534131000400000100453261002888e278243eb86b47eea4be1b23451177126fb9c847085e66e895a64b148c675dabda94d9301f4886a0126887bcd067356affb16a5112baf3198525fc96c45f4178a6263e1a1132bb6c0a4cdaeaccd97b0d4ab42139585700c41e8481feff03e13f30bb0a10ffa7746770d144be94954b7a908fb9bb680ebe611f50f6db" />
</CodeGroup>
Note: This will make your DLLs fully trusted within the SharePoint web application. It is better practice to restrict permissions to those actually required.

Creating asp.net membership pages in SharePoint

We have some asp.net pages that include the asp.net membership user controls for forms based authentication and would like to make use of these in a SharePoint MOSS environment.
Can anyone suggest the best place to deploy these and the best method for deployment, I was hoping to use solution packages to deploy them to the root of the site.
Appreciate any feedback
A good technique I've used previously is to make a copy of the standard SharePoint login page and make changes to that. There is an article by Damon Armstrong that describes how to do this. His article is good apart from making a copy of the _layouts folder which I believe is overkill. You can just put your amended copy of login.aspx and login.master in its own folder under LAYOUTS in the "12 Hive". Then configure ASP.NET to use these custom files with this directive in the FBA site's web.config:
<system.web>
<authentication mode="Forms">
<forms loginUrl="/_layouts/CustomFBA/login.aspx" />
</authentication>
</system.web>
As the custom pages are going under the Layouts folder they should be trivial to add to a solution file.
This sounds to me like a good candidate for an Application Page, deployed to the 12\TEMPLATE\LAYOUTS folder. MSDN has a Visual How-To here: Creating an Application Page in Windows SharePoint Services 3.0. At a minimum you would need to set your master page to ~/_layouts/application.master and deploy the assembly with your WSP.

Different Default Document Type in Subfolder on IIS 6

I've never worked on an IIS server with PHP before, but my question is can I set a default document type for a subfolder in the web.config, this is what I have in mind (its a bbPress forum):
<location path="forum">
<system.webServer>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
</system.webServer>
</location>
Thanks and a virtual beer to the person who answers :D
If you're using IIS7, the configuration you suggest will indeed change the default document for just the subfolder forum to index.php.
If this is IIS 6 then it won't work for a non-administrative user. IIS 6 stores these settings in the metabase and can only be edited using:
IIS Management Console
Programmatically, but the modifying application requires Administrator rights
Direct metabase editing
The <system.webServer> xml web.config settings are only applicable to IIS 7 and above, IIS 6 will completely ignore these.
I'm not sure if this will work, but if you know what the default document is for your site, you could try to override it with a UrlMapping. For example:
<system.web>
<urlMappings>
<add url="~/forum/Default.aspx" mappedUrl="~/forum/index.php" />
</urlMappings>
</system.web>
Let me know if that works for you. You might have to create a dummy Default.aspx that's simply blank in that directory for it to work.
EDIT: Also, for what it's worth, you can simply just add "index.php" to the list of Default Documents for your whole site. I'm not sure if you knew that. Just put it at the bottom of the list and it won't break any other sections of your site.

Resources