tag:blogger.com,1999:blog-14401284509247408402024-02-06T21:46:47.191-08:00Samarendra Swain - SharePoint TipsAnonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-1440128450924740840.post-13676360784741297922014-11-27T03:48:00.000-08:002014-12-12T06:10:54.865-08:00Manage Web Application Policy using SharePoint PowerShell Script<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;"><i><u>Remove a existing Web Application Policy using SharePoint PowerShell Script</u></i></span><br />
<br />
<span style="color: #e06666;"># Get the Web Application Object</span><br />
<span style="color: blue;">$webappobj = Get-SPWebApplication [Web Application URL]</span><br />
<span style="color: blue;"><br /></span>
<span style="color: #e06666;"># Return the Web Application policies and find the index of the policy which you would like to delete</span><br />
<span style="color: blue;">$webappobj.Policies</span><br />
<span style="color: blue;"><br /></span>
<span style="color: #e06666;"># Put the index value and delete the policy</span><br />
<span style="color: blue;">$webappobj.Policies.Remove([Index])</span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">$webappobj</span><span style="color: blue;">.Update()</span><br />
<span style="color: blue;"><br /></span>
<span style="color: #e06666;"># Verify the policies again if it is deleted successfully</span><br />
<span style="color: blue;">$webappobj.Policies</span><br />
<br />
<span style="font-size: large;"><i><u>Add a new Web Application Policy using SharePoint PowerShell Script</u></i></span><br />
<br />
<span style="color: #e06666;"># Get the Web Application Object</span><br />
<span style="color: blue;">$webappobj = Get-SPWebApplication [Web Application URL]</span><br />
<br />
<span style="color: #e06666;"># Create a policy role object with permission level like FullRead, FullControl etc.</span><br />
<span style="color: blue;">$fullReadPolicyRole = [Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead</span><br />
<span style="color: blue;">$policyRole = $webappobj.PolicyRoles.GetSpecialRole($fullReadPolicyRole)</span><br />
<br />
<span style="color: #e06666;"># Add the new web app policy with account name and account description</span><br />
<span style="color: blue;">$policy = $webappobj.Policies.Add("TECHMM\SSWAIN", "Samarendra Swain")</span><br />
<br />
<span style="color: #e06666;"># Bind the policy role to the new web app policy</span><br />
<span style="color: blue;">$policy.PolicyRoleBindings.Add($policyRole)</span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">$webappobj</span><span style="color: blue;">.Update()</span><br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-58065119083214420082014-11-18T20:39:00.002-08:002014-11-18T20:50:04.389-08:00Configure Forms Based Authentication(FBA) in SharePoint 2013<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: justify;">
SharePoint is mostly used for intranet portals in the organizations. People in the organization have their own LAN ID and Password(which setup in Active Directory) through which they access the SharePoint portals. By default SharePoint site uses windows authentication to authenticate users, that means any users from Active Directory in the organization can access to SharePoint sites if they grant the permission by Site Collection Administrator.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Now if organization would like to provide access to External Business Users where they do not have any account in Active Directory, then you can configure Forms Based Authentication(FBA) with SQL Membership Provider to provide them access in the SharePoint Portals.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Few years back, I had implemented in MOSS 2007. Now I have configured the same in SharePoint 2013. It's almost same.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Let's go through below steps to configure FBA with SQLMembership Provider for a SharePoint portal. </div>
<ul style="text-align: left;">
<li>At first you need to create an new database which will store the information of External Users in a ASP.Net membership database. Open the directory in any SharePoint Server (C:\Windows\Microsoft.NET\Framework64\v4.0.30319) in the SharePoint server.</li>
<li><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCGARBgcEM-i1OkHTci6iBB5cl6ORnTvHBrficsyL8feHUg5El8Cs1jurxT0u1v-777Pwo5UcREHu4RyNZV-wfL9B8mJxCHQEv0kybQBlCp2GOQUE1uwvwg3bjVNgOQRYrJUWwLxt8css/s1600/1.JPG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCGARBgcEM-i1OkHTci6iBB5cl6ORnTvHBrficsyL8feHUg5El8Cs1jurxT0u1v-777Pwo5UcREHu4RyNZV-wfL9B8mJxCHQEv0kybQBlCp2GOQUE1uwvwg3bjVNgOQRYrJUWwLxt8css/s1600/1.JPG" height="264" width="400" /></a></li>
<li>Run aspnet_regsql.exe file and Click Next.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVfh7fxS-0mXn9WAUV_hFpNTUNEdyA-mp6SRqu-DouEfzFyMXao-bUJHzH58yvPEvr_44SVFdbjlFsvN9F7WvjReCEJ1glKt6VgR91W-phGHGYuj_14tzss6b6qGEpoK6UpKy4Gk2I-Ng/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVfh7fxS-0mXn9WAUV_hFpNTUNEdyA-mp6SRqu-DouEfzFyMXao-bUJHzH58yvPEvr_44SVFdbjlFsvN9F7WvjReCEJ1glKt6VgR91W-phGHGYuj_14tzss6b6qGEpoK6UpKy4Gk2I-Ng/s1600/2.JPG" height="332" width="400" /></a></li>
<li>Select 'Configure SQL Sever for application services' and click Next.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFtKkqCX_M-RVZhBJvgLSQ8RL6ZJXjd7u5AiZIJyQGjvft1IzDbeV1CrDj-vw_4xGWCJzUqdytKVhQhlcvlFrxPUru4NyqM3insIgQnnZUsPyFGFg1NzYOlLdwEx2zL4HkfEZ8jJ4Z7Y/s1600/3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFtKkqCX_M-RVZhBJvgLSQ8RL6ZJXjd7u5AiZIJyQGjvft1IzDbeV1CrDj-vw_4xGWCJzUqdytKVhQhlcvlFrxPUru4NyqM3insIgQnnZUsPyFGFg1NzYOlLdwEx2zL4HkfEZ8jJ4Z7Y/s1600/3.JPG" height="286" width="400" /></a></li>
<li>Provide the SQL Server name where you would like to create this database. Then provide the Database Name and click Next.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEslcgRNLaHABxuSnxp4YuWoEUD3X9XEQzSmbyOOON6XwuFaDxLyJnaYbg-gARUnMffrQ5wwwDsWEb3tdyWB30ZCTZILdu-U2WFWJXKG9P6e8V4tPVAmSyX5kZ4hJKDJySJh3VzuPvJKE/s1600/4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEslcgRNLaHABxuSnxp4YuWoEUD3X9XEQzSmbyOOON6XwuFaDxLyJnaYbg-gARUnMffrQ5wwwDsWEb3tdyWB30ZCTZILdu-U2WFWJXKG9P6e8V4tPVAmSyX5kZ4hJKDJySJh3VzuPvJKE/s1600/4.JPG" height="315" width="400" /></a></li>
<li>Verify the SQL Server name, new Database Name and click Next.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPg5TxWUy7d2JmCXYpKlxpayBUbEW0uJcW4IKvsaB4UT3koMy30Majz7z5oWBxwlRqdu_ynMRukH-HIwB0mvOYzlFKOnCU8fRERqkEHqV46rb_j1V_J31BCSPPcWXp6XC5Q7pmbS5Cutw/s1600/5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPg5TxWUy7d2JmCXYpKlxpayBUbEW0uJcW4IKvsaB4UT3koMy30Majz7z5oWBxwlRqdu_ynMRukH-HIwB0mvOYzlFKOnCU8fRERqkEHqV46rb_j1V_J31BCSPPcWXp6XC5Q7pmbS5Cutw/s1600/5.JPG" height="306" width="400" /></a></li>
<li>Now the new database needs to created in the SQL Server. Click Finish to close the window.<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOD8sUIvnaTYHPu4vPPgz6-bWrrY5cr3jKZ8tMs21OqJEJasVihXsKWZC9q2lwoUnZwcGQERl1kRC2xNScGToGqvry_FJeL0cUdanma81fc2PgpQ03BHht-hIprrMBmg283PUuArGQxw/s1600/6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOD8sUIvnaTYHPu4vPPgz6-bWrrY5cr3jKZ8tMs21OqJEJasVihXsKWZC9q2lwoUnZwcGQERl1kRC2xNScGToGqvry_FJeL0cUdanma81fc2PgpQ03BHht-hIprrMBmg283PUuArGQxw/s1600/6.JPG" height="307" width="400" /></a></li>
<li>Now open SQL management Studio, then connect to the SQL server to verify the New database and the tables.</li>
<li><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEIuoubKBuybBrnxtGRFfCPyarCKFTwz2ugS2Y59EmoYNBhpOQ7cAT00Rpo3iolOvYH4nb99_E7c4ory4l0FE8X2t-YDINRS0MEPBlDdJKx6u4qISlBvasjXxjDcF1QvzbN43Y7RX5xls/s1600/7.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEIuoubKBuybBrnxtGRFfCPyarCKFTwz2ugS2Y59EmoYNBhpOQ7cAT00Rpo3iolOvYH4nb99_E7c4ory4l0FE8X2t-YDINRS0MEPBlDdJKx6u4qISlBvasjXxjDcF1QvzbN43Y7RX5xls/s1600/7.JPG" height="400" width="383" /></a></li>
<li>Expand the New Database -> Expand Security -> Right click on Users to Create a New User -> Add the application pool account of web application as log-in name and select all the <b>_Full Access</b> schemas from <b>Owned Schemas</b> section. See the below screenshot for reference.</li>
</ul>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWoWiefu1RTqkePaTPIRd9X-pcnQ_1rp4ReBBd-nnp639BmU8jJqoAExFJ07Z9umYUiIDf-shvcOgIqOFWPID37_250ExO-Jnhd4hyphenhyphen71XYc_8UlVI5MjfphenWbDSkR3xQHf12jVcn4u4/s1600/26.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWoWiefu1RTqkePaTPIRd9X-pcnQ_1rp4ReBBd-nnp639BmU8jJqoAExFJ07Z9umYUiIDf-shvcOgIqOFWPID37_250ExO-Jnhd4hyphenhyphen71XYc_8UlVI5MjfphenWbDSkR3xQHf12jVcn4u4/s400/26.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br />
<br /></div>
<div>
Now membership database has been configured to store External Users information. So we need to register external users which will stored in this database.</div>
<div>
<br /></div>
<div style="text-align: justify;">
At this point there is no external user created yet in the above ASP.Net membership database. Codeplex provides solutions for registering users, changing passwords and password recovery in the ASP.net membership database. Please download the SharePoint 2013 FBA Pack and deploy the WSP file into the web application where your site collection resides. </div>
<div style="text-align: justify;">
<br /></div>
<div>
<b>SharePoint 2013 FBA Pack link: </b><span style="color: blue;">https://sharepoint2013fba.codeplex.com/</span></div>
<div>
<br />
<span style="color: #741b47;">Step 1: Download the package and find out the WSP file(visigo.sharepoint.formsbasedauthentication.wsp).</span><br />
<span style="color: #741b47;">Step 2: Add the solution file using below PS command.</span><br />
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;">Add-SPSolution -LiteralPath e:\downloads\visigo.sharepoint.formsbasedauthentication.wsp</span><br />
<span style="color: #741b47;"><br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WhVMLp_Qg-p-vEvJeKMmjW3Lb5nQubkiGiTHdQ6taQ5187mnDYMnD9ANyLBmDdBMADxvvUNpSPu5hHj09W160sa77hx5_rga7DiEjNN5UtGCdx9ShXMDZkAM8GTEsOFfYGGwqi-Lk7A/s1600/25.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><span style="color: #741b47;"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WhVMLp_Qg-p-vEvJeKMmjW3Lb5nQubkiGiTHdQ6taQ5187mnDYMnD9ANyLBmDdBMADxvvUNpSPu5hHj09W160sa77hx5_rga7DiEjNN5UtGCdx9ShXMDZkAM8GTEsOFfYGGwqi-Lk7A/s400/25.JPG" width="400" /></span></a><br />
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;"><br /></span>
<span style="color: #741b47;">Step 3: Go to Central Administration Site -> System Settings -> Solutions Management -> Select the solution file and deploy to the web application where your site collection resides.</span><br />
<br />
Once solution is deployed you can able to see it in Solution management as below.</div>
<div>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhviLMLKXlA-ARSleGCEuvTyXir93osPZ_1bnD_z8O2N7tRSKzdBfEBEdFtDhfAqi-YMny9GbnSKlVVrUZSmoAVemchJCVuOUNce36_OnwixEJk7muHyFv2gGoudmutCoxekR-8g7NS2Kg/s1600/17.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhviLMLKXlA-ARSleGCEuvTyXir93osPZ_1bnD_z8O2N7tRSKzdBfEBEdFtDhfAqi-YMny9GbnSKlVVrUZSmoAVemchJCVuOUNce36_OnwixEJk7muHyFv2gGoudmutCoxekR-8g7NS2Kg/s400/17.JPG" width="400" /></a><br />
<br />
<span style="text-align: center;">Once the solution gets deployed, Site Collection Administrator needs to activate the <b>Forms Based Authentication Management</b> feature in Site Collection features page. </span><br />
<span style="text-align: center;"><br /></span>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7rJMeXlcfYQpUi5HA66ma54FcjQ_B3-76NvMLzahlR_w9lirgCvSvLrlPS5gRrinVwVRGH6P0QVhpyHPmWyZawPs8ZgpCEhfMb12r3rcdi7-ZlZOARphyphenhyphenpX5MtYw98CZtor943dLsSGc/s1600/19.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7rJMeXlcfYQpUi5HA66ma54FcjQ_B3-76NvMLzahlR_w9lirgCvSvLrlPS5gRrinVwVRGH6P0QVhpyHPmWyZawPs8ZgpCEhfMb12r3rcdi7-ZlZOARphyphenhyphenpX5MtYw98CZtor943dLsSGc/s400/19.JPG" width="400" /></a><br />
<span style="text-align: center;"><br /></span>
<span style="text-align: center;">Then Site Collection Admin can see the below links in the site collection settings page to manage users.</span><br />
<span style="text-align: center;"><b>Note</b>: These features will be only available to </span><span style="text-align: center;">Site Collection Administrator to manage them.</span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmzKvCUgKZ-u5QpZ3sGiGPD0Tm6IdTwRoS10eFdAsmGVHkd63sSRGqKO4cz8bNmXFOWMBnNzy6O9ShPDmv-kdx524fuH59LEajHi5roOGs7Zt6YJYsqjqj4fwycfrGU8zTWMnF3IVJU0/s1600/20.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmzKvCUgKZ-u5QpZ3sGiGPD0Tm6IdTwRoS10eFdAsmGVHkd63sSRGqKO4cz8bNmXFOWMBnNzy6O9ShPDmv-kdx524fuH59LEajHi5roOGs7Zt6YJYsqjqj4fwycfrGU8zTWMnF3IVJU0/s400/20.JPG" width="400" /></a><br />
<br />
<span style="text-align: center;">Now Site Collection Administrator</span><span style="text-align: center;"> can register external users,to do that </span>click FBA User Management -> Create User -> Provide the detailed information with User ID, Password.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRAQNtCUVC1jlhWIftv-iLq0wt1xmKPzB2XuJqXE1LIRJJ2Er286WvKoBSYOJS79oTLnE0wCfb8bEgTj4qwP8gmIQAX1mbH1hGlH8F5TBnigWP9GjZkO1ZSgbwYlMezcQ1Lz8uFQsHNg/s1600/24.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJRAQNtCUVC1jlhWIftv-iLq0wt1xmKPzB2XuJqXE1LIRJJ2Er286WvKoBSYOJS79oTLnE0wCfb8bEgTj4qwP8gmIQAX1mbH1hGlH8F5TBnigWP9GjZkO1ZSgbwYlMezcQ1Lz8uFQsHNg/s400/24.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Once the user got created successfully, Site collection admin can see the user details as below.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_iDEDkwZZ3XLRLsYU8FS1FWdnp0lloHMJTz3E2U6176sRlcwivRwQMeBsD5fgUd4y7CE9P4m_dj2o63-8uEHd5CmJNEVk170zRe27vIBIcMCeAuvGqEEnRIRPpfYn5CepXlUGWePaoFI/s1600/21.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_iDEDkwZZ3XLRLsYU8FS1FWdnp0lloHMJTz3E2U6176sRlcwivRwQMeBsD5fgUd4y7CE9P4m_dj2o63-8uEHd5CmJNEVk170zRe27vIBIcMCeAuvGqEEnRIRPpfYn5CepXlUGWePaoFI/s400/21.JPG" width="400" /></a><br />
<br />
You can also verify the same in the membership database as below that one row has been added to aspnet_Users table.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqAU33trKom9RdkXVvDWgy6k8sZqVInQCHc76-XYyUvIrgnAPiwARJ0X0Zb7bKSCLAz3S3654Ku98VLc1zjlq2e96vnA9LWTbtol5rUDcII1WZOsDVCXeJYgNRQRTEZ70P8xEZYjrWFI/s1600/18.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdqAU33trKom9RdkXVvDWgy6k8sZqVInQCHc76-XYyUvIrgnAPiwARJ0X0Zb7bKSCLAz3S3654Ku98VLc1zjlq2e96vnA9LWTbtol5rUDcII1WZOsDVCXeJYgNRQRTEZ70P8xEZYjrWFI/s400/18.JPG" width="400" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;">Now go to Central Administration site -> Manage Web Applications -> select an web application where your site collection resides -> Click on Authentication Provider -> Click Default Zone -> Select </span><label for="ctl00_PlaceHolderMain_IdentityProviderSettingSection_ctl01_ChkAspMembershipAuth" style="text-align: left;">Enable
Forms Based Authentication (FBA) and Write </label><span id="ctl00_PlaceHolderMain_IdentityProviderSettingSection_ctl01_ctl09_LiteralLabelText" style="text-align: left;">"FBA_SQL_MembershipProvider" for ASP.NET
Membership provider name and write "FBA_SQL_RoleProvider" for </span><span id="ctl00_PlaceHolderMain_IdentityProviderSettingSection_ctl01_ctl10_LiteralLabelText" style="text-align: left;">ASP.NET
Role manager name. See below screenshot for reference.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;"></span></div>
<ul>
<li><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIATYK8JMVFHosgL-B-7oADRDsvQ1y8_2EzqqToavm1wYqbY0k9LlFT5YdIuTMZ5aFmJVUwihcbtEwA18hLpGSLmXKLGYyvngpIvImU_SPuLB22fEX2QlqvVlDd-14YkmKhIoU6ZHN2Do/s1600/12.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIATYK8JMVFHosgL-B-7oADRDsvQ1y8_2EzqqToavm1wYqbY0k9LlFT5YdIuTMZ5aFmJVUwihcbtEwA18hLpGSLmXKLGYyvngpIvImU_SPuLB22fEX2QlqvVlDd-14YkmKhIoU6ZHN2Do/s400/12.JPG" width="400" /></a></li>
</ul>
</div>
<ol style="text-align: left;">
</ol>
<ul style="text-align: left;">
<li>Now you need to add the <b><span style="color: #cc0000;">SQL Connection String</span></b>,<span style="color: #cc0000;"> </span><b><span style="color: #cc0000;">People Picker Wildcards entry</span></b>, <b><span style="color: #cc0000;">ASP.Net Membership Provider</span></b> and <b><span style="color: #cc0000;">ASP.Net Role Manager</span></b> entries to below 3 web config files.Please follow the below screenshots with entries of each part to web.config files.</li>
</ul>
<ol style="text-align: left;">
<li>Web Application Web.Config file(in WFE servers)</li>
<li>Central Admin Web App Web.Config file(in CA hosted server)</li>
<li>Security Token Service Web.Config file (located in 15 hive folder\WebServices\SecurityToken\web.config) - in in both WFE servers and Application Servers</li>
</ol>
<div>
<ul style="text-align: left;">
<li><b> <span style="color: #cc0000;">SQL Connection String </span></b><span style="color: #cc0000;">Entry<b>:</b></span></li>
</ul>
</div>
<div>
<div>
<span style="color: blue;"> <connectionStrings></span></div>
<div>
<span style="color: blue;"> <add name="<b>fbaSQLConnection</b>" connectionString="server=WIN-5KDVOHD7F4P\SHAREPOINT;database=FBA_ExternalUsers;Trusted_Connection=true" /></span></div>
<div>
<span style="color: blue;"> </connectionStrings></span></div>
<div>
<br /></div>
<div>
Screenshot for reference:</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrNz3FlZ7wMMuvcBBmqI-AdL0Zpiw6dKYFEsQ-WVOFQ7EbWStf-1kjkZuIkCa5aYuB0wR977sMyCMtdui4szcpFOcweG55lMdCuUoks64Ra21umM0aJNsXcgeLMZosPvdzbzGXjMmbaII/s1600/9.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrNz3FlZ7wMMuvcBBmqI-AdL0Zpiw6dKYFEsQ-WVOFQ7EbWStf-1kjkZuIkCa5aYuB0wR977sMyCMtdui4szcpFOcweG55lMdCuUoks64Ra21umM0aJNsXcgeLMZosPvdzbzGXjMmbaII/s1600/9.JPG" height="62" width="400" /></a><br />
<br /></div>
<div>
<ul style="text-align: left;">
<li><span style="color: #cc0000;"><b>People Picker Wildcards </b>Entry:</span></li>
</ul>
<div>
<div>
<b style="color: #cc0000;"> </b><span style="color: blue;"><PeoplePickerWildcards></span></div>
<div>
<span style="color: blue;"> <clear /></span></div>
<div>
<span style="color: blue;"> <b><add key="</b></span><b><span style="color: blue;">FBA_SQL_MembershipProvider</span><span style="color: blue;">" value="%" /></span></b></div>
<div>
<span style="color: blue;"> </PeoplePickerWildcards></span></div>
</div>
<ul style="text-align: left;">
<li><span style="color: #cc0000;"><b>ASP.Net Membership Provider</b><b> </b>Entry<b>:</b></span></li>
</ul>
</div>
</div>
<div>
<div>
<ul style="text-align: left;"><span style="color: blue;"><add connectionStringName="fbaSQLConnection" applicationName="/" name="<b>FBA_SQL_MembershipProvider</b>" </span><br />
<span style="color: blue;"> type="System.Web.Security.SqlMembershipProvider, System.Web,Version=2.0.3600.0, </span><br />
<span style="color: blue;"> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></span><br />
<span style="color: blue;"><br /></span>
<li><span style="color: #cc0000;"><b>ASP.Net Role Manager</b><b> </b>Entry<b>:</b></span></li>
</ul>
</div>
</div>
<div>
<div>
<span style="color: blue;"> <add connectionStringName="fbaSQLConnection" applicationName="/" name="<b>FBA_SQL_RoleProvider</b>" </span><br />
<span style="color: blue;"> type="System.Web.Security.SqlRoleProvider, System.Web,Version=2.0.3600.0, </span><br />
<span style="color: blue;"> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></span></div>
<div>
<br /></div>
<div>
Screenshot for reference:</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhic9vPctBVhnt_IJFgacdabq1bWMIsMtr2ypl5j-CtaFajjtoUfQtOzfMQym_5MY7_AROhzf6U8pcDtrt6xDTHisQ5LzNWqjSW_ke0dMnkjaS3ccFAiZ4f2mquG00q9wk_CnqbW8yey_E/s1600/10.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhic9vPctBVhnt_IJFgacdabq1bWMIsMtr2ypl5j-CtaFajjtoUfQtOzfMQym_5MY7_AROhzf6U8pcDtrt6xDTHisQ5LzNWqjSW_ke0dMnkjaS3ccFAiZ4f2mquG00q9wk_CnqbW8yey_E/s1600/10.JPG" height="129" width="400" /></a><br />
<br />
Now Administrator can inform to External Business User and provide her the User ID and Password to login to the SharePoint Portal. Later on external user can change her password.<br />
<br />
External User can browse the portal where she will find two option and she needs select Forms Authentication to login to portal.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71KECW2sNNqa4k3DnusAM2SAAQ8HQBTf_33akTNZ8GeoAyjn3uBtLY0VwLxl_ZLlav51fs3vWt5gn61_zTTX68VGBe5sToJ2ZI1kZs6k_moZatkeulX0ZX-8ZSVKRjoTY8KG5BQRoJfA/s1600/15.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71KECW2sNNqa4k3DnusAM2SAAQ8HQBTf_33akTNZ8GeoAyjn3uBtLY0VwLxl_ZLlav51fs3vWt5gn61_zTTX68VGBe5sToJ2ZI1kZs6k_moZatkeulX0ZX-8ZSVKRjoTY8KG5BQRoJfA/s400/15.jpg" width="400" /></a><br />
<br />
Select Forms Authentication and input the user id and password.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7GurJVyAcKrBB0kK8xheOeo5pGcPPsd91OBjW9XP_ibcV0lxX5BRLWojNplAM0t-lfu6bxFfMqXEEyo_CuMMIc3O5cHPOdD_KbtLKbXlpOoDLTVoCT88vrZgcx8RWOOWWHHHa8NcwIeY/s1600/22.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7GurJVyAcKrBB0kK8xheOeo5pGcPPsd91OBjW9XP_ibcV0lxX5BRLWojNplAM0t-lfu6bxFfMqXEEyo_CuMMIc3O5cHPOdD_KbtLKbXlpOoDLTVoCT88vrZgcx8RWOOWWHHHa8NcwIeY/s400/22.JPG" width="400" /></a><br />
<br />
Now you can able to see the portal with External User logged in credentials.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWf6U8PV9DUXXC1dLSyO8qvstErfTgTIu2WsEZ33JXBoc6a-w0xXMm2YuHnZ7DsfOMt98dEeEoqjN4TwdsJ8bNeWY4Q9Cgr3hSePD7KEi0U3uNYsEuOAqla1QsPZ2GqJ7xv4P_42LaWUw/s1600/23.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWf6U8PV9DUXXC1dLSyO8qvstErfTgTIu2WsEZ33JXBoc6a-w0xXMm2YuHnZ7DsfOMt98dEeEoqjN4TwdsJ8bNeWY4Q9Cgr3hSePD7KEi0U3uNYsEuOAqla1QsPZ2GqJ7xv4P_42LaWUw/s400/23.JPG" width="400" /></a><br />
<br />
If you see the my settings of the logged in user, you find the account information as below. You can also find this user in the People Picker Control while providing permission to any SharePoint list/library/group.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1RGVHf0WHFDaXxH-Fc5qawFs_6Lf3F7cZWUNznYwP3yv2O3-XHaDAHxW5u1LhXflFx40Hu7Ftvyj4LZM4qVaImayujvmt1N6DxRtRHazDgO9MrpRzLVbvsRCH8tw7oJQ4Ake2qLev__o/s1600/27.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1RGVHf0WHFDaXxH-Fc5qawFs_6Lf3F7cZWUNznYwP3yv2O3-XHaDAHxW5u1LhXflFx40Hu7Ftvyj4LZM4qVaImayujvmt1N6DxRtRHazDgO9MrpRzLVbvsRCH8tw7oJQ4Ake2qLev__o/s1600/27.JPG" height="305" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
That's all :) </div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCGARBgcEM-i1OkHTci6iBB5cl6ORnTvHBrficsyL8feHUg5El8Cs1jurxT0u1v-777Pwo5UcREHu4RyNZV-wfL9B8mJxCHQEv0kybQBlCp2GOQUE1uwvwg3bjVNgOQRYrJUWwLxt8css/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><br />
</a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCGARBgcEM-i1OkHTci6iBB5cl6ORnTvHBrficsyL8feHUg5El8Cs1jurxT0u1v-777Pwo5UcREHu4RyNZV-wfL9B8mJxCHQEv0kybQBlCp2GOQUE1uwvwg3bjVNgOQRYrJUWwLxt8css/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><br />
</a></div>
</div>
Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-4832270494158440242011-11-15T22:47:00.000-08:002011-11-15T22:47:02.568-08:00Avoid checked out issue while drag and drop multiple documents using Explorer View<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoPlainText" style="margin: 0in 0in 0pt;">
<span style="color: navy; font-family: 'Verdana','sans-serif'; font-size: 10pt;">When multiple files are dragged and dropped into SharePoint using explorer view, all files are shown as checked out in SharePoint even though check-in/check-out are not required on document library. </span></div>
<div class="MsoPlainText" style="margin: 0in 0in 0pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<b><span style="color: #00b050; font-family: 'Verdana','sans-serif'; font-size: 10pt;">Solution:</span></b><span style="color: navy; font-family: 'Verdana','sans-serif'; font-size: 10pt;"> Enable content type at document library level and make the Title column as optional for the content type document. Then try to upload the multiple documents using explorer view. It will work fine as expected.</span></div>
</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-2159512074549593482011-11-09T00:59:00.000-08:002011-11-09T00:59:04.632-08:00Enable Web folders in SharePoint Explorer View<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<u><span style="color: #17365d; font-family: 'Verdana','sans-serif'; font-size: 8pt; line-height: 115%; mso-themecolor: text2; mso-themeshade: 191;">Some of the below points you should aware if web folder is not working properly in your SharePoint site.</span></u></div>
<div class="MsoListParagraph" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;">
<span style="color: #1f497d; font-family: Symbol; font-size: 10pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-themecolor: text2;"><span style="mso-list: Ignore;"><img alt="*" height="11px" src="file:///C:/DOCUME~1/ss87613/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif" width="11px" /><span style="font: 7pt 'Times New Roman';"> </span></span></span><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">When you try to access an Explorer View page on Windows Server 2003, you will sometimes receive the following error: <i style="mso-bidi-font-style: normal;">“Explorer View requires Internet Explorer 5.0 or greater and Web Folders.”</i></span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">This is typically caused by the fact that Windows Server 2003 does not include Web Folders (FPRPC) technology and, by default, the Web Client Service is disabled. </span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt; text-align: justify; text-indent: 0.5in;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">You can resolve this in one of two ways:</span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">1. Install Microsoft Office 2003 or FrontPage on the server. Office 2003 and FrontPage install Web Folders components which will then allow you to access the Explorer View using FPRPC.</span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">2. Enable the Web Client Service on the server. </span><i style="mso-bidi-font-style: normal;"><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 8pt; line-height: 115%; mso-themecolor: text2;">(We have tested in our production which did not work out)</span></i></div>
<div class="MsoListParagraph" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;">
<span style="color: #1f497d; font-family: Symbol; font-size: 10pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-themecolor: text2;"><span style="mso-list: Ignore;"><img alt="*" height="11px" src="file:///C:/DOCUME~1/ss87613/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif" width="11px" /><span style="font: 7pt 'Times New Roman';"> </span></span></span><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">If anybody out there has been building demo machines on Windows Server 2008 or Windows Server 2003 you will have run into this issue at some point. Explorer View does not work on document libraries, nor can you map a network drive to a SharePoint site.</span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">Solution: <span style="mso-spacerun: yes;"> </span>The server platforms effectively don't like web folder views until you install the fix KB907306. That fixes works for both Windows 2003 and 2008.</span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in; text-align: justify;">
<span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">Now you can happily map a SharePoint site to your network places and use the Windows Explorer to browse the SharePoint sites.</span></div>
<div class="MsoListParagraph" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -0.25in;">
<span style="color: #1f497d; font-family: Symbol; font-size: 10pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-themecolor: text2;"><span style="mso-list: Ignore;"><img alt="*" height="11px" src="file:///C:/DOCUME~1/ss87613/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.gif" width="11px" /><span style="font: 7pt 'Times New Roman';"> </span></span></span><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">It does not seem to be the problem with an internet explorer. When you attempt to way in an Explorer View page on Windows 7 then you must receive the following error: “Explorer View requires Internet Explorer 5.0 or greater and Web Folders.” Actually this issue comes when your operating system does not include the Web Folders (FPRPC) technology and this service is disabled by default on client machine. To solve this problem, you just need to install the FrontPage on the server then you may try doing the same thing.</span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;">Reference Link:</span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in;">
<a href="http://forums.techarena.in/operating-systems/1367884.htm"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">http://forums.techarena.in/operating-systems/1367884.htm</span></a><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;"> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in;">
<a href="http://office.microsoft.com/en-us/windows-sharepoint-services-help/copying-or-moving-sharepoint-document-libraries-HA001154465.aspx"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">http://office.microsoft.com/en-us/windows-sharepoint-services-help/copying-or-moving-sharepoint-document-libraries-HA001154465.aspx</span></a><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;"> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in;">
<a href="http://mctalex.blogspot.com/2009/05/explorer-view-in-windows-2008-and-2003.html"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"><span style="color: purple;">http://mctalex.blogspot.com/2009/05/explorer-view-in-windows-2008-and-2003.html</span></span></a><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;"> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt 0.5in;">
<a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15123"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15123</span></a><span style="color: #1f497d; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%; mso-themecolor: text2;"><span style="mso-spacerun: yes;"> </span></span></div>
</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-90469763022940280282011-09-08T23:31:00.000-07:002011-09-08T23:31:15.201-07:00Tips: Unexpected issue in the out-of-box functionality of SharePoint site<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: black; font-family: Tahoma; font-size: x-small;"><span dir="ltr" style="font-size: 10pt;"> <div class="divExp" id="divExp">
<div _fallwcm="1" class="bdyItmPrt" id="divBdy">
<div>
<div>
<div dir="ltr">
<div style="margin-bottom: 0px; margin-top: 0px;">
One interesting issue !</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
Suppose just before yesterday you checked that your SharePoint site was working fine, but today you start getting unexpected issue in the out-of-box functionality of SharePoint site( like displaying All Items data, Deleting List Item/Library or Creating View etc.), Then you might thought that without any changes how can the issue arise. Yes you are right, but do you regularly verify the content database size of the site collection. Yes, those unexpected error comes whenever the Content DB has no free space to use. Now it's your task to increase the Content DB size.</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
I got below error while displaying All Items data for a library.</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
<span style="color: red;"><---Render Method ----!></span></div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
Then I verify the event Viewer where I got the error that TempDB is expecting some space to do the SharePoint transactions(whether displaying data, creating or deleting items etc).</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
</div>
<div style="margin-bottom: 0px; margin-top: 0px;">
-Samarendra swain</div>
</div>
</div>
</div>
</div>
</div>
</span></span></div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-60370383875552978892011-04-08T13:05:00.000-07:002011-04-08T13:27:04.420-07:00SharePoint 2010 : Display new form, edit form and display form of a list/Library in full page instead of in dialog box.<div dir="ltr" style="text-align: left;" trbidi="on">
Go through the below steps to achive the same.<br />
<ul style="text-align: left;">
<li>Open the List/Library.</li>
<li>Go to settings of the list/library.</li>
<li>Go to advanced settings.</li>
<li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">Select 'No' in Dialogs section like below screen shot.</li>
</ul>
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdFZTFGfrraWDNhPRrYGNwLvz7IC73RRwNIaOEn-g_HygNrDIJSoibRNH-lQkgdacOKSiMTDkouKxqQXR-_D-JtvXz4K7WcRpHKCZnS-fCC0XGrind7qALLt6HUAqF_lAFYND8S1VFCI/s1600/dialog.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="62" r6="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdFZTFGfrraWDNhPRrYGNwLvz7IC73RRwNIaOEn-g_HygNrDIJSoibRNH-lQkgdacOKSiMTDkouKxqQXR-_D-JtvXz4K7WcRpHKCZnS-fCC0XGrind7qALLt6HUAqF_lAFYND8S1VFCI/s320/dialog.png" width="320" /></a></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
Now check the New form, Edit form and Display form for that list/library. You will able to see the forms in full page instead of dialog, like below screen shot.</div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG1xNvwIXW2fufqR77XtCtKG_tAQjoYvP5WLXeQWMpGB9Th9rHHyj4dUoZ0-nCIQJZ2PGS0bLaKk0yLZ4RFAYMhSeXwgQdCZuVsH_07VsukUOHj_nqQG5DK63GyyprOAoC9Fhg6wYW5fQ/s1600/1.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="89" r6="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG1xNvwIXW2fufqR77XtCtKG_tAQjoYvP5WLXeQWMpGB9Th9rHHyj4dUoZ0-nCIQJZ2PGS0bLaKk0yLZ4RFAYMhSeXwgQdCZuVsH_07VsukUOHj_nqQG5DK63GyyprOAoC9Fhg6wYW5fQ/s320/1.png" width="320" /></a></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
Enjoy !</div>
</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com1tag:blogger.com,1999:blog-1440128450924740840.post-32284852034421231092011-02-17T23:20:00.000-08:002011-02-17T23:20:16.606-08:00Remove ’s while exporting excel file using RenderControl method of GridView or DataGrid or DataList control.<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Calibri;"><span style="color: #c00000;">Example:</span><span style="color: black;"> ‘Employee’s home’ was coming like ‘Employee</span><span style="color: #e36c0a; mso-themecolor: accent6; mso-themeshade: 191;">’s</span><span style="color: black;"> home</span>’ while exporting to excel file where it should come like the original one.</span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Calibri;">Code Snippet:</span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: Calibri;">Function <span style="mso-spacerun: yes;"> </span>ExportToExcel( GridView <span style="mso-spacerun: yes;"> </span>gv)</span></i></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: Calibri;">{</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;">HttpContext.Current.Response.Clear();</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>HttpContext.Current.Response.AddHeader(<span style="color: maroon;">"content-disposition"</span>, <span style="color: blue;">string</span>.Format(<span style="color: maroon;">"attachment; filename={0}"</span>, <span style="color: maroon;">"Test.xls"</span>));</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>HttpContext.Current.Response.ContentType = <span style="color: maroon;">"application/ms-excel"</span>;</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>System.IO.<span style="color: teal;">StringWriter</span> oStringWriter = <span style="color: blue;">new</span> System.IO.<span style="color: teal;">StringWriter</span>();</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>System.Web.UI.HtmlTextWriter oHtmlTextWriter = <span style="color: blue;">new</span> System.Web.UI.HtmlTextWriter(oStringWriter);</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span></span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>gv.RenderControl(oHtmlTextWriter);</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"> <span style="color: red;"><strong>// add the below marked line to fix that issue</strong></span></span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 14pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><b style="mso-bidi-font-weight: normal;"><span style="color: #c00000;"><span style="mso-spacerun: yes;"> </span><span style="font-size: small;">HttpContext.Current.Response.ContentEncoding = </span></span><span style="font-size: small;"><span style="color: #00b050;">Encoding.GetEncoding("Windows-1252");</span><span style="color: #c00000;"></span></span></b></span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>HttpContext.Current.Response.Write(strHeading + oStringWriter.ToString());</span></i></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>HttpContext.Current.Response.End();</span></i></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<i style="mso-bidi-font-style: normal;"><span style="font-family: 'Courier New'; font-size: 10pt; line-height: 115%; mso-no-proof: yes;">}</span></i></div>
</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-22133292191130500122010-10-05T08:26:00.000-07:002010-10-05T08:29:05.501-07:00Sign-in as different user using windows authentication in SharePointYou can add an hyperlink to your page and href value should be '/_layouts/AccessDenied.aspx?loginasanotheruser=true'. Please see the below example.<br />
<br />
<strong><a href='/_layouts/AccessDenied.aspx?loginasanotheruser=true' >Sign in as different user</a></strong><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5hn6WxH_-UA8sUEEMheqOgB1gDjPyn7FUUo6Wpr9iqO6D7bxD6S8fiuaEDg6gXdH0r3txZHtvQeNOje3XJpffpPaCwInXD60RzcAaoXBBBdD2n6KJKnLlcIz0o2dWHuLAndQ9RB5qShg/s1600/loginWindow.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5hn6WxH_-UA8sUEEMheqOgB1gDjPyn7FUUo6Wpr9iqO6D7bxD6S8fiuaEDg6gXdH0r3txZHtvQeNOje3XJpffpPaCwInXD60RzcAaoXBBBdD2n6KJKnLlcIz0o2dWHuLAndQ9RB5qShg/s400/loginWindow.JPG" width="400" /></a></div>
Check it out and let me know.Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com4tag:blogger.com,1999:blog-1440128450924740840.post-88778070914159246942010-09-15T08:54:00.000-07:002010-09-15T08:54:04.794-07:00How to open a .TIF file in SharePoint site ?<span style="font-family: 'Verdana','sans-serif';">Normally if you upload a .TIF file to a document library and try to open that, it shows the dialogue box where you will see 'Find' option instead opening the file. For that you have to do some minor setting in your computer.</span><br />
<br />
<span style="font-family: 'Verdana','sans-serif';">Step 1: Select any .TIF file and right-click and select 'open with' option.</span><br />
<br />
<span style="font-family: 'Verdana','sans-serif';">Step 2: Select Windows Picture and Fax Viewer.</span><br />
<br />
<span style="font-family: 'Verdana','sans-serif';">Step 3: Select the checkbox for opening this kind of programs always.</span><br />
<br />
<span style="font-family: 'Verdana','sans-serif';">Step 4: Click OK.</span><br />
<br />
<span style="font-family: 'Verdana','sans-serif';">Step 5: Open that .TIF file from SharePoint site, you can able to see that.</span><br />
<br />
Image:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihXnQ4riRqDijrbgMa5oILptL8lIMWEX5miU4HPrfa5DPxw-tKiUgbXzCPX_LKnC7r4BLqWWJ6PBTxpnNnP_8VSRzG899CPkhLA2V0MRM9b8pB2WPoOYdo2o0RRsG0YWDogRaYFKQ2y2I/s1600/TIF.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="385" qx="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihXnQ4riRqDijrbgMa5oILptL8lIMWEX5miU4HPrfa5DPxw-tKiUgbXzCPX_LKnC7r4BLqWWJ6PBTxpnNnP_8VSRzG899CPkhLA2V0MRM9b8pB2WPoOYdo2o0RRsG0YWDogRaYFKQ2y2I/s640/TIF.JPG" width="640" /></a></div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-48480285281122128652010-08-25T07:36:00.000-07:002011-04-08T13:28:07.793-07:00Enable rating feature for Document library in SharePoint 2010<div dir="ltr" style="text-align: left;" trbidi="on">
Step 1: Go to the library settings of the document library.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVxoGhvYUYy1a1QpZNpNuOOkEbqvlLGTgI3YjFzZYnvi6_pD1sXVZhQVXZRAo8lkERwnxIZk22npWX694zbfh3OZRq0en2OfYskimVXKWCGTODJjZrV2NxI-IdIUNalb7t5dXQujpafxA/s1600/1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="135" ox="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVxoGhvYUYy1a1QpZNpNuOOkEbqvlLGTgI3YjFzZYnvi6_pD1sXVZhQVXZRAo8lkERwnxIZk22npWX694zbfh3OZRq0en2OfYskimVXKWCGTODJjZrV2NxI-IdIUNalb7t5dXQujpafxA/s400/1.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Step 2: Click on 'Rating Settings' link of the document library.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Zygw4tOgWGm_iuYmFjaIhzs0ppu5P6GeKla0ciH_-z-TmRFem3Ljp8t0qTXEQUJjk5efUU4yewzw82dumM5d09ivxsEeJ6JpPWt3LcAzBAkZXfTNIqHAi1wbMYAXcq9JPcxxlGmPEDA/s1600/2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="223" ox="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Zygw4tOgWGm_iuYmFjaIhzs0ppu5P6GeKla0ciH_-z-TmRFem3Ljp8t0qTXEQUJjk5efUU4yewzw82dumM5d09ivxsEeJ6JpPWt3LcAzBAkZXfTNIqHAi1wbMYAXcq9JPcxxlGmPEDA/s400/2.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Step 3: Click 'Yes' to enable rating feature for the document library.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirtlZsXnrIC2YurEBDAcL4RbdAaIz4LhlMYTjPQ8GCiJuEgjBEpSHGf2R8PZrMfD0QI7smkpnm4D2k8oukp8Ho3-Izn3l343lUGC6CY_iqrDKG7MEPnPSGYd3BCetK4V2JilFCDPJstf8/s1600/3.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="127" ox="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirtlZsXnrIC2YurEBDAcL4RbdAaIz4LhlMYTjPQ8GCiJuEgjBEpSHGf2R8PZrMfD0QI7smkpnm4D2k8oukp8Ho3-Izn3l343lUGC6CY_iqrDKG7MEPnPSGYd3BCetK4V2JilFCDPJstf8/s400/3.JPG" width="400" /></a></div>
</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com1tag:blogger.com,1999:blog-1440128450924740840.post-15558093662060716072010-04-20T03:26:00.000-07:002010-04-20T03:26:11.898-07:00Template ID of SharePoint Libraries and ListsT-ID Description <br>
100 Custom List<br>
1200 Administrator tasks list <br>
104 Announcements list <br>
303 Blog Categories list <br>
302 Blog Comments list <br>
301 Blog Posts list <br>
105 Contacts list <br>
120 Custom grid for a list <br>
118 Custom Workflow Process <br>
130 Data Connection library <br>
110 Data sources <br>
108 Discussion board <br>
101 Document library <br>
106 Events list <br>
150 Gantt Tasks list <br>
100 Generic list <br>
1100 Issue tracking <br>
103 Links list <br>
114 List template gallery <br>
116 Master pages gallery <br>
201 Meeting Agenda list <br>
202 Meeting Attendees list <br>
204 Meeting Decisions list <br>
207 Meeting Objectives list <br>
200 Meeting Series list <br>
210 Meeting text box <br>
211 Meeting Things To Bring list <br>
212 Meeting Workspace Pages list <br>
117 No-Code Workflows <br>
2002 Personal document library <br>
109 Picture library <br>
300 Portal Sites list <br>
2003 Private document library <br>
111 Site template gallery <br>
102 Survey <br>
107 Tasks list <br>
112 User Information list <br>
113 Web Part gallery <br>
119 Wiki Page library <br>
140 Workflow History <br>
115 XML Form library <br>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-90747748218356801572010-04-02T08:09:00.000-07:002010-04-02T08:09:31.791-07:00How many Site Groups can you create in a Site Collection ?<a href="http://technet.microsoft.com/en-us/library/cc287790.aspx">http://technet.microsoft.com/en-us/library/cc287790.aspx</a><br />
<br />
Read very carefully.Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-10487373505945787482010-03-30T06:43:00.000-07:002010-03-30T06:52:09.918-07:00Breakroleinheritance takes a long time to excute.This is an issue in SharePoint Service Pack 1 and hotfix is available here http://support.microsoft.com/kb/941422 <br />
<br />
<br />
<a href="http://support.microsoft.com/kb/941422">http://support.microsoft.com/kb/941422</a> <br />
<br />
Or you can upgrade to SharePoint SP 2.<br />
<br />Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-18032766216073580342010-02-22T06:40:00.000-08:002010-02-22T06:40:55.421-08:0070-541: Enumerate list items.[perform enabling permissions]using (SPSite spSite = new SPSite("http://testsite"))<br />
<br />
<br />
{<br />
<br />
using (SPWeb objWeb = spSite.OpenWeb())<br />
<br />
{<br />
<br />
SPUser objUser = objWeb.EnsureUser("manuhsolutions\\samarendra");<br />
<br />
SPList objLst = objWeb.Lists["ListName"];<br />
<br />
SPListItem lstItem = objLst.GetItemById(1);<br />
<br />
<br />
<br />
// break inheriting parent permissions for this List.<br />
<br />
lstItem.BreakRoleInheritance(false);<br />
<br />
<br />
<br />
// assign Role to the defined User<br />
<br />
SPRoleDefinitionCollection objWebRoleDefn = objWeb.RoleDefinitions;<br />
<br />
SPRoleAssignment objRoleAssign = new SPRoleAssignment(objUser);<br />
<br />
<br />
<br />
// change the name of the role definition to [Contribute]<br />
<br />
objRoleAssign.RoleDefinitionBindings.Add(objWebRoleDefn["Contribute"]);<br />
<br />
<br />
<br />
lstItem.RoleAssignments.Add(objRoleAssign);<br />
<br />
<br />
<br />
}<br />
<br />
}Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-85192508617318258372010-02-22T06:37:00.001-08:002011-04-08T13:37:13.072-07:0070-541: Change a user's permissions to edit a list.<div dir="ltr" style="text-align: left;" trbidi="on">
using (SPSite spSite = new SPSite("<a href="http://testsite/">http://testsite/</a>"))<br />
<br />
<br />
{<br />
<br />
using (SPWeb objWeb = spSite.OpenWeb())<br />
<br />
{<br />
<br />
SPUser objUser = objWeb.EnsureUser("manuhsolutions\\samarendra");<br />
<br />
SPList objLst = objWeb.Lists["ListName"];<br />
<br />
<br />
<br />
// break inheriting parent permissions for this List.<br />
<br />
objLst.BreakRoleInheritance(false);<br />
<br />
<br />
<br />
// assign Role to the defined User<br />
<br />
SPRoleDefinitionCollection objWebRoleDefn = objWeb.RoleDefinitions;<br />
<br />
SPRoleAssignment objRoleAssign = new SPRoleAssignment(objUser);<br />
<br />
<br />
<br />
// change the name of the role definition from [Limited Access] to [Full Control]<br />
<br />
objRoleAssign.RoleDefinitionBindings.Add(objWebRoleDefn["Full Control"]);<br />
<br />
<br />
<br />
objLst.RoleAssignments.Add(objRoleAssign);<br />
<br />
}<br />
<br />
}</div>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-41174329056993584162010-02-22T06:26:00.000-08:002010-02-22T06:26:03.787-08:0070-541: Remove a user from a site groupusing (SPSite spSite = new SPSite("http://testsite/"))<br />
<br />
<br />
{<br />
<br />
using (SPWeb objWeb = spSite.OpenWeb())<br />
<br />
{<br />
<br />
SPUser objUser = objWeb.EnsureUser("manuhsolutions/samarendra");<br />
<br />
SPGroup objGroup = objWeb.SiteGroups["Test Group Name"];<br />
<br />
objGroup.RemoveUser(objUser);<br />
<br />
}<br />
<br />
}Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-64624467868563687222010-02-22T06:23:00.000-08:002010-02-22T06:26:38.748-08:0070-541: Create a custom SPQuery object.using (SPSite spSite = new SPSite("<a href="http://testsite/">http://testsite/</a>"))<br />
<br />
<br />
{<br />
<br />
using (SPWeb objWeb = spSite.OpenWeb())<br />
<br />
{<br />
<br />
<br />
<br />
SPList objList = objWeb.GetList(objWeb.Url + "/Lists/" + "ListName");<br />
<br />
<br />
<br />
SPQuery query = new SPQuery();<br />
<br />
query.RowLimit = 10;<br />
<br />
query.Query = "<Where><Eq><FieldRef Name=\"Title\" /><Value Type=\"Text\">" + "Samarendra" + "</Value></Eq></Where>";<br />
<br />
SPListItemCollection itemColl = objList.GetItems(query);<br />
<br />
if (itemColl.Count > 0)<br />
<br />
{<br />
<br />
SPListItem lstItem = itemColl[0];<br />
<br />
}<br />
<br />
}<br />
<br />
}Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-91332190883720680272010-02-22T06:16:00.000-08:002010-02-22T06:26:56.752-08:0070-541: Add a user to a site groupusing (SPSite objSite= new SPSite("<a href="http://testsite/">http://testsite/</a>"))<br />
<br />
<br />
{<br />
<br />
using (SPWeb objWeb = objSite.OpenWeb())<br />
<br />
{<br />
<br />
SPUser objUser = objWeb.EnsureUser("manuhsolutions\\samarendra");<br />
<br />
SPGroup objGroup = objWeb.SiteGroups["Test Group Name"];<br />
<br />
objGroup.AddUser(objUser); <br />
<br />
} <br />
<br />
}Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-36998148692695256752010-02-10T21:44:00.000-08:002010-02-10T21:44:38.071-08:00How to increase the size limitation while you save site as template include content in MOSS 2007By using the STSADM command , you can maximize the size limitation while you wish to save site as template include the content.<br />
<br />
command:<br />
<strong>stsadm -o setproperty -pn max-template-document-size -pv 52428800</strong><br />
<br />
(<strong>52428800</strong> is in byte format which is equal to 50 Mega Byte)<br />
<br />
<br />
<br />
enjoy.......<br />Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-66681116822924209462010-02-05T05:17:00.000-08:002010-02-05T05:18:08.297-08:00Displaying alert message while saving a infopath form.You might have marked that, in each and every infopath form, there are two buttons 'save and close'. There might be requirement for displaying a alert message on the click event of the save button.<br />
<br />
To achive this , open the core.js file from this location \Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\INC and serach <strong>Toolbar.ExecuteAction</strong> and update the script by looking to the below script.<br />
<br />
.<br />
.<br />
.<br />
.<br />
.<br />
<em>Toolbar.ExecuteAction = function(strAction, objEvent)</em><br />
<em>{if (!BaseControl.CanHandleEvents())</em><br />
<em><br /></em><br />
<em>{return;}</em><br />
<em><br /></em><br />
<em>switch(strAction)</em><br />
<em><br /></em><br />
<em>{case ("refresh"):</em><br />
<em><br /></em><br />
<em>{if (document.forms[0] != null)</em><br />
<em><br /></em><br />
<em>{View_SubmitForm(false , 24, 0, false );}</em><br />
<em><br /></em><br />
<em>break;}</em><br />
<em><br /></em><br />
<em>case ("submit"):</em><br />
<em><br /></em><br />
<em>{if (View.PreSubmitActions())</em><br />
<em><br /></em><br />
<em>{EventLog_Add(</em><br />
<em><br /></em><br />
<em>9,</em><br />
<em><br /></em><br />
<em>null,</em><br />
<em><br /></em><br />
<em>"",</em><br />
<em><br /></em><br />
<em>"",</em><br />
<em><br /></em><br />
<em>"",</em><br />
<em><br /></em><br />
<em>true ,</em><br />
<em><br /></em><br />
<em>false ,</em><br />
<em><br /></em><br />
<em>false ,</em><br />
<em><br /></em><br />
<em>9,</em><br />
<em><br /></em><br />
<em>0);}</em><br />
<em><br /></em><br />
<em>break;}</em><br />
<em><br /></em><br />
<em>case ("view"):</em><br />
<em><br /></em><br />
<em>{;</em><br />
<em><br /></em><br />
<em>break;}</em><br />
<em><br /></em><br />
<em>case ("save"):</em><br />
<em><br /></em><br />
<em>{EventLog_Add(</em><br />
<em><br /></em><br />
<em>14,</em><br />
<em><br /></em><br />
<em>null,</em><br />
<em><br /></em><br />
<em>"",</em><br />
<em><br /></em><br />
<em>false,</em><br />
<em><br /></em><br />
<em>false,</em><br />
<em><br /></em><br />
<em>true ,</em><br />
<em><br /></em><br />
<em>false ,</em><br />
<em><br /></em><br />
<em>false ,</em><br />
<em><br /></em><br />
<em>10,</em><br />
<em><br /></em><br />
<em>0);<strong>alert('Data Saved Successfully');</strong></em><br />
<em><br /></em><br />
<em>break;}</em><br />
<em><br /></em><br />
<em>case ("saveAs"):</em><br />
<em><br /></em><br />
<em>{EventLog_Add(</em><br />
<em><br /></em><br />
<em>14,</em><br />
<br />
.<br />
.<br />
.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-72810274114463874432010-01-21T04:23:00.000-08:002010-01-21T04:26:03.729-08:00Renaming the menu items in SharePoint Site Libraries and Lists for a Specific SiteIn SharePoint document Library/List we find menu items like New, Uploads, Actions and Settings etc. At times there might be requirements to rename these menu items for a specific site. The following Javascript function can be used to achieve the objective. <br />
<br />
<br />
<br />
<br />
The code snippet shown below can be called from inside the specific SharePoint Page.<br />
<br />
e.g AllItems.aspx page inside a Document Library/List.<br />
<br />
This javascript function needs to be called on Page load event using _spBodyOnLoadFunctionNames.push method.<br />
<br />
<script language="javascript" type="text/javascript"><br />
<br />
_spBodyOnLoadFunctionNames.push("renameMenuItem('New', 'My New')");<br />
_spBodyOnLoadFunctionNames.push("renameMenuItem('Settings', 'My Settings')");<br />
<br />
function renameMenuItem(oldMenuItemName, newMenuItemName)<br />
{<br />
<br />
var vAnchorTag;<br />
<br />
var vAllAnchorTags = document.getElementsByTagName('a');<br />
if(oldMenuItemName.length!=0)<br />
<br />
{<br />
for (var j = 0; j < vAllAnchorTags.length; j++)<br />
<br />
{<br />
<br />
vAnchorTag = vAllAnchorTags[j];<br />
<br />
<br />
if (vAnchorTag.innerText.indexOf(oldMenuItemName)!=-1)<br />
<br />
{<br />
vAnchorTag.innerText = newMenuItemName;<br />
try<br />
<br />
{<br />
<br />
if(newMenuItemName.length != 0)<br />
<br />
{<br />
<br />
vAnchorTag.parentNode.previousSibling.firstChild.firstChild.alt <br />
<br />
= newMenuItemName;<br />
<br />
<br />
}<br />
<br />
else<br />
{<br />
<br />
vAnchorTag.parentNode.previousSibling.firstChild.firstChild.alt <br />
<br />
= oldMenuItemName;<br />
<br />
}<br />
<br />
}<br />
catch(err)<br />
{<br />
}<br />
}<br />
} // End For<br />
} // End If<br />
}// End Function <br />
</script> <br />
<br />
Check it out from here: http://www.mindfiresolutions.com/Renaming-the-menu-items-in-SharePoint-Site-Libraries-and-Lists-for-a-Specific-Site-209.php<br />
Try it out and enjoy...<br />Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-38184146640380032982010-01-21T04:13:00.000-08:002010-01-21T04:15:50.613-08:00Create custom application page in sharepoint 2007/*******************Test.aspx*******************************/<br />
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %><br />
<br />
<br />
<script runat="server"><br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
this.Label1.Text = "Samarendra swain";<br />
}<br />
<br />
protected void btnSubmit_onclick(object sender, EventArgs e)<br />
{<br />
this.Label1.Text = "Hi...";<br />
this.txtValue.Text = "click submit";<br />
}<br />
<br />
</script><br />
<br />
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server"><br />
<h1>Testing custom application page</h1><br />
<asp:Label Text="Hello World" runat="server" ID="Label1"></asp:Label><br />
<asp:TextBox runat="server" ID="txtValue"></asp:TextBox><br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_onclick" /><br />
<br />
copy this test.aspx file in this location <strong>_layouts/Test.aspx</strong><br />
run with this url like <strong><a href="http://testsite/_layouts/Test.aspx">http://testsite/_layouts/Test.aspx</a></strong><br />
</asp:Content> <br />
/**********************End********************************** /<br />
Try it out and enjoy.............<br />Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-66562551364732627342010-01-21T04:02:00.001-08:002010-01-21T04:03:41.405-08:00Create a Custom View for Survey ListIn SharePoint, custom views are used to display the items in a list/libraries with custom look and feel.Therefore you have to choose a view format like Standard View, Calendar View, Datasheet View or Gantt View and accordingly you can customize the display style by choosing Filter condition, Sort method, Group By condition etc. SharePoint allows us to create custom views for the list and libraries. But for the Survey type list, SharePoint documentation doesn't mention anything about creating a custom view.<br />
Below mentioned steps are can be adapted to create a custom view for Survey List.<br />
<br />
Steps-:<br />
1.Open a SharePoint Site......Open the Survey List. <br />
2.Find the ListID from the URL like <br />
List=%7BF2141E9F%2D8EA2%2D42EE%2DA965%2D52F1D7362066%7D <br />
<br />
3.Now change the URL in the browser as <br />
http://SiteName:PortNo/_layouts/ViewType.aspx?List=%7BF2141E9F%2D8EA2%2D42EE%2DA965%2D52F1D7362066%7D<br />
<br />
4.Then choose a view format for the survey list.<br />
<br />
5.Type a custom View Name.<br />
<br />
6.In the same page open the style tab, choose a style for this view e.g Basic Table (Don't set the style as Default).<br />
<br />
7.Then press OK to create the view.<br />
<br />
Edit the Custom View<br />
<br />
1.Open the Survey List <br />
2.Go to Site Action....Click on Edit page....Click on Modify Shared Web Part <br />
3.Now click on Edit the current view <br />
4.It will open the view .Modify the view & save it.<br />
<br />
<a href='http://www.mindfiresolutions.com/Create-a-Custom-View-for-Survey-List-96.php'>Check it out</a>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com0tag:blogger.com,1999:blog-1440128450924740840.post-46656601925971243382009-12-17T02:16:00.000-08:002009-12-17T02:33:03.672-08:00Custom EnsureUser functionThe functionality of web.EnsureUser("login name") function is to resolve the user from the sharepoint site. But there might be a case where the login name you are passsing as a parameter, which does not exist in the site, then it will give you a run time error.<br />
<br />
But this function will work like a brilliant. It will check the user and if does not exist then add that to "Home Owners" group. You can specify your own group name also.<br />
<br />
<b><i>public SPUser CustomEnsureUser(string fullName,SPWeb web)<br />
{<br />
SPPrincipalInfo objInfo = SPUtility.ResolvePrincipal(web, fullName, SPPrincipalType.SecurityGroup | SPPrincipalType.User, SPPrincipalSource.All, null, false);<br />
if objInfo == null)<br />
{<br />
throw new SPException(SPResource.GetString("User could not be found", new object[]{objInfo.LoginName}));<br />
<br />
}<br />
if (objInfo.PrincipalId < 0)
{
web.Groups["Home Owners"].AddUser(objInfo.LoginName, objInfo.Email, objInfo.DisplayName, string.Empty);
}
return web.SiteUsers[objInfo.LoginName];
}</i></b>Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com1tag:blogger.com,1999:blog-1440128450924740840.post-81710553511707668952009-12-16T23:22:00.000-08:002010-01-20T05:55:01.864-08:00How to open SharePoint Group easily in Out-Of-Box functionality.Suppose you are creating a application ,where you are creating sharepoint custom groups day by day. After some days, suppose there are 5000 custom sharepoint groups and you need to Modify settings/update users/delete users in a specific group. Then how can you go to that group easily ?<br />
<br />
Step 1.Where ever you will see that group,just right click on that and click properties and get address url like:<br />
<br />
http://testserver/testsite/_layouts/editprms.aspx?<br />
obj=%7B9FD2AD57%2DB7E1%2D4C7C%2D9A7C%2DA1BB85B20AEC%7D%2C614%2CLISTITEM<br />
&<b><i>sel=17637</i></b><br />
</b><br />
Step 2: Take the sel value(i.e 17637) and Type the url as the below example:<br />
http://testserver/testsite/<b>_layouts/people.aspx?MembershipGroupId=<b><i>17637</i></b></b><br />
<br />
Then you will reach that Group direcltly.<br />
<br />
Try it out and enjoy !Anonymoushttp://www.blogger.com/profile/00672683653086303139noreply@blogger.com1