Showing posts with label Sharepoint Errors and Resolutions. Show all posts
Showing posts with label Sharepoint Errors and Resolutions. Show all posts

Thursday, March 8, 2012

Document Library name and sub site name cannot be the same Issue

Hello


I faced an interesting technical blockage today. I wanted to create one sub site with name Report and I could not create it as it was throwing error saying this name already exist. I saw there was not sub site with this name. I being farm administrator, there was no any other issue of permission.


Then i realized and found that if your document library name is report and if you are trying to create sub site in the same site where this document library reside, then you cannot create sub site.


Of course because if its a lists, then we have /lists/ in URL but same is not the case with document library.
because what does SharePoint understand when you enter


http://{sitename}/Report


Is it a sub site of {sitename} or library which is in {sitename}?


Try it your self. you won't be able to create a sub site with the same name of any document library in the site.


If you give different URL then it works, but then your URL changes.


Should Microsoft consider having /DocLibs/ as a part of document library URL going forward because of this limitation? :) 


Not sure if its a bug or limitation. It seems a limitation. But yes, it has got meaning not to allow us to create a site with that way.



Wednesday, November 2, 2011

Trying to use an SPWeb object that has been closed or disposed and is no longer valid

I recently faced this error while i was working on some object model and by looking into the code i realized that i did a little mistake.

This error itself states everything. I used the current site object in the using clause while performing some operation. we should never close the SPContext.Current.Site when we deal with any coding. If we have manually declared any site or web object, then only we have to dispose them.

I made this correction and my code worked well.

I hope this helps others not to repeat the same mistake again.

Tuesday, October 11, 2011

A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action

I encountered very strange error yesterday and I was very thrilled to find a solution to this problem in SharePoint 2010. 


 Scenario is even the user has contribute permission on a specific web part page and try to add web parts, then also user cannot add the web part. Use keep getting message which says “A Web Part or Web form control on this page cannot be displayed or imported. You don’t have add and customized pages permissions required to perform this action.


Now the other problem, when the same user tried to add some other web parts like list view web part, they were added on a page without giving this error. 


Now this is something new that I‘ve encountered. So I try giving user a full permission on that web part page. Still user was not able to add content editor web part to a page but was able to add list view web part. I didn’t realize what is wrong with SharePoint 2010. User has full control even though need not to for actions that user wants to perform, then also user is not able to add content editor web part. 


Then I started Google information and found that if the user does not have design permission on a site level which itself has one permission called “Add and Customize the page” then user cannot add certain web parts to a page. 


Once you give user design permission or Add and Customize page permission, user should be good to go for adding content editor web part to a page. This permission is given by default to Designer group and not to contributor group. This may be due to a security constrain where user can write cross site query scripting to manipulate something.


There is one more attribute that is new in SharePoint 2010 which allows or disallow a user which has contribute permission to add specific web part on a page.


If you set Safe=”false” a user with contribute permission cannot add this web part if it is set to true then it allows to be added on a page.


As you can see already many web parts have this property set to True. You can play around and check yourself. Hope you’ve liked this post.

Wednesday, July 14, 2010

The remote server returned an error: (409) Conflict in SharePoint

Hi All,
I was trying to upload document in document library through SharePoint webservice.I was getting error "The remote server returned an error: (409) Conflict" when it try to create folder in SharePoint document library.Finally I found that the error was just because was "FolderName" has some special characters "@" so SharePoint refuse to create that folder through web service.

Hope it will help you.

Thursday, April 1, 2010

Access denied error when I use web services in InfoPath

Hi All,
When I use user profile service or any other web service in InfoPath and run it on my local server it works fine and when I deploy same form on production server where there is SharePoint farm it fails to run and give access denied error. I have used host header for SharePoint site and I refer that host header to open that site.
The solution for this problem is to disable the loopback check on each SharePoint server in farm.
To set the DisableLoopbackCheck registry key yourself, follow these steps:
Set the DisableStrictNameChecking registry entry to
  1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    (http://support.microsoft.com/kb/281308/ ) Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.
    And run IISRESET on each server
    Reference: http://support.microsoft.com/kb/896861

Saturday, October 10, 2009

'' is not recognized as an internal or external command

Hi All,
I face a problem when i create .bat file in Visual studio it add an extran non-ASCII character in my bat file and i am getting error '' is not recognized as an internal or external command,
it is because it is UTF-8 format

so to fix it Use notepad++ and paste your .bat code in it and go to Format Menu select ASCII format and save it it will work like charm :)


Happy SharePointing....


SharePointKings

Tuesday, October 6, 2009

Office SharePoint Search Service hangs does not start

Hi All,
I have faced one strange problem i was restarting Office SharePoint Search Service on my farm environment and suddenly it got hanged it is showing me in starting state there is no stop,start or restart option in services.msc console. I have restarted my machine but still error was as it is.
I tried following command also

stsadm -o osearch -action start
stsadm -o osearch -action stop
net stop oSearch
net start oSearch
nothing was working for me it shows me operation time out as osearch service is in starting state.

I fixed it by
psconfig -cmd services -install
and configure SharePoint search again and it works for me.

warning: follow above instruction at your risk on production environment :)

SharePointKings

Monday, March 30, 2009

error while updating task

Today we face a strange problem.
We are facing this error

“The workflow's parent item associated with this task is currently in the recycle bin, which prevents the task from being completed.”


We are totally confuse what this error want to say.

Below is the scenario when we are getting error.

We have a requirement where admin can reassign task to of a user to another user.
So we are assigning a task to another user by changing “assign to” field of tasklist item.

When we are calling item.update() (also tried systemupdate() and updateoverwriteversion() ) we are getting this error.

But we are not able to understand why this error is coming.
Then after spending 2-3 hours we are come to a conclusin.
we are getting this error because we are trying to update task which has attached with custom content type and that content type has been inherited by workflow task item.

Even though that task is not created by workflow but if task created with content type that is being inherited by workflow task item then you can not update it directly it should be updated by workflow only.

So in our case we change the content type from workflow task item to simple task itme so that will solve our problem. But we are still not able to understand the error massage.

Wednesday, December 10, 2008

Web Part Error : Cannot deserialize the Web Part

Hi Guys,
                Facing another web part error ? Wondering what to do when you receive the error Cannot deserialize the web part every where on the page ?


 I have faced a similar situation and have found a solution for it. Solution is very simple ....

I am assuming that your wss is running under the Network Service Credentials. If that is the case and you have just restarted the server machine and started getting this error then follow these steps............

1. Go to the windows directory and find the TEMP folder e.g c:\windows\TEMP.
Right click the TEMP folder and select the security tab. 
2. Click the add button for adding a new user. write the name network service and press check names. Give Read/Write rights and press OK.
3. Go to the location c:\windows\system32\Logfiles folder and follow the instructions given in step 2.


That's it. Refresh the page and the error is gone !!

If it is still troubling you . Write to us at sharepointkings@gmail.com with a screenshot of the error page (if possible). We will feel happy to help you as always.

Wednesday, December 3, 2008

Access denied or Cannot complete this action error message when you try to connect to a Windows SharePoint Services Web site

Hi All,
            One of the most common error message encountered while working with SharePoint Site is access denied or cannot complete this action. Have you ever wondered what is the reason behind this??
Let me tell you.. First have a look at this Microsoft Support Article:

In addition to this i sometimes got this error message in the event viewer log as well. I developed a custom web part and deployed its dll's in the bin folder of the site. When i tried to add the webpart on a web part page i got the access denied error message. Somehow i could not figure out why i am getting the error message even though i am the administrator of the site and machine.
Then i studied the error message in detail. It was mentioned that error message is getting generated because the account under which the service is running is not having permission to access the bin folder of the site.
Then i simply went to the virtual directory folder of the site and clicked on the properties of the bin folder(Right Click --> Properties). I selected the security tab and found out that the account under which the wss services were running (Network Service Account) was not present at all.
I added the network service account and gave appropriate rights and that's it !!! Webpart started working....
I hope this blog post will reduce your headache to a cetain extent. 
Still if you are facing problems like this and couldn't find solution contact sharepointkings@gmail.com and we will help you out.


Wednesday, September 3, 2008

Data at the root level is invalid. Line 1, position 1 in MOSS,WSS

Hi,
Today when I working on wss 3.0 / MOSS site suddenly I got an error saying , "Data at the root level is invalid. Line 1, position " . Then I come to know I have open one html file from virtual directory in SharePoint Designer, SharePoint designer automatically geneates some folder inside this directory which is the cause of an above error. so when I deleted this folder named "_vti_cnf" then site works fine..
hope will work for you... and you will take care in feature before openning files in SharePoint designer from your web application virtual directory...

Reference from http://forums.asp.net/p/985790/1270047.aspx#1270047

Thursday, August 21, 2008

Content Query Web Part Error

I get the following error when I try to add a ContentByQuery.webpart in my SharePoint site.
"Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator."

I wonder about this error because this error is not coming in another web application on the same system.

So I started investigating what should be the problem.

Means while I come to know that content query webpart is also not available in the “Add webpart Dialog”.

Then I came to know that this Content Query webpart is the part of
“Office SharePoint Server Publishing Infrastructure Feature“

So I resolved the error by activating this feature. This feature is rested in site collection feature.

And Content Query webpart is also available in the webpart pool.

Tuesday, July 1, 2008

Resolution for Error: The following file(s) have been blocked by the administrator

SharePoint Error: "The following file(s) have been blocked by the administrator"

Recently when I tried to upload a .mdb (Access Database) file in a Document Library I got this error

The following file(s) have been blocked by the administrator: Project Documents/Applications/BATS.mdb at Microsoft.SharePoint.Library.SPRequestInternalClass.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object varFile, PutFileOpt PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage)
at Microsoft.SharePoint.Library.SPRequest.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object varFile, PutFileOpt PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage)


Resolution : You're unable to update the Access file because SharePoint by default blocks .MDB files.
Do the following:
1. Go to SharePoint Central Administrator.

2. Under the "Security Configuration" section, click "Manage Blocked File Types".

3. Find MDB.

4. Remove MDB from the list & click the "OK" button.




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com