Skip to main content

Posts

Showing posts with the label IIS

The XSS Auditor refused to execute a script in http://default.aspx because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header in SharePoint 2013

The XSS Auditor refused to execute a script in http://default.aspx because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header in SharePoint 2013 Recent google chrome update may breaks the sharepoint layout pages and other custom development pages due to XSS Auditor. I have added the HTTP Response Header  to the SharePoint Web Front End Servers  and then it worked fine.    

SharePoint Web site Keep on Prompting for credentials– Full Article.

This article breaks into three sections. Identify and Cause Add Exception to Strict Name Checking Disable Loopback Identify and Cause There are many reasons to happen this but most of the time it will happen when you change the Access mapping to match your domain. For an example you might have webwfe01 as your web application in your default zone. And if you change that to www.sampleweb.com this may be occurred for Windows Users. This is because by not having Fully Qualified Domain name specified is not matching with the local machine. For an Example, Your local machine can be in a domain myorg.com and the specified Mapping is sampleweb.com Thus this will cause LoopBack check which it true by design for security reasons. Microsoft specifies two methods to resolve the issue. Disable Strict Name Checking Disable Loopback Check REF: https://support.microsoft.com/en-us/help/896861/you-receive-error-401.1-when-you-browse-a-web-site-that-uses-integrated-authentication-and-is-...

FormsAuthentication.SetAuthCookie() not working

  Quick Tip : I have configured the membership provider to work with ASP.NET application which is going to deploy in to the SharePoint. But when I used FormsAuthentication.SetAuthCookie() to set the Authentication Token it doesn’t work for me. I have tried disabling anonymous authentication but still didn’t work. Then I changed the FormsAuthentication.SetAuthCookie() method to following set of lines and ultimately worked. FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(txtUserName.Value, false , 60); string encTicket = FormsAuthentication.Encrypt(ticket); Response.Cookies.Add( new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));

SharePoint 2013 Web site Keep on Prompting for credentials

There are many reasons to happen this but most of the time it will happen when you change the Access mapping to match your domain. For an example you might have webwfe01 as your web application in your default zone. And if you change that to www.sampleweb.com this may be occurred for Windows Users. This is because by not having Fully Qualified Domain name specified is not matching with the local machine. For an Example, Your local machine can be in a domain myorg.com and the specified Mapping is sampleweb.com Thus this will cause LoopBack check which it true by design for security reasons. Microsoft specifies two methods to resolve the issue. Disable Strict Name Checking [ Ref ] Disable Loopback Check [ Ref ] REF: https://support.microsoft.com/en-us/help/896861/you-receive-error-401.1-when-you-browse-a-web-site-that-uses-integrated-authentication-and-is-hosted-on-iis-5.1-or-a-later-version You need to do it all SharePoint servers for safe side in the future service deploymen...

Disable Loopback Check in IIS

This is use full in many scenarios. For me it’s more use full for disable keep on prompting credentials in SharePoint 2013 Environment. In this method you can simply disable the check by editing the following registry key. Open the RegEdit. And navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa Click on Lsa Registry and add DisableLoopbackCheck registry key as DWORD value. After adding the registry key you can find the entry as follows. Then double click the key and Enter 1. And click OK. Then restart the IIS.

Disable Strict Name Checking in IIS

This is use full in many scenarios. For me it’s more use full for disable keep on prompting credentials in SharePoint 2013 Environment. In this method you need to add your domain as an exception list to IIS for not checking the FQDN for loopback. Open the RegEdit. And navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa and click on MSV1_0 Then add new Multi Connection String And add BackConnectionHostNames Then you will see that is added to the registry. You can double click and add your fully qualified domain names (One per line) that will be working as an exception. Then you can save and restart the IIS.

An error occurred while talking to SMTP host mail.something.local Event ID 6858

this error occurred to me when I setup SMTP virtual sever for SharePoint farm. then I tried to trouble shoot email sending using PowerShell and it also return False . Trouble shooting SharePoint Emails (SMTP server)  $dict = new - object System.collections.specialized.stringdictionary // recipient's Email Address $dict .add( "to" , "somebosy@gmail.com" ) // sender: you can put anything that you want to visible in the email $dict .add( "from" , "outsender@sharepoint.local" ) $dict .add( "Subject" , "sample subject" ) // this is any existing sp web url $web = get-spweb "http://4587wfe2013:5003" $body = "This is our body codes in it." [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,$sd,$body) This code will return True if success otherwise will be False . This error occurred me because of connection issues to SMTP server. thus I go to SMTP properties   Then go to Access Tab and click Conne...

Change the IE Compatibility Mode manually

We can set HTML rendering mode using Meta Tag. < meta http-equiv ="X-UA-Compatible" content ="IE=5" /> This is set compatible mode to IE-5, like wise there are few modes we can set using a meta tag. content="IE=5" - force to render in “Quirks” mode. content="IE=7" - forces to render in IE 7 Strict mode. content="IE=EmulateIE7" - use !DOCTYPE declaration to detect rendering mode content="IE=8" -   forces to render Internet Explorer Standards mode. content="IE=EmulateIE8" - use !DOCTYPE declaration to detect rendering mode content="edge" - use most recent mode Reference   http://hsivonen.iki.fi/doctype/ We can use  Web Config to alter the page rendering mode < httpProtocol > < customHeaders > < remove name ="X-UA-Compatible" /> < add name ="X-UA-Compatible" value ="IE=edge" /> </ customHeaders > </ httpProtocol >

The context has expired and can no longer be used in SharePoint 2013

This error occurs when Web application Default time Zone is not set Web Application Default time Zone is not match with the Server Therefore go to Web Application General settings and Change or set the time zone and cross check it with the server. then do IISRESET It will work ..! :)

The Web application at URL could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

This is a common error we are came across most of the time. When you are running inside the SharePoint common resolutions are Running the web application in 64-bit mode. Changing to target framework to 3.0 instead of 4.0 Adding app pool identity user to WSS_ADMIN_WPG Adding app pool identity user to Administrator group Ref : http://spnovice.blogspot.com/2012/11/the-web-application-at-url-could-not-be.html But when you are creating a Web Service (WCF) or a Other Web Project which is ruining inside the SharePoint server but not inside the SharePoint You need to Change the AppPool Account to; which SharePoint is running.

How To Access Server.MapPath in a Class that is not inside Web Project

In My case I have decoupled WCF Class Libraries and WCF Host in to two separate projects.  Then i need to get the Server.MapPath in a class library. So I have add the Reference to System.web   Since I'm using 4.5 dll is available on C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll HttpContext.Current.Server.MapPath( "~/App_Data/MediaPackager_MP4ToSmooth.xml" )

Central Administration Page gives Blank Page

I have recently installed SharePoint 2010 in Windows 7 Home premium as described in http://msdn.microsoft.com/en-us/library/ee554869.aspx but it gave an a blank page when I tried to start the central administration page. then after searching in the Net I found that windows 7 home edition , premium edition and some other editions need to enable basic from authentication in the IIS. therefore  click the the relevant central administration web site and go to authentication option and change the basic authentication enabled.

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

I recently installed visual studio 2010 and then  installed IIS server. But when I tried to run a aspx application it gave this error. I found that because of not registering ASP.NET properly. So I ran the reg command and it worked for me. windows\Microsoft.NET\Framework\ v4.0.21006 \aspnet_regiis.exe –i the bold one represent your framework version.

Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.

There can be many reasons for this. but before checking any of those web configuration things check the Authentication section in the virtual directory in IIS.