Archive for July, 2014

select from a stored procedure

July 21, 2014

Declare @T Table (
logday datetime,
netid varchar(50),
swhere varchar(100),
datatext text ,
session varchar(100)
)
Insert @T Exec [ListRecentErrors]

select sdate , swhere as ErrorCategory , count(*) as ErrorCount from
(
Select CONVERT(varchar(12),logday,102) as sdate , swhere from @T
) A
group by sdate , swhere

we got this from StackOverflow

Excel rewrites your links! good luck sharepoint users …

July 18, 2014

A student and I struggled with this for about an hour … I don’t do sharepoint day-to-day …

excel_deletes

visual studio poltergeist?

July 18, 2014

Visual Studio or somebody is looping infinitely on my web page!

Whenever I started my debugger, something would hit one of my pages (not me) – in a loop – and I had no idea what it was. I booted the pc, and it went away.

The way I could tell the problem was happening was that the victim page was missing some inputs and throwing exceptions in the code behind.

I don’t let our junior developers know about this kind of stuff – they believe in poltergeists as it is. (I hate to hear those uninformed anti-Microsoft rants…)


Wow – the poltergeist came back! Why? (what is stuck or hung in there?)

I killed a worker process for iis in task manager — no help.

I restarted IIS
net stop w3svc
net start w3svc

that fixed it!

stateless unit testing (when I wanted several to run together) … MemoryCache

July 15, 2014

Unit Testing – wow, I spent two days and the issue seems to have been just my misunderstanding of how stateless each unit test is.
I was trying to test a push and a pull from a local cache storage (instead of using web application cache, I switched to MemoryCache (.Net 4).

The problem was that I was saving in one test and trying to read in another test. And it’s an unfortunately long story, but when I finally just made one test method which saved and then read, it all worked.

I knew that I couldn’t count on tests being run in a certain order, but I was trying to run things by hand from Test Explorer. Sometimes it would work, but I just shot at least 12 hours trying to get something to work that I should have just spent 3 minutes on doing it the easy way.

mixed razor and html (a little beyond the simple examples you find at w3 school)

July 1, 2014

mixed razor and html (a little beyond the simple examples you find at w3 school)

(sorry about this post all in an image … I’m not skilled enough at word press to format all my bracket characters)

here is what finally worked
we took out as much razor as possible, and now I’m happy. I failed to catch another error in the image of all my travails with this – we got the asp.net system message that echoed to the screen, and the fix for that was to put in a “using” statement … and I could not get this to work in a reasonable amount of time. (less than 4-6 hours) Less razor is a good thing.


    
@Model.pagingLabelText