.NET

Adding an task item to sharepoint with C# .net

There are lots of ways to do things like this. Here's a pretty simple way with c# and .net. forgive some of the using shortcuts, i was just isolating a couple of areas. and as always i normally just post these so i don't forget =P this is just a console app to add a single item to a task list in sharepoint. very simple. the only thing that was a bit of a pain is you need to find your sharepoint id for the person. the easiest way i found that for myself was simply to go to the list,...

posted @ Thursday, October 15, 2009 10:38 PM | Feedback (1)

partial trust, permcalc, and caspol, OH MY!

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 ...

posted @ Friday, July 18, 2008 3:54 PM | Feedback (0)

.Net DataReader to ArrayList

string sql = "some sql"ArrayList al = new ArrayList();using (SqlConnection cn = new SqlConnection(cs))using (SqlCommand cmd = new SqlCommand(sql, cn)) {    cn.Open();    using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection))    while (dr.Read()) {        object[] o = new object[dr.FieldCount];        dr.GetValues(o);        al.Add(o);    }}foreach(object[] o in al)    Console.WriteLine(a1(o[0].ToString());

posted @ Thursday, December 13, 2007 3:16 PM | Feedback (0)

newsflash .NET > J2EE

I was surfing around today looking for information on .NET vs J2EE performance when I came across this site:http://msdn2.microsoft.com/en-us/netframework/bb499684.aspxSummary from that site:"This application is an end-to-end sample application for .NET Enterprise Application Server technologies. It is a service-oriented application based on Windows Communication Foundation (.NET 3.0) and ASP.NET, and illustrates many of the .NET enterprise development technologies for building highly scalable, rich "enterprise-connected" applications. It is designed as a benchmark kit to illustrate alternative technologies within .NET and their relative performance.The application offers full interoperability with J2EE and IBM WebSphere's Trade 6.1 sample application. As such, the application offers an excellent opportunity for developers to learn about .NET...

posted @ Wednesday, August 15, 2007 9:38 PM | Feedback (2)

404 error or XML Parsing Error: no element found error on IIS with .Net

 A colleague asked me to be a second pair of eyes for a project he was working on that was getting this error. He had just deployed a new .NET web site to a relatively clean IIS6 machine. He was receiving a 404 error in IE when he merely tried to view his asmx pages. When I tried to open them in Firefox, I received an XML Parsing Error: no element found error. After some looking on the web, I didn't find anything that seemed pertinent to our situation. So, I just started looking around. I noticed he had ASP.NET...

posted @ Tuesday, July 31, 2007 12:12 PM | Feedback (0)

More CLR Internal, Debugging, Etc reading material

I'm done with most of these, but not totally. Tons of great information! Here are some more great articles that I found doing debugging research. They mostly pertain to debugging and CLR internals type of stuff. CLR Inside Out - Investigating Memory IssuesDrill Into .NET Framework Internals to See How the CLR Creates Runtime ObjectsSo, what’s new in the CLR 2.0 GC?Windows Debuggers: Part 1: A WinDbg TutorialDebug Tutorial Part 1: Beginning Debugging Using CDB and NTSDDebug Tutorial Part 2: The StackDebug Tutorial Part 3: The HeapDebug Tutorial Part 4: Writing WINDBG ExtensionsDebug Tutorial Part 5: Handle LeaksDebug Tutorial Part 6: Navigating The Kernel DebuggerDebug Tutorial Part 7: Locks and Synchronization ObjectsTraversing the gc heap...

posted @ Wednesday, July 18, 2007 7:55 AM | Feedback (0)

Why "SET NOCOUNT ON" Sucks

As I mentioned in a previous post,  David Hayden sat in the front row and gave me an especially hard time about ‘set nocount on’ as a tip. I don’t remember the exact words, so I’m going to have to roughly paraphrase. His complaint was that some data access layers or object relational mapping tools or other data abstraction methods in .NET sometimes utilized the return record count to determine success or failure. Michael Wells (also in the front row) stated that normally he just utilized a try/catch to determine success, or just relying on a thrown error. Typically, I have taken this approach as well. David was pretty...

posted @ Tuesday, July 17, 2007 6:26 AM | Feedback (1)

simple web service

using System; using System.Data; using System.Data.SqlClient; using System.Web.Services; namespace IamSimple.Service.WebServices {     [WebService(Namespace = "http://royashbrook.com/ns")]     [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]     public class simple : System.Web.Services.WebService     {         [WebMethod(Description = "Return a query as a dataset")]         public DataSet QueryAsDataSet(string q)         {             string cs = "connection string"             using (SqlConnection c = new SqlConnection(cs))                 using (SqlCommand cm = new SqlCommand(q, c))                     using (SqlDataAdapter da = new SqlDataAdapter(cm))                         using (DataSet ds = new DataSet())                         {                             ds.RemotingFormat = SerializationFormat.Binary;                             c.Open();                             da.Fill(ds);                             c.Close();                             return ds;                         }     } }

posted @ Wednesday, July 04, 2007 12:50 AM | Feedback (0)

Odds and Ends

Stuff I've been intending to post a meaningful post about, but haven't: If you have ever wondered what ildasm is all about, here's a great link. http://msdn.microsoft.com/msdnmag/issues/01/05/bugslayer/ Simple SQLCLR stored Proc deployment Walthrough: http://blogs.msdn.com/vsdata/archive/2004/12/14/300216.aspx Three sweet articles about Threads, System.Threading.Thread, and !threads (sos.dll) http://blogs.msdn.com/yunjin/archive/2005/08/25/456355.aspx http://blogs.msdn.com/yunjin/archive/2005/08/29/457150.aspx http://blogs.msdn.com/yunjin/archive/2005/08/30/457756.aspx A couple of sites that led me to err.exe http://blogs.technet.com/brad_rutkowski/archive/2007/03/29/the-case-of-sidebar-exe-not-starting-oh-snap.aspx http://blogs.technet.com/brad_rutkowski/archive/2006/09/18/to-err-is-admin.aspx some unit testing stuff i wanted to read http://www.codeproject.com/cs/database/UnitTestDbAppsWithNDbUnit.asp http://msdn.microsoft.com/msdnmag/issues/05/03/TestRun/ http://msdn.microsoft.com/msdnmag/issues/06/01/UnitTesting/ and, finally, a great article on troubleshooting memory management issues with .net http://msdn.microsoft.com/msdnmag/issues/06/11/CLRInsideOut/ I'm tagging this post with 'tips' if for nothing else than err.exe =) 

posted @ Sunday, July 01, 2007 2:13 AM | Feedback (0)

Top 10 WinDbg.exe Usage Articles

These are the articles (in no particular order) that I felt best showed a thorough use of the WinDbg.exe tool from start to finish. They were absolutely priceless to me. Enjoy! ASP.NET 2.0 Crash case study: Unhandled exceptions A word for WinDbg (2) Some new SOS functions System.ArgumentException: Illegal characters in path Tracking down a production bug .NET Memory Leak: XmlSerializing your way to a Memory Leak ASP.NET Case Study: High CPU in GC - Large objects and high allocation rates ASP.NET Case Study: Tracing your way to OOM exceptions Basic debugging of an application crash Tracking Down Managed Memory Leaks + 1 Troubleshooting ASP.NET using WinDbg and the SOS extension   =)

posted @ Sunday, June 24, 2007 5:42 PM | Feedback (0)

Full .NET Archive