Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

February 4, 2021

[Issue Resolved] : Error occurred in deployment step 'Recycle IIS Application Pool': Invalid namespace SharePoint

Problem/Issue:
Recently, while developing a custom visual web part for SharePoint 2019 On-Premise version, I was facing below error on deployment of the solution:

"Error occurred in deployment step 'Recycle IIS Application Pool': Invalid namespace"

Analysis & findings:
In Past, we'd already faced such issue and it was related to .NET Framework. So, I tried with reducing current version to 4.5 framework but it didn't help much.
Then, I did bit googling, and spent more time to analyze the the issue further. And finally, I was able to find the root cause of the issue. It was related to changes in configuration of development environment.

Solution:
We need to add "IIS 6 WMI Compatibility" feature in our development machine to fix the issue. To add it, we need to follow below steps:
  • If you are using windows server, go to server manager. 
  • Click on “Add Roles and Feature”.
  • It will open “add feature” dialog. Click next till you reach “Server Roles”.

  • Expand “Web Server (IIS)”
  • Expand “Management Tools”
  • Expand “IIS 6 Management Compatibility”
  • Now, check “IIS 6 WMI Compatibility”, “IIS 6 Metabase Compatibility” & “IIS 6 Management Console” and click Next.
Note - In my case, the first two features were already installed. If it is not installed in your machine, please select it as well.
  • Click Next and move to feature tab.
  • Click Install in confirmation installation screen.
  • It will start installing the feature. Wait for the completion.
  • Click close.
  • Restart the visual studio and try to deploy the project and it will deploy successfully. 

If you have any questions you can reach out our SharePoint Consulting team here.

September 20, 2017

SharePoint Anonymous access issues with Mobile devices for Public-facing website

Problem Statement:
We implemented a public-facing website in SharePoint 2013. We have had anonymous access enabled for the web application. The anonymous access was working fine in the Desktop View, but we faced an issue with accessibility of the site in Mobile View. SharePoint site was prompting for authentication while using in Mobile view. It was working fine while using on desktop view.

Cause of the Error:
If you notice the browser's console window, you will find some JavaScript files are not accessible as an anonymous user, it throws 401 error. SharePoint automatically detects that a user is connected with a mobile browser, and redirects them to a mobile view of the page. However, by default anonymous users don’t have access to this page. In this situation, the likely goal is to not redirect the users to the mobile page and display the desktop responsive version page.

Resolution:
To fix this issue follow the certain steps (If it is multi-tiered SharePoint farm, these steps need to be followed on all the servers in the farm):
  1. Open the IIS Manager.
  2. Find the SharePoint Web Application where you found these issue.
  3. Explore the Web Application in File Explorer.
  4. Edit web.config file in a text editor.
  5. In <configuration> find <system .web>.
  6. Add or modify below code section.
  7. <browserCaps> <result type=”System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/> <filter>isMobileDevice=false</filter> </browserCaps> 
  8. Save and browse the site, the issue should have been addressed.

Reference:
https://social.technet.microsoft.com/Forums/office/en-US/d1e58832-391b-42ba-a21b-6ef40d1c9acb/anonymous-access-for-mobile-users?forum=sharepointadminprevious

If you have any questions you can reach out our SharePoint Consulting team here.

November 22, 2016

SharePoint 2013/SharePoint 2010: Service Unavailable - HTTP Error 503. The service is unavailable.

Issue:
Sometimes we get error in SharePoint 2010 or SharePoint 2013 like "Service Unavailable - HTTP Error 503. The service is unavailable" when we try to access a SharePoint site.



Cause of the issue:
IIS - Application Pool of specific Web Application is Disabled/Stopped.

Resolution Steps:
Important Note: If SharePoint Farm is multi tier farm, then, below steps need to be verified in all web servers.

1. Login to SharePoint Server as administrator.
2. Open Internet Information Services (IIS) Manager.
3. Navigate to Application Pools option under server name as shown in below screenshot. And verify that Application Pool for specific web application is in "Started" status. In screenshot, we can see that status of specific Application Pool is stopped.


4. Right click on this Application Pool and click "Start".
5. Open the site in browser and it should work as expected.


If you have any questions you can reach out our SharePoint Consulting team here.

May 3, 2016

Web Application creation issue in SharePoint

Issue: Creating a Web Application from Central Admin sometimes continues to run forever and getting error message: "Please contact your System Administrator".


Resolution : Here are detailed steps to fix it.

1. Open IIS Manager.
2. Select correct Application Pool of Central Administration Site from “Application Pools”.
3. Right click and select Advanced Settings... and, look for “Shutdown Time Limits(seconds)".
4. Increase it to 1200. Note: Default value is 90 seconds
5. Click OK.
6. Do IISReset.
Finally, you should be able to create Web Application successfully without any issue.

If you have any questions you can reach out our SharePoint Consulting team here.

April 2, 2012

How to force browser to clear cache for the Style sheet and Java Script

While googling on to the internet we may found so many solutions for forcing browser to clear the cache for the Stylesheet and javascript using code programatically.

But if we want to do it without any programming using IIS(Interner Information Server)?.

Follow given below steps to do this.

1.From the Start menu, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

2.In the tree view on the left side, find your application.

3. Select the Output Caching menu item.




4. In the right column, click Add in the Action menu. You can add your output caching rule here.




5. In the File name extension field, for example, type .css, and then select User-mode caching and then click on Advanced button.



6. select the Query string variable(s) check box. And enter the appropriate variable(s) in the Query string variable(s) text box as *.



7. Follow this same procedure for javascript , add .js instead of .css in step 5.




Happy coding

Cheers!!!

If you have any questions you can reach out our SharePoint Consulting team here.

March 28, 2012

Managed metadata service not working

Problem:

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator

Solution:

After googling for many hours, I was able to fix this problem. Here is the check list to fix it properly.

1.Make sure managed metadata service application pool is started in IIS
2.Make sure managed metadata service aplication pool identity has full access on service's physical folder
3.Go to central admin > Service applications > select managed metadata srevice and click on administrators. Add local farm and system account users to this list
4.Go to central admin > Service applications > select managed metadata service and lcick on permissions, add local farm and system account and allow full control for this
5.reset IIS


Note: Please note that we are trouble shooting this on a developer machine and giving local farm and system administrator account full access doesn't cause any problem, please use appropriate accounts for the same.

Happy administration

If you have any questions you can reach out our SharePoint Consulting team here.