Tuesday, August 11, 2015

How to get rid of those SharePoint Authentication Prompts

FYI:
This isn’t SharePoint specific, however Im sure the same process could be used to save credentials for other web apps that use Windows Authentication, the below article shows how to get rid of that pesky Login prompt in SharePoint that I continuously get when editing MS Office docs in SharePoint,

It seems like every time I click to open or download an Office file in SharePoint I kept getting prompted to login after I had already checked the check box “Remember My Credential” which never seemed to work for me….Well this article worked for me, Now I don’t have to enter my UID/PWD every time I open a doc in SharePoint….Yay!

I tried this in SP2010 / IE11

Thanks!




Friday, August 7, 2015

Remoting Computing Tools: How to Awake & Sleep on schedule, KeepAlive by Mouse and Remote Awake with magic packets

Will update links shortly, below I document my current setup/tasks to awake, sleep keep alive computer for daily work, this allows me to do other tasks while these automated redundant daily shores are done for me on schedule, TimeSaved = TimeEarned,

Tools Used:
Move Mouse
NirCmd
taskkill.exe (a simple exe to call kil process by exe name or NirCmd)

1. Schedule a Sleep:

2. Schedule an Alive

3. Keep Alive with Move Mouse


4. Magic Packets using router and util
See this great article here using WakOnLoan

Monday, August 3, 2015

Improve DataObject Serialization Performance and the Gotchas

While working on a custom reporting app I came across a little ADO.Net serialization gotcha, when we use WriteXML() and ReadXML for serializing a DataSet to stream, any column with null values in all rows will be magically removed from the de-serialization! Ina  service arena, this probably isn't an issue, however when dealing with service consumers that include CSV output for users or HTML, dropping columns is a big NO NO, at least to a user, Yes the data is blank, and who really cares to look at a blank column, well report users LOVE their columns and having one disappear will result in a bug task.

After digging around, I found this stackoverflow that describes the issue, with an old invalid KB reference. The solutions remarked here are not really attractive by any means, certainly not looping over a result set just to add a String DataColumn with Empty string , yuck, Im gonna try a little Hack just to get by today: If DataTable.Rows.Count > 0, then for each DataColumn that is DBNull, set to empty string to see if that works for me. Better yet, after looking at the .Net FW, there's a param avail with 3.5+ (I believe) that does the trick:

 //convert to xml with the DataSet schema:
        StringWriter writer = new StringWriter();
        ds.WriteXml(writer, XmlWriteMode.WriteSchema);
        string xml = writer.ToString();

What the impact is on the string size Im not sure, will need to test performance before and after,

In peruzing related articles I came across a better final solution which will involve switching over to JSON, this article is a good ref for that:

8 ways to improve ASP.NET Web API performance
http://blog.developers.ba/8-ways-improve-asp-net-web-api-performance/

Lightweight DataTable Serialization
http://blogs.msdn.com/b/shitals/archive/2009/12/04/9932598.aspx