MOSS Open Document prompts for credentials

Problem: When attempting to open documents on our sharepoint portal we are being prompted for credentials. cancelling the prompt allows the document to open. Later if the user clicks on “Edit Document” from the menu above the credential prompt reappears. While being prompted for credentials you can either enter them 3 times and the dialog goes away OR the user can click cancel. Regardless of the users actons, after clicking…

Code Sample: VB.NET SMTP Mail function

1. Create a Visual Basic Class for your project by right clicking the project and select add.   2. Change the language to Visual Basic and select Class from the list of Installed Templates.   3. Name the class clsNotify. Add the code below to the class.(You can name it whatever you want really, but you’ll need to change Public Class definition in the code below. Your reference to class will also need to change.)…

Code Sample: TSQL, Size of tables in database

SELECT t.NAME AS TableName, p.rows AS RowCounts, SUM(a.total_pages) * 8 AS TotalSpaceKB, SUM(a.used_pages) * 8 AS UsedSpaceKB, (SUM(a.total_pages) – SUM(a.used_pages)) * 8 AS UnusedSpaceKB FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id WHERE t.NAME NOT LIKE ‘dt%’ AND t.is_ms_shipped = 0 AND i.OBJECT_ID > 255 GROUP BY…

SSIS / BIDS Rename File with File System Task

Lets see if I can explain how to rename a files using the File System Task in BIDS or SSIS. First you will need to add a File System Task to your Control Flow. (Drag and Drop it to the Form) Open the task and change the Opertaion to Rename File. Set the IsDestinationPathVariable to True and set the IsSourcePathVariable to True as well. Click SourceVariable and select from the drop down….

SharePoint 2013 Design Packages broken

We were attempting to use Responsive SharePoint from CodePlex, They’ve done a lot of heavy lifting with regards to implementing Twitter Bootstrap within SharePoint 2013. After some testing we found that certain sites were becoming corrupt and throwing Errors and Warnings. The first warning occurred after creating pages, a modal dialog would appear with the following message. Invalid field name. {50631c24-1371-4ecf-a5ae-ed41b03f4499} After doing some digging it appeared the field was missing…

TSQL: Search All Tables

/****** Object: StoredProcedure [dbo].[SearchAllTables] Script Date: 3/14/2013 8:01:42 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[SearchAllTables] ( @SearchStr nvarchar(100) ) AS BEGIN — Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved. — Purpose: To search all columns of all tables for a given search string — Written by: Narayana Vyas Kondreddi — Site: http://vyaskn.tripod.com — Tested on: SQL Server 7.0 and SQL Server 2000…

SharePoint 2013 unexpected database growth

So one day, suddenly I find my development environment out of drive space, never good, but its my dev box and not a production system. So that’s the good news. Production Environment Fix(Contentdb): So I start poking around and find that the content database is bloated to 17 gigs. That’s a problem since I don’t have any real content in the database. I ran this Script and it pointed me to the…

SPWeb.Users.GetCollection does not work as expected

It appears that SPWeb.Users.GetCollection is not bound to its initialized web although SPWeb.Users[username] and SPWeb.Users.GetByEmail(email) are. The unfortunate thing, SPWeb.Users[username] and SPWeb.Users.GetByEmail(email) both throw exceptions if nothing is found. public static Boolean UserExistsbyEmail(SPWeb web, string email) {//Throws Exception if account doesn’t exsit within the SPWeb try { SPUser spu = web.Users.GetByEmail(email); } catch (Exception ex) { return false; } return true; } public static Boolean UserExistsbyUserName(SPWeb web, string userName) {//Throws…