sharepoint-2007

how to deploy web.config modifications in a Sharepoint web application?

限于喜欢 提交于 2019-11-30 15:22:28
I have a website in Sharepoint 2007. We use a wsp to deploy our projects. We can deploy dlls, usercontrols, features, but i don't know how to include new lines in the web.config. Which would be a possible way to make changes in web.config? Another thing, how can I include resources (resx) in the wsp? Manually editing the web.config in a multi-server farm is a Bad Idea. Ensuring the web.config files stay in sync on each WFE will become a nightmare quickly. Using the SPWebConfigModification class to manage web.config changes across the farm is a Good Idea, as changes will be persisted in the

SharePoint 2007 Log Viewer [closed]

点点圈 提交于 2019-11-30 14:37:35
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . SharePoint 2007 (WSS or MOSS) logs are not easy to read even on a large screen, has anyone come across a log viewer that is able to:

Programmatically logging to the Sharepoint ULS

混江龙づ霸主 提交于 2019-11-30 07:29:27
I'd like to log stuff in my Sharepoint Web Parts, but I want it to go into the ULS. Most examples that I've found log into the Event Log or some other file, but I did not really find one yet for logging into the ULS. Annoyingly, Microsoft.SharePoint.Diagnostics Classes are all marked Internal. I did find one example of how to use them anyway through reflection, but that looks really risky and unstable, because Microsoft may change that class with any hotfix they want. The Sharepoint Documentation wasn't really helpful either - lots of Administrator info about what ULS is and how to configure

Sharepoint API - How to Upload files to Sharepoint Doc Library from ASP.NET Web Application

旧街凉风 提交于 2019-11-30 05:12:59
I am new to Sharepoint Server, Do we have any utility to upload files from ASP.NET application. Could you please provide your valuable answers? Ganesha You can write some custom code to do it. You could use the SharePoint API if you are on the same server or use WebServices Here is the sample code assuming that you know the url of the document library and you are uploading the document to the root folder. You will have to add Microsoft.SharePoint.dll as reference to your ASP.NET project using (SPSite siteCollection = new SPSite(url)) { using (SPWeb spWeb = siteCollection.OpenWeb()) { SPList

Sharepoint CMS vs UmbracoCMS

你离开我真会死。 提交于 2019-11-30 02:45:39
I work for a large local government organisation who are about to embark on using SharePoint to replace our ageing intranet with an all-singing all-dancing collaborative site. The focus for the intranet will be replacing random files, content pages and documents that are spread across the organisation with a SharePoint installation which will magically bring order to all of this. The decision to use SharePoint for the intranet has already been made. The CMS we use on our public website also needs replacing. I have proposed using UmbracoCMS, but due to the pending SharePoint implementation on

Programmatically logging to the Sharepoint ULS

守給你的承諾、 提交于 2019-11-29 09:43:26
问题 I'd like to log stuff in my Sharepoint Web Parts, but I want it to go into the ULS. Most examples that I've found log into the Event Log or some other file, but I did not really find one yet for logging into the ULS. Annoyingly, Microsoft.SharePoint.Diagnostics Classes are all marked Internal. I did find one example of how to use them anyway through reflection, but that looks really risky and unstable, because Microsoft may change that class with any hotfix they want. The Sharepoint

Get domain name

喜你入骨 提交于 2019-11-29 09:03:05
My computer is in a Domain (Active Directory) and I need to get the domain name dynamically. I found the following code on the internet: SelectQuery query = new SelectQuery("Win32_ComputerSystem"); using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query)) { foreach (ManagementObject mo in searcher.Get()) { if ((bool)mo["partofdomain"]) { this.Domain = mo["domain"].ToString(); break; } } } It works exactly as I want and returns exactly the domain name as I want (when I am logged as Administrator). If the user is not a Domain Admin, I have an Access denied exception. Does

SharePoint - get value of calculated field without manual parsing

巧了我就是萌 提交于 2019-11-29 06:31:05
I have a calculated field in a list with this formula: =CID & " - " & Title When viewing the list, it might display as: "2 - Big Meeting". When I grab the value from code like so: myItem["CIDandTitle"] the value comes back as: "string;#2 - BigMeeting". Is there a "correct" way in sharepoint to extract the value or should i simply split on the semicolon and pound sign? I am using MOSS2007. You have to cast it to an SPCalculatedField: SPFieldCalculated cf = (SPFieldCalculated)myItem.Fields["CIDandTitle"]; string value = cf.GetFieldValueForEdit(myItem["CIDandTitle"]); or string value = cf

Creating a custom Document Library in SharePoint

对着背影说爱祢 提交于 2019-11-29 02:45:06
I have a document library in my SharePoint page and there are 10 documents in it. If User A is logged in I want him to only see 5 of those documents in that document library. How can I create some custom document library for this to work? I have MOSS installed. Thanks in advance! You could configure different permissions on each document in the document library. Just select the "Manage Permissions" option on each item and break the permission inheritance from the document library level. Just note that having too many documents with item level permissions can create a maintenance nightmare for

SQL IN equivalent in CAML

我怕爱的太早我们不能终老 提交于 2019-11-28 20:47:06
Is there a "nice" way to create a CAML query for SharePoint that does something like this? SELECT * FROM table WHERE Id IN (3, 12, ...) Or am I stuck with a nightmare of nested <Or> nodes? EDIT: This was my solution to generate the <Or> nodes. /// Simulates a SQL 'Where In' clause in CAML /// </summary> /// <param name="columnType">Specifies the data type for the value contained by the field.</param> /// <returns>Nested 'Or' elements portion of CAML query</returns> public static string CamlIn<T>(string internalFieldName, string columnType, T[] values) { XDocument doc = new XDocument();