Posts

Creating SCSM tickets using SMLets and ASP.NET

Image
English: This is a photo of a room full of computers all showing the same windows error message at the Nanyang Technological University in Singapore (Photo credit: Wikipedia ) I was trying to figure out how we could leverage ASP.Net to create more functional forms for end user ticket creation in SCSM. Many would agree that the self service portal is a bit restricted and we needed a method for our Apps group to submit Change Requests that would comply with SOX. I found a few examples around the net regarding the power of SMLets and PowerShell and eventually found that there are classes available in .Net for leveraging this. My first major hurdle was determining why I kept getting a strange error message " Unable to access Windows PowerShell PowerShellEngine registry information. "   when trying to replicate these efforts . My errors seemed to stem from trying to use assemblies built with prior versions of the .Net library, and instead of writing a wrapper of so...

Crystal Reports, Advanced SQL Commands and Parameters

Image
Crystal Reports Pic 4 - Select Data Tables (Photo credit: wmharshana ) I've not written a Crystal Report that required a more advanced query in quite a while, and had a need to union two selects and pass in a parameter to both queries. I initially just wrote the Union query and attempted to place my {?CustomerName} in both places using the "=" comparison operator, which worked. When I wanted to add the ability for the user to only add a portion of the customer name in the query and use the LIKE operator, Crystal had some issues and thought I was trying to pass a column name or some such trash. Eventually I found an article that suggested the use of a DECLARE and SET to hold the parameter that Crystal passes, then hand it off to the query. This also failed until I wrapped the entire UNION in a SELECT and passed in the parameter once. Yay! DECLARE @Cust VarChar(200) SET @Cust = '{?CustomerName}' SELECT * FROM ( SELECT Name, Address, City, State, Zi...

Find GridView Cell Values on RowCommand with Paging Enabled

This was confounding me this morning until I found this  post on the ASP.NET forums. I was setting up a GridView and needed to check the values of a couple of cells before I let users click a button in an ItemTemplate. I initially used the Container.DateItemIndex method to determine which row they clicked but quickly found out that this only works without Paging Enabled as noted on the MSDN . All this does is tell you the index of the data, but since the GridView index needs to be reset on each page (0-your page size) you'll never find your values. Instead set is thusly: You'll be able to easily access your cells then: Dim index As Integer = Int32.Parse(e.CommandArgument.ToString()) Dim row As GridViewRow = GV_OrderHeaders.Rows(index) Dim ifs As String = DirectCast(row.FindControl("lblIfsId"), Label).Text Dim oid As String = DirectCast(row.Fi...

Mexicali Chili

Image
1 lb lean ground beef 1 medium onion, diced 1 14oz can chili beans 1 16oz jar corn salsa 3 large Idaho potatoes, diced 3 cups water 2 cups cold milk 2 tbl corn starch Brown beef, season with 1/2 tsp cumin, 1/2 tsp salt, 1/2 tsp chili powder if desired. Sweat onion in 1 tbl butter separately. Mix beef, onion, beans, salsa, potatoes and water in large pot. Bring to a boil, then cover and simmer for 30 minutes. Mix milk and cornstarch in small bowl. When potatoes are tender, slowly stir in milk mixture. Mix for a minute or so as the chili thickens. Serve with diced avacado, tomato, and maybe some feta? Enjoy, we did!

Crystal Reports Server 2008, WACS and AD Auth on 2008 Domain

Image
Image via CrunchBase This was kicking my butt the past couple of days. Up to this point, I'd simply been using the server to schedule and email reports out to people. What I wanted was to allow users to log in with their AD credentials, browse InfoView and run their own reports. Simple, right? This is how I did it. Create a service account in AD. This account doesn't need elevated privileges  Tick the User cannot change password and Password never expires boxes. In my example the account is svc_crs . Use setspn.exe to create the Service Principal Name. Run the command on a DC in a command prompt with elevated privileges. Here is more info on setspn . The convention is setspn -a MySpnName/MySvcAcct.Domain.Com MySvcAcct . In my environment I used setspn.exe -a  CrystalSvr/svc_crs.NETWORK.INTERNAL svc_crs . Open your service account Account Properties in Active Directory Users and Computers , select the Delegation tab, and change delegation t...

New Sourcegforge Project

Image
English: jQuery Mobile logo. (Photo credit: Wikipedia ) I just posted a new project on Sourceforge , called Anonymous Compliance Reporting . Anonymous Compliance Reporting aims to be a solution for small organizations that desire to adhere to the corporate practice of providing a means for employees to report issues anonymously. This project originated to provide a mechanism for my employers staff to report instances of compliance violation in the workplace, e.g. improper handling of PHI (Patient Health Information ), HIPAA violations, and the like. I took on the task of updating it recently, to a more robust " Web 2.0 " application, adding JQuery , Ajax, and updated graphics. It runs on both LAMP and WAMP servers. Documentation is on this wiki  https://sourceforge.net/p/anonrep/wiki/Home/  and in the README file in the download package. The sample website is completely open to play with, the credentials are admin / password. Have fun! Anonymous Compli...

ADFS and AD User Name Changes

Image
One of our users was recently married, and had her name changed. Two days later she opened a helpdesk ticket indicating one of our claims aware applications denied her access to it's resources. After enabling ADFS debug logging, I discovered that the server was still referencing her old user name . After a few minutes of Googling, I found this article that points to a MS KB article outlining the use of LSA caching user SID's, creating my problem. A quick Powershell script keeps this from happening again after creating the registry key noted in the KB article: $RegKey="HKLM:\System\CurrentControlSet\Control\Lsa" Set-ItemProperty -path $RegKey -name LsaLookupCacheMaxSize -value 0 Set-ItemProperty -path $RegKey -name LsaLookupCacheMaxSize -value 128