|
I seen that link but it has been made in Sharepoint 2007.i am not able to understand and implement it.i need a simple way to implement it. can u please help me out to implement it
|
|
|
|
|
balaji1010 wrote: How to make a sharepoint page accessible to all Users
In central administration choose your webapp, go to authentication provides and activate "enable anonymus access"
Got to your portal -> site settings -> site permissions -> click on anonymous access in the ribbon bar.
You can select the access right for anonymous users there.
balaji1010 wrote: then add an option to login to Users
It's autmatically there at the top.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
I gave you the correct answer! Can you tell me, why do you downvote me? If you got another question I won't answer you again.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Heyyy i didnt know the Voting process and about the voting points.i will rate you high as if u give correct solution to the problem.sorry
|
|
|
|
|
balaji1010 wrote: Heyyy i didnt know the Voting process and about the voting points.i will rate you high as if u give correct solution to the problem.sorry
When the solution is wrong, than please say what is wrong. When you just downvote nobody knows were the problem is and thats rude.
I gave you an answer - so say were the problem is!
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Heyy thats what iam saying that i dont know these new rating system. I dont know about points system.just now i seen that if we down vote then points gets reduced..
|
|
|
|
|
I am writing a script that will allow us to build an entire SharePoint environment, add solutions and implement web parts on particular pages from scratch. Nearly the entire script works except the last couple of lines which add the web parts to a page (of course). Here's the thing that is really weird. If I run the exact same code in a power-shell command line it works every time. The script that adds the web part to a page is called from a separate ps1 file that passes in the necessary information for the script to run. Here's the code:
function addWebPartToPage($siteURL, $pageURL, $webpartName, $listName, $solutionName, $destinationZone, $zoneIndex)
{
$web = Get-SPWeb $siteURL
$file = $web.GetFile($pageURL)
if($file.Exists)
{
try
{
checkOutPage($file)
$list = $web.Lists[$listName]
$wpManager = $web.GetLimitedWebPartManager($web.Url + $pageURL,[System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared);
$webPartListItem = $list.Items | where {$_.Title -eq $solutionName}
$xmlReader = New-Object System.Xml.XmlTextReader($webPartListItem.File.OpenBinaryStream());
$errorMsg = ""
$webPart = $wpManager.ImportWebPart($xmlReader, [ref]$errorMsg)
$wpManager.AddWebPart($webpart,"$destinationZone",$zoneIndex)
}
catch
{
$ErrorMessage = $_.Exception.Message
$returnVal = 1
}
finally
{
checkInPage($file)
$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$page = $pweb.GetPublishingPage($pageURL)
approvePage $page
#close the xml reader
if($xmlReader -ne $null)
{
$xmlReader.Close()
}
$wpManager.Dispose()
$web.Dispose()
[GC]::Collect()
checkIfFailed $returnVal
}
}
To prove the code actually worked, I opened a new PowerShell window with Admin rights (note the window that is calling the script itself is also using admin rights) and set the above variables to the values that would be passed in. I then copied and pasted my code block into the window and it ran successfully (WAT???).
So this has myself and a colleague completely stumped. Why does it work inside a script window as a code block, but won't run when I execute as a script. The error I receive is this:
An error occurred adding webpart Poll to the page Pages/WebpartTest.aspx. Error: Exception calling "ImportWebPart" with "2" argument(s): "A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe."
I would look to this being a config issue (safeExecute in the config etc) if it wasn't for the fact that it runs successfully via VS2010 and in a code block rather than through a script. All other functionalities of my script work including adding and activating solutions, creating Site Collections, etc.
Any help or input would be greatly appreciated.
Thank you.
modified 9-Nov-12 12:31pm.
|
|
|
|
|
_HawkeyeD wrote: An error occurred adding webpart Poll to the page Pages/WebpartTest.aspx. Error: Exception calling "ImportWebPart" with "2" argument(s): "A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe."
When something isn't registered safe you can add it by hand, but not by a function. I guess it should work without a function but I'm not sure.
The solution: Register the WebPart as Safe in webconfig:
<SafeControl Assembly="ResKitLibrary, Version=1.0.0.0, Culture=neutral,
PublicKey-Token=3fab337e00400dc5" Namespace="ResKitLibraryNamespace"
TypeName="*" Safe="True" />
I didn't test the script, but I think that's the solution.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hello,
Thank you for the reply. Actually, the safeControl entry is added to the web.config when I add the solution the webpart is contained in to SharePoint. This is a custom developed webpart and the entire solution contains Lists, Event Receivers and the webpart itself. When I add the solution to the SharePoint site and activate the Feature the SafeControl is loaded to the web.config automatically.
Thanks again.
|
|
|
|
|
Ok, so I feel kind of stupid here since I didn't think about it myself, but here's the cause and I hope it helps someone else who comes along with the same issue as I did.
When adding a solution and activating said solution in Sharepoint, before you can access this solution in say adding a webpart to a page, you must first RESET IIS. So during my testing I did not add any code to reset the IIS on the application Sharepoint servers. The only reason I can think of that explains why it worked in the code block was that perhaps I had reset IIS inadvertently during my testing. I can't explain it otherwise. Stupid mistake and I have hung my head in shame, but there you go.
|
|
|
|
|
I was wanting to build a web control that did a few things for admins of a site. One of the processes was to add a user to the default members group of the site along with some other security settings. This was to help admins do all of this on one page instead of going to each group individually to add a user.
Here is the code I am currently using to accomplish this:
web.Groups("AR Test Site Members").AddUser(newStaff.User)
This work fine on my test site, but when I move it over to production that group name will change to the [Site Name] Site Members. I noticed that you could also used an index of the group instead of the name, so I used '5' because I noticed that was in the query strings for the address to look at the group members. When I used '5', I get an argument out of range error. How can I find the index number of this default group so that when I build the code I don't have to worry about finding out which site I'm on?
|
|
|
|
|
Aptiva Dave wrote: group name will change to the [Site Name] Site Members
go through each element of the site groups collection and look if the name contains "Site Members" (or ends with site members).
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Yes group name will appear with site name and Member group,visitors,owners
|
|
|
|
|
It wasn't a question, that was the work the code should do.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
modified 8-Nov-12 6:33am.
|
|
|
|
|
OK.But users who has Contribute permissions will be added directly to members group.
|
|
|
|
|
balaji1010 wrote: OK.But users who has Contribute permissions will be added directly to members group.
Yes but the wasn't the question asked. The question was:
How can he identify the "Site Members" group, when he don't know how the site is called.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
We are currently using SharePoint 2007 for our Intranet and would like to ‘Convert’ to SharePoint 2007 Enterprise. I know once this is done, we cannot revert back to standard. Here is my question(s):
1. Do/should I take SharePoint offline?
2. Should I do this in a ‘Test’ environment first?
3. Is this ‘really’ a simple process?
Hope someone can help
Thanks
|
|
|
|
|
fmorales09 wrote: 1. Do/should I take SharePoint offline?
Yes. Put the server down, backup all databases, then start convertion
fmorales09 wrote: 2. Should I do this in a ‘Test’ environment first?
Normally it should work. If you don't have a test-environment with the same configuration you there is nothing won. If you have a "standard"-sharepoint it should work anyway.
fmorales09 wrote: 3. Is this ‘really’ a simple process?
Yes, I think so. Same simplicity like the whole univers.
Well, it depends on the configuration, which extensions (solutions) you have installed and so on. Normally you can even convert SP 2007 to SP 2010 without any problems.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hi,
I am running a SharePoint site. It was working perfectly from months, i recently made some changes in solution and deployed the new WSP on server using the Timer job. I am not been able to log in to site after that deployment, i have deployed the solution again and again but not gain It opens the login page but when i enter the login credentials it does nothing but just refreshed the page and empty the password field.
I really need help in this matter.
Thanks in Advance.
Ahmad
|
|
|
|
|
Perhaps it would be good to remove the solution by using PS:
Uninstall-SPSolution –Identity yoursolution.wsp
Remove-SPSolution –Identity yoursolution.wsp
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
So,
Are you getting any errors on the page?
What kind of tasks are you doing with the custom timer job?
Have you deployed the solution using Visual Studio 2010?
Is it a web or site or web application scoped feature?
Thanks,
Arun Kumar Asirvatham
|
|
|
|
|
Hi,
I have created one sharedocument called "TeamRoom" by using sharepoint foundation2010.In that sharedocument multiple users can upload multiple documents and can edit the documents too. But the document should be deleted by only who uploaded it.
What will I need to do, If I want to get the document deleted only by the user who uploaded the document, and other will need to get Read and Edit access ( not Deletion access) to that document?
Thanks,
Hemadri.T
|
|
|
|
|
HemadriT wrote: But the document should be deleted by only who uploaded it.
Best add a new access permission level where you give the rights to add and edit but not to delete.
Give the new access level to all users.
When somebody adds a document start a workflow and give him a supperior access level, where he got the right to delete that element.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hi,
I created Permission levels in the following way
Add Permission Levels-->List Permissions, I selected Add Items & Edit Items.But i am not able to access the document by user whos have access Add& Edit Items.
Thanks,
Hemadri.T
|
|
|
|
|
HemadriT wrote: But i am not able to access the document by user whos have access Add& Edit Items.
Well, that can't be. There must be something wrong.
Has the document own right or does it inherit the list rights? If so, you have to add permissions to the document, too.
Some question, to get a brief look at your problem:
- To which group does the user who added the item belongs?
- To which group does the user who want to edit the item belongs?
- What are the group rights of both groups for the list?
- Can both users see the list?
- Can both user add items?
- Is the side-admin able to edit items?
- Are there special list features enabled like versioning, approval, are the documents checked in?
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|