sharepoint-2007

Sharepoint web part form validation blocks updating web part settings

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 03:02:35
问题 I have written a web part in C# for Sharepoint 2007 which has a single field which is validated as a required field using RequiredFieldValidator() . The web part also has some configuration fields (ones you edit by clicking on Modify Shared Web Part). When I make changes to these fields and try to apply them, the validation of the user field kicks in and prevents the update, even though I am not submitting the form. I am only trying to submit the settings. The web part may be used in a few

Create a webpart page error during debbugging mode

本小妞迷上赌 提交于 2019-12-12 02:00:02
问题 I'm actually creating a webpart page and use this technique from the post of Alex Angas in Programmatically instantiate a web part page in Sharepoint string SiteLocation = "http://abcd.com/sites/forum/"; SPSecurity.RunWithElevatedPrivileges(delegate(){ using(SPSite site = new SPSite(SiteLocation)){ using(SPWeb web = site.OpenWeb()){ foreach(SPWeb oweb in web.Webs){ bool allowUnsafeUpdates = oWeb.AllowUnsafeUpdates; oWeb.AllowUnsafeUpdates = true; string strFileName = "Mobile.aspx"; string

Sharepoint users are logged out

时光毁灭记忆、已成空白 提交于 2019-12-12 01:35:35
问题 Everyday at sometime (mostly near the noon) all users of our sharepoint (2007) except "System Account" automatically get logged out and cannot login for about 30mins. I have no idea what possibly causes this situation. Can anyone help? Thanks in advance. Update: we use Active Directory for user authentication. At situations described above we can successfully login to Active Directory but it seems that SharePoint fails to login. 回答1: When you say 'cannot login for about 30mins' do you mean

MOSS how to use feature to propagate pages in root site to child sites

故事扮演 提交于 2019-12-12 01:26:50
问题 I have a publishing site, say http://dev. I've created a page called About.aspx, so the url would be http://dev/Pages/About.aspx. I'd like to use Feature so that the About.aspx page is available when users access it from the child sites, for example: [http]://dev/2010-01/Pages/About.aspx, [http]://dev/2010-02/Pages/About.aspx, and so on, without having to copy the About.aspx to each site. 回答1: Have these sites already been created? If not you could create your own site definition and add it

SharePoint 2007: Create or add zone without Designer

微笑、不失礼 提交于 2019-12-11 17:33:12
问题 Can anyone provide instructions or a URL to add a new zone to a SharePoint site without Designer? Right now, I have a site that only has a left and right zone and I want to add a 'Top' zone above the left and right zone. Is there something in the site settings I can go to to add a new zone? Many thanks in advance. 回答1: You are actually talking about a page, not a site. The answer is no. What you can do is create a Web Part page based on a template that fits your needs. 来源: https:/

How to get last modified time of a document in sharepoint?

穿精又带淫゛_ 提交于 2019-12-11 16:55:09
问题 How to convert LastModifiedTime value of MssCrawlUrl table ? I tried below query, Select CAST(LastModifiedTime as datetime) From MssCrawlUrl Where DisplayURL like '<DisplayURL>' But it is giving an error 'Arithmetic overflow error converting expression to data type datetime.' 回答1: It is not supported to query the SharePoint databases directly. You must use the API. Apart from the official "not supported" reason, it can cause locking, return incorrect data, and custom queries may break between

Overridding SharePoint's square.gif and setrect.gif

情到浓时终转凉″ 提交于 2019-12-11 16:15:25
问题 Within the custom branding of a SharePoint 2007 site collection, I need to change the bullet images. Instead of using <li> tags, SharePoint 2007 uses tables and images as follows: <tr> <td class="ms-vb" style="padding-bottom: 5px;"><img alt="" src="/_layouts/images/square.gif"> </td> <td class="ms-vb" style="padding-bottom: 5px; padding-left: 5px;"> <a href="http://stackoverflow.com" onfocus="OnLink(this)">stackoverflow</a> </td> </tr> and <tr> <td width="8px" valign="top" nowrap style=

Sharepoint Webservice 401 error

风流意气都作罢 提交于 2019-12-11 13:15:03
问题 I'm trying to call sharepoint webservices in C# console application. The code works fine when I use my local system's WSS as target application but don't work with another server accessible over the web. Following is my code. Webs service = new Webs(); service.PreAuthenticate = true; service.Credentials = new System.Net.NetworkCredential(login, password); //service.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; service.Url = url + @"/_vti_bin/webs.asmx"; XmlNode sites =

ASP.NET DLL required in both GAC and \Inetpub\wwwroot\bin

旧城冷巷雨未停 提交于 2019-12-11 10:44:28
问题 I copied an ASP.NET application DLL into \Inetpub\wwwroot\bin and copied the application folder under Sharepoint 2007 TEMPLATES\Layouts folder, so I could access the application from http://sp-portal/sites/sitecoll123/_layouts/aspnetapp/Default.aspx . It complained that: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object

Can only call SharePoint 2007 web service using WCF client after calling with ASMX Web Reference

谁都会走 提交于 2019-12-11 08:50:09
问题 I have a web app that calls the SharePoint 2007 Lists.asmx service using a WCF endpoint. In an all day attempt to determine why it was receiving a 500 response when calling the GetListItems method, I discovered that it starts succeeding after I execute a query in U2U Caml Query Builder. That is, after executing a U2U query, the web app stops getting the 500 response and can successfully retrieve list items using its WCF service reference until I do an iisreset. In response to that discovery,