Debugging VBScript / ASP pages in the year 2017, with Visual Studio 2015 (VS2015)

Ah, another year and I still need to debug VBScript code in ASP pages. I had hoped to forget how to do this and I did, but then I needed to do it again so I had to go “remember” / Google how to do it again. I’m kind of amazed that I can debug …

Continue reading ‘Debugging VBScript / ASP pages in the year 2017, with Visual Studio 2015 (VS2015)’ »

ASP.NET MVC strongly typed model binding to a collection with zero values.

I wasn’t quite clear how to do this and I’m not sure my solution is the best approach, but it certainly falls within the realm of normal functionality included in ASP.NET MVC. The page I wanted to have was a partial view that listed out comments associated with a particular model object. So, if someone …

Continue reading ‘ASP.NET MVC strongly typed model binding to a collection with zero values.’ »

Stackoverflow Exception using HTML.RenderPartial ASP.NET MVC

Lesson learned. Don’t name your partial views the same as your normal views. Login.cshtml under Views/Shared Login.cshtml under Views/Login tries to call Html.RenderPartial(“Login”) Stackoverflow Exception because the rendering engine ends up searching the Views/Shared after everything else and ends up recursively calling Views/Login/Login.cshtml. Renaming the shared View to _Login.cshtml obviously fixed the issue. Partial Views …

Continue reading ‘Stackoverflow Exception using HTML.RenderPartial ASP.NET MVC’ »

Logging a message to a file for debugging purposes using C#.

There are any number of times where I find myself puzzled over a problem that exists on a remote server and cannot be reproduced on my local development box. There are different ways to solve this, but sometimes it’s just helpful to have a way to log messages to a file. This last incident involved …

Continue reading ‘Logging a message to a file for debugging purposes using C#.’ »

Unable to update the EntitySet ” because it has a DefiningQuery and no <> element exists in the <> element to support the current operation.

Silly thing this. Found this link. In my case this was caused by not selecting the primary key for the table in SQL Server I was generating the entity set against and then attempting to call the Entity Framework AddObject method with the generated entity. I’m pretty sure that this sort of error will occur …

Continue reading ‘Unable to update the EntitySet ” because it has a DefiningQuery and no <> element exists in the <> element to support the current operation.’ »