Visual Studio 2017 RC.3 26127.3 finally works ASP.Net Core correctly

At least in my experience. Even until this minor point release came out a few days after the more ‘major’ release, things did not work right.  Since there needed to be a more solid upgrade path from the project.json system to the ‘new’ MSBuild system, I was concerned about how much work it would take. In the end, not very much.  Bin and Obj folders needed to be deleted, and for some obscure reason, the EF 6.1.3 NuGet package needed to be added to the Asp.NET Core project (this wasn’t required previously, so I’m assuming this is just...

posted @ Friday, February 03, 2017 1:57 AM | Feedback (0)
Be wary of Visual Studio 2017 RC

I made the mistake of installing this on multiple machines instead of my usual “install on one and check it out fairly thoroughly” routine.  I guess I had been lulled into somewhat of a sense of security with the beta/RC process for Visual Studio 2015, in that I didn’t think that installing 17 RC would break important parts of 15 functionality. To wit, simply installing 17 RC would break some .NET Core web apps inside Visual Studio 2015, even if I didn’t try to open/upgrade them in the new software. Various errors included: ...

posted @ Sunday, November 20, 2016 7:24 PM | Feedback (0)
Asp.NET Core Failed to make the following project runnable, access to the file is denied

This shit again. Except none of the workarounds that worked previously worked.  I cannot build on my current machine, and won’t have access to another machine that I can check on (since it only occurred on some machines previously) until tomorrow.  Got rid of the app.config file completely, and other things, but cannot build Infuriating. a few minutes later One workaround works.  Check out the entire solution for edit, then build.  Fantastic. I suppose it’s a lot to ask for the bleeping tooling to work properly under common scenarios.  I’m unappreciative that way. Bleeping...

posted @ Saturday, October 01, 2016 1:53 AM | Feedback (0)
Asp.NET Core + IIS + PEBKAC = WTF, Asp.NET Core + IIS – PEBKAC = Success

Thankfully, the issue, as it usually is, was with me. At some point, the publishOptions section of project.json switched from having an exclude section and put in an include section instead (which makes sense enough). Turns out if you don’t include, you know, all your content and views and whatnot, IIS doesn’t have anything to serve up. BTW, logging helps.  Duh. Once I figured out that it was serving static content (which a helpful doc tells you to do, which requires that you read the helpful doc), it became easy to track down. It does...

posted @ Tuesday, August 23, 2016 4:08 PM | Feedback (0)
Asp.NET Core + net461+ IIS = WTF

So, I have my nice port/re-write of an older MVC app to the new Asp.NET Core, which depends on some parts still written in net461 and so is configured for that, and I’ve reached the point I’ve ‘dreaded’ for quite some time. I want to host this up in EC2, like a real app, which, of course, runs IIS. The obvious question is:  how the hell do you do that? I’ve read many things, and still, no work-y, as they all seem to depend on ‘pure’ Asp.NET core to work.  I can look in my stdout log...

posted @ Saturday, August 20, 2016 1:55 PM | Feedback (0)
I probably could have written this code better

Long-ish project converting an app of mine from Asp.Net 3/4 to Asp.Net Core (half conversion, half rewrite kind of thing) and came across this gem: public class AttemptToChangePasswordResult {     public bool Succeeded { get; set; } } At least it is fairly clear.

posted @ Monday, August 08, 2016 7:15 PM | Feedback (0)
Fixing ImageLink code that Asp.NET Core broke

This code, prior to Asp.NET Core, worked to create an image link: public static HtmlString ImageLink(this HtmlHelper htmlHelper, string imgSrc, string alt, string actionName, string controllerName, object routeValues, object htmlAttributes, object imgHtmlAttributes)        {            UrlHelper urlHelper = ((Controller)htmlHelper.ViewContext.Controller).Url;            TagBuilder imgTag = new TagBuilder("img");            imgTag.MergeAttribute("src", imgSrc);            imgTag.MergeAttribute("alt", alt);            imgTag.MergeAttributes((new RouteValueDictionary(imgHtmlAttributes)), true);            string url...

posted @ Wednesday, July 27, 2016 9:41 PM | Feedback (0)
Web Template Fail: Visual Studio Enterprise 15 Preview 3

Create a new project based on the .NET 5 web template. Try to build. 1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.9\tsc.exe  --noEmitOnError --locale en-US --listEmittedFiles 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\TypeScript\Microsoft.TypeScript.targets(261,7): error MSB4064: The "OutputLogFile" parameter is not supported by the "VsTsc" task. Verify the parameter exists on the task, and it is a settable public instance property. 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\TypeScript\Microsoft.TypeScript.targets(247,5): error MSB4063: The "VsTsc" task could not be initialized with its input parameters. 1>Done building project "EntPrev3-WebTemplate.xproj" -- FAILED. Do they even look at the work they are...

posted @ Monday, July 11, 2016 11:03 AM | Feedback (2)
Workaround: Failed to make the following project runnable: Asp.NET Core 1.0

This isn’t great by any stretch, but this works for me on the 1 of 3 machines that I have this issue: Check out the entire solution for edit. Delete the \bin and \obj folders from the web site. You should now be able to build at will. You’ll need to repeat whenever you check something in. I know, this sucks.

posted @ Sunday, July 03, 2016 5:55 PM | Feedback (3)
Asp.NET Core 1.0 and TFS, works on my machine, as long as it’s just the one machine and not the other

Can build and run just fine on my Surface Pro 4, but not on my Surface Book, which fails to build with the previously mentioned error. Let’s hear it for the Scotts, well done guys.

posted @ Friday, July 01, 2016 9:47 AM | Feedback (0)
Asp.NET Core 1.0 & TFS FTL

Why can’t this stuff just work? So, I ended up recreating a significant Asp.NET Core solution as trying to upgrade from the previous RC versions just didn’t work.  Even after finally getting it to where it could build and run, I lost Intellisense on any code coming from projects built under .NET Framework.  It wasn’t so so bad, I did it in a couple of afternoons, and though I had some cleanup still remaining (it was having some issues seeing the CSS files associated with it), it was mostly good so I checked it into TFS, in order to...

posted @ Thursday, June 30, 2016 11:46 PM | Feedback (0)
Asp.Net Core 1.0 RC2 fail, why? Who knows, it works on my machine, unless it’s the other machine

Related to the previous….. After deciding that Asp.NET 5 MVC 6 (or whatever it was called) wasn’t quite how they wanted to do it, the brilliant Scotts from Microsoft decided to redo god knows what percentage of the damn thing, and it became Asp.NET Core 1.0. Fantastic, but fine.  If that’s the direction to go and it makes sense, swell.  Rock the mutha out. Of course, I then had to upgrade/port/bitchslap a major project that had been built on Asp.NET 5 MVC 6 (or whatever it was called) to Asp.NET Core 1.o. Awesome.  Fantastic.  It...

posted @ Wednesday, June 15, 2016 11:03 PM | Feedback (0)
Asp.Net Core fail, what a surprise, it’s NuGet related

Rebuilt my SurfaceBook, downloaded all code from TFS, solution has 41 projects, one of which is an upgrade to my most important web site to Asp.Net Core. I’m on a flight from the west coast back to Chicago.  Every single project builds, except one.  And which one is that?  The Asp.Net Core one, of course.  Why is that?  Oh, it wants to connect to NuGet servers to download whatever it needs, it could actually keep those in TFS so that all packages were there from the start, but apparently not. So much for using the 4 hours to...

posted @ Tuesday, June 14, 2016 12:12 PM | Feedback (0)
Visual Studio 15 Preview: The DotNet tooling SDK does not appear to be installed on this computure. Please install it and then close and reopen the solution.

The brilliantly named Visual Studio 15 preview (Visual Studio 2016 would have been too hard?) throws this error when trying to open property pages of an Asp.Net MVC 6 project, and won’t build them.  Or clean them even.  And don’t even think about debugging it. “Daddy, what’s a computure?”  “I don’t know sweetie.” It took two runs of the installer to get it to install, and even on the second run, there were two popup errors (with obscure messages preventing any insight into what actually failed). It does not, however, seem to hork up running it from...

posted @ Wednesday, March 30, 2016 11:53 PM | Feedback (0)
.NET renaming

I don’t think anything is downloadable yet, but while I will ‘miss’ saying Asp.Net 5 MVC 6 (occasionally with EF 7), I think this makes sense: REINTRODUCING ASP.NET CORE 1.0 AND .NET CORE 1.0 ASP.NET 5 is now ASP.NET Core 1.0. .NET Core 5 is now .NET Core 1.0. Entity Framework 7 is now Entity Framework Core 1.0 or EF Core 1.0 colloquially.

posted @ Tuesday, January 19, 2016 7:06 PM | Feedback (0)
Running Asp.Net 5 Website on IIS

Great summation here of what I posted previously, and that’s all good. But read the first paragraph: As ASP.NET 5 hit RC1 about a month go, more and more folks are looking at production deployments and other real life use cases of it. Going beyond demoware and experiments, to real applications, inevitably leads to thinking about hosting it somewhere – which, if your environment is Windows, most likely means IIS. Think about this.  Asp.Net 5 hits RC1 and people are thinking about hosting it somewhere…. Microsoft kills WebForms, thinks running c# in Visual Studio Code on...

posted @ Monday, January 11, 2016 11:43 AM | Feedback (0)
Troubleshooting Asp.Net 5 MVC 6 Running Under IIS

Not IIS Express.  Real IIS. So, I’ve been playing around with two projects in order to jumpstart my learning of Asp.Net 5 MVC 6, TheWorld and Boilerplate, and had difficulty getting them to run under IIS (even after getting them to run fine with IIS Express).  TheWorld would throw up a 500 server error with no information to be found, while the latter kept redirecting for no apparent reason.  The solution to each was different, though some common troubleshooting helped. The best thing you can do is make sure you have this line in your web.config: <httpPlatform...

posted @ Friday, January 08, 2016 12:20 AM | Feedback (0)
PATCH support for Asp.Net 5 MVC 6?

So, where is it? They got rid of ODATA support because….who knows.  Didn’t fit in with the magic vision of the future (maybe OSX or Linux doesn’t support PATCH………), I guess. There’s a new Microsoft.AspNet.JsonPatch namespace.  Only available in the latest version of C#.  That makes it useless to build on the client side, unless your client is running the latest version of C#.

posted @ Saturday, January 02, 2016 1:07 AM | Feedback (0)
Separated at Birth? Shawn Wildermuth and Patton Oswalt

Their voices anyway.  Watching his Pluralsite course on Asp.Net 5 MVC 6, and it’s uncanny.

posted @ Thursday, December 31, 2015 9:32 AM | Feedback (0)
Are you targeting the full .NET framework and the CoreCLR? Please stop

“Well, the CoreCLR can’t process images or send email, but there should be 3rd party NuGet packages to take care of this.  And this way, if you every need to move from Windows to OSX, it will be seamless.” Oh.  My.  God.  No, people.  Lowest common denominator programming is wrong.  WRONG. WRONG. WRONG.

posted @ Tuesday, December 29, 2015 9:51 AM | Feedback (0)
Everything above the .NET layer is a NuGet Package

Yeah, that should go well.

posted @ Tuesday, December 29, 2015 9:49 AM | Feedback (0)
Deploying an Asp.Net 5 MVC 6 RC 1 WebApi to IIS

I’d worked through some of the issues with WebApi 2 before, so it was largely the same, with a couple of differences due to the half-baked implementations.  I certainly hope it gets better. You need to do these things: Install the Http Platform Handler You will need to go here and download the relevant 1.2 or higher handler.  Out of curiosity, does anyone run 32-bit anymore?  I installed the 64 bit one. Update your web.config Even when...

posted @ Sunday, December 27, 2015 11:22 PM | Feedback (0)
Using EF 6 with Asp.Net 5 MVC 6

Just an aside, but Microsoft’s naming conventions are getting absolutely comical. Anyhoo….Microsoft appears to hate connection strings now.  With UWP and now with Asp.Net 5 MVC 6, they just don’t make things easy at all. Since EF 7 is woefully undeveloped, and even when it RTMs, it won’t be ready for prime-time, I was trying to get an existing EF 6 infrastructure to work with WebAPI in the new Asp.Net 5 MVC 6 world (yes, I’m going to keep typing it out).  Since code changes are fun, there were various changes that needed to be made to take...

posted @ Friday, December 25, 2015 11:59 PM | Feedback (0)
Asp.Net 5 MVC 6: Why AddMvc() and UseMvc()?

This is one of those things that strikes me wrong about the whole new shiny system.  It’s a bit of a shame when they redo everything from scratch and get such basic things wrong (“we got rid of web.config.  why?  To make configuration more difficult!!!”) There is a ‘Pay As You Go’ notion that they like to talk about in their discussions.  The idea, not entirely stupid, is that you need to explicitly state how you want things to be, so to speak, so as not to end up with a bunch of framework (and other) code that you...

posted @ Friday, December 25, 2015 10:34 PM | Feedback (0)
Configuring ASP.NET WebAPI 2 to allow Put and Delete

Whew.  That was more difficult than it needed to be. Since I’ll forget this….. <system.webServer>    <modules runAllManagedModulesForAllRequests="true">      <remove name="WebDAVModule" />    </modules>    <handlers>      <remove name="WebDAV" />      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />      <remove name="OPTIONSVerbHandler" />      <remove name="TRACEVerbHandler" />      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"...

posted @ Tuesday, September 15, 2015 1:12 PM | Feedback (0)
No odata support in ASP.NET MVC 6

From here: Question: Is there support coming for OData? There is no planned work for Odata support in MVC 6.  Please ask more about this in the home repository and we can follow-up on it. Well.  That’s awesome.  At least I can retool what I had in development that was based on OData.

posted @ Saturday, September 12, 2015 11:27 PM | Feedback (0)
Asp.Net 5 & dependencies, still not right

This is not all that shocking, but I was trying to follow this demo, and downloaded the code and tried to run it. As the article states: The required dependencies are added to the project.json file. This is the hardest part, as you have to figure out which packages are required and also if the packages work together. It’s even harder when the packages can’t be found. From project.json:   Output (after package ‘restore’):   If you go here, you see:   Core and...

posted @ Wednesday, September 09, 2015 9:12 PM | Feedback (0)
Web site debugging problems? Try running it outside the debugger at least once

I’ve been looking at this, because I’m looking into how to create a site that uses OData with CQRS (not to mention some Windows Universal Apps that use tasks to call OData services….”Over-architectured solution?  You’re soaking in it!”) and have been having a hell of a time debugging it (I know it uses WebAPI, but same difference). I was cursing Angular, because the fun thing with javascript is you have to remember to F12 and look at response/request bodies and headers and it has all these strings and it kept giving me 500 errors because of ‘ambiguous matches’ on...

posted @ Tuesday, August 25, 2015 7:26 PM | Feedback (0)
Microsoft and Versioning

From Scott Guthrie’s introduction: ASP.NET 5 is an open source web framework for building modern web applications that can be developed and run on Windows, Linux and the Mac. It includes the MVC 6 framework, which now combines the features of MVC and Web API into a single web programming framework.  ASP.NET 5 will also be the basis for SignalR 3 Well, that won’t be confusing in any way, shape or form.

posted @ Monday, February 23, 2015 8:24 PM | Feedback (0)
the type or namespace webviewpage does not exist in system.web.mvc

When setting up a project that I knew was good, I kept getting errors like this when trying to build and couldn’t figure it out, especially since it was referencing pages in Temporary Asp.Net directories. What resolved the issue was making sure that copy local was set to true on the system.web.mvc reference.

posted @ Thursday, January 29, 2015 8:14 PM | Feedback (0)
The type exists in both temporary assemblies

So, after spending 6 or 9 hours on this…. Kept building a solution that contained multiple web sites, both using T4MVC (this is totally tangential, the problem wasn’t its fault), and I kept getting ambiguous reference errors regarding the MVC class that it auto-generates, and it would reference temporary assemblies within Temporary ASP.NET files, etc. Would make changes, clean, rebuild……no resolution. Finally, I looked at the bin directory of the one web site.  WTF.  Why is there a DLL for the other web site in there? When you clean a solution, it won’t delete dlls it...

posted @ Thursday, November 13, 2014 12:21 PM | Feedback (0)
Visual Studio Build Error: Error to use a section registered as allowDefinition='MachineToApplication' beyond application level

I get this from time to time, and though it is commonplace to me now, I thought I’d blog it just in case I forgot. Sometimes you try to build your web application and you get this error.  And you haven’t been doing anything with your web.config file, so you know it has nothing to do with that. Delete the “obj” folder from your solution (it might be hidden since it isn’t technically part of the solution).  For some unknown reason, this causes this error to occur.  Deleting the folder clears the error. Update: I’m not sure...

posted @ Saturday, May 31, 2014 3:16 PM | Feedback (0)
Visual Studio Problem: The breakpoint will not currently be hit

Might want to check if you are running a release configuration instead of a debug configuration.

posted @ Wednesday, March 19, 2014 2:48 PM | Feedback (0)
Could not load assembly System.Web.Helpers 1.0

Try installing ASP.NET MVC 3.

posted @ Wednesday, January 29, 2014 8:33 PM | Feedback (0)
Single Page Applications, JavaScript, and I still hate strings

Sergio gave a good presentation on some single page application work he’s been doing. I’m somewhat envious.  All the cool kids are doing things like that (from the .NET space, it seems they went from .NET to Ruby to JavaScript…I’m not sure what’s next), and while Sergio isn’t a kid, he is pretty cool. But he loves JavaScript.  As he mentioned in his talk, some people hate it.  I think I’m one of those people. All of my instincts tell me that there could be serious problems with these sorts of apps (I’m thinking about usability in...

posted @ Thursday, August 22, 2013 10:58 PM | Feedback (2)
IE8 Bug with CSS Layout: Server renders different from local developer machine

Ran into this issue with some work on recently, and was totally confused until I saw this: The solution is described here: You need to add the following meta tag to your page (or master page if you are using such a thing): <meta http-equiv="X-UA-Compatible" content="IE=8">

posted @ Thursday, August 22, 2013 10:07 PM | Feedback (0)
EC2: Enabling IIS Web Deploy Publishing from Visual Studio

Once again, mainly for me, because it was a slight pain in the ass. You have to have an EC2 server already set up.  I’m not going to cover that. If you just try to publish to your EC2 server from Visual Studio using a newly created Web Deploy profile, you will likely get a lot of errors. Firstly, within your EC2 admin page, you need to allow for inbound connections on port 8712, which is what the Web Management Service uses.  Oh, you also need to make sure this service is started and set to start...

posted @ Monday, August 19, 2013 12:05 AM | Feedback (1)
Glimpse AspNet 1.3.1 Installation Errors

Given how nifty Glimpse seemed in the three minutes I spent working with it on a personal MVC app, I tried to install it locally on a work project. No worky. Errors in web.config, such as: A bunch of errors with extra <HttpModules> section being added (and the like).  All of these were fixable with some manually typing.   The readme page itself threw some odd errors: Those are just annoying. The biggest issue was that every single page hit would throw some Javascript error, most of them in...

posted @ Wednesday, July 24, 2013 2:20 PM | Feedback (0)
Glimpse/NuGet Doh Reminder

So, I was looking at this post and liking all of the nifty functionality they’ve added to Glimpse (I’d checked it out a while ago, and not been that thrilled), and so installed the latest version. Or so I thought.  When I ran my app, it kept telling me I had the previous version.  I uninstalled all packages and reinstalled, still nothing.  Naturally, I started cursing Nuget, as I am wont to do. Oh, wait.  Hey, Johnny Dumbass Developer, if you add nuget packages, you think maybe you might want to recompile the app? Oops.  Yeah, that...

posted @ Monday, July 22, 2013 7:05 PM | Feedback (0)
ASP.NET MVC Forms Authentication Reminder

When implementing Forms Authentication, even when you do all that stuff to create an authentication ticket, you also have to remember to add to the root level web.config the configuration data needed to make sure Request.IsAuthenticated actually comes back true, along the lines of: <authentication mode="Forms">       <forms loginUrl="~/Account/LogOn" timeout="2880" />     </authentication> Inside of the   <system.web> tag.

posted @ Wednesday, June 26, 2013 9:16 PM | Feedback (0)
Resolved: Unable to start debugging on the web server

In a previous post, I mentioned how, for some reason, I could not get VS 2012 to debug an ASP.NET MVC 4.5 Razor web app (or whatever you should call them). It turned out to have nothing to do with the MVC version (which I sort of suspected from the start). I was having difficulties getting some CSS changes to apply to the site using IIS.  I love/hate CSS in general, but definitely when it comes to the development process.  Usually, when using VS 2012, you can make a change, rebuild the site, and the change immediately updates...

posted @ Tuesday, June 25, 2013 7:42 PM | Feedback (0)
Asp.Net MVC Razor 4.5: Unable to start debugging on the web server

Update: check here for the resolution, the problem has to do with http vs. https, not with the razor version. I’m putting this in as a placeholder in case I can figure out what the solution is. I have two razor web sites, one is MVC 3, the other MVC 4.5 as sub-applications under a common route.  Normally, when you get this error, it is because of the virtual directory isn’t created properly, or there’s something funky with the application settings, or the app pool….something along those lines. However, while the MVC3 site can be debugged just...

posted @ Saturday, June 22, 2013 6:44 PM | Feedback (0)
I’d almost forgotten how much I love ViewState

Working on a project that uses WebForms for the first time in what seems like a couple of decades.  I know I could merge MVC views into it, but for various reasons that isn’t an option. The great thing about WebForms (and I mean that entirely sarcastically of course) is when you try to do something that appears to be even slightly outside the normal happy path, you run into the issue where the black box magic stops working so magically and you have to go muck around.  I believe the percentage of projects that end up going slightly...

posted @ Wednesday, July 11, 2012 10:13 AM | Feedback (0)
Fix: Getting rid of weird Asp.Net MVC 3 “?area=” links

This is potentially a fix without a problem, but… Using syntax like this (I’m using T4MVC here): @Html.ActionLink("Home", MVC.Home.Index()) I expect to have the link rendered as: http://localhost/ Yet, sometimes, it would render as: http://localhost/?area= WTF?  What’s with that?  There is (AFAIKT) no functional difference between them, but I found it annoying. My google-fu failed me for quite a while until I saw a random comment in some post and found that if I used this syntax: <a href="@Url.Action("Index", "Home")">Home</a> I always got the right rendered link. Why?  I...

posted @ Sunday, January 22, 2012 12:27 AM | Feedback (1)
The item 'T4MVC1.cs' cannot be deleted

I ran into this problem about a month or two ago, and don’t remember how I fixed it. Every time I build my solution which uses T4MVC, I get this error unless I manually delete the file.  Also, note that it is “T4MVC1” and not “T4MVC.”  This happened the last time as well, where somehow the solution thinks it needs to name the file differently. I will post the solution whenever I figure out what it is so that it is documented for myself the next time it happens.

posted @ Sunday, February 06, 2011 3:13 PM | Feedback (10)
Where and What is WebResource.axd?

I’ve always wondered about this.  Scott Mitchell gives the answer here. Snippet: “WebResource.axd is an HTTP Handler that is part of the .NET Framework that does one thing and one thing only – it is tasked with getting an embedded resource out of a DLL and returning its content.”

posted @ Thursday, October 28, 2010 2:17 PM | Feedback (0)
How to manage user stories?

Scott Bellware has a post about user stories in which he discusses a very obvious, but not obviously manageable, issue.  <digression>Since being ‘kicked to the curb’ so to speak from the MVP C# program, it’s easy to dismiss a lot of what Scott says as sour grapes.  Given our past lack of sympatico, so to speak, it would be easy to for me to dismiss a lot of what he says as someone grasping onto Ruby as a reaction to particular events.  But, I think that would be a mistake.</digression> When using a tool/language/whatever approach like I...

posted @ Tuesday, October 05, 2010 11:35 PM | Feedback (0)
T4MVC methods can only be passed pseudo-action calls (e.g. MVC.Home.About()), and not real action calls.

I’ve run into this error before when using T4MVC, and I posted on the Alt.NET yahoo group at the time.  I don’t recall if I ever explained the cause for this, and since I momentarily forgot about the resolution, I’m posting it here again, as much so that I know it will be lodged in my brain. When using T4MVC, there is a file that is added to your Visual Studio project/solution that generates related .cs files to enable T4MVC functionality.  If you change a controller to add a method that returns an ActionResult, and add code in...

posted @ Thursday, September 16, 2010 8:35 PM | Feedback (3)
A description of a not entirely ideal software development project

Names and places are changed to protect…well, to protect against any personal liability.  You can guess the rest. The first thing you will note about a project like this is that the actual end user and/or business requirements are not really defined until you are at least 75% through the development of the software that is supposed to support the requirements.  An important thing to highlight here is that the actual end user requirements and the business requirements are not necessarily the same.  No, it would be folly to think that they were. Another fine point is when...

posted @ Friday, June 18, 2010 7:21 PM | Feedback (0)
Windows 7 /Vista – Can’t Edit or Save Files in C:\Inetpub

I rarely ever put any code in C:\Inetpub, but some applications will put their websites there by default. And you may find yourself surprised when, even when using an Administrator account, you don’t have permissions to update files or save files under that location. Turns out it is an UAC issue.  From Thomas Deml, a Program Manager for IIS at Microsoft, in this post: Here is an easy fix. Run the following command from an elevated command prompt (right click the "command prompt" icon and select "Run as Administrator"). icacls %systemdrive%\inetpub /grant  %userdomain%\%username%:(OI)(CI)(F) /grant %userdomain%\%username%:F...

posted @ Sunday, November 22, 2009 7:06 PM | Feedback (19)
The new VisiCalc

Though I sometimes feel like it, I’m not actually old enough to know what VisiCalc was, but Joe Stagner wrote a post in which he made an analogy between the two: VisiCalc was THE spreadsheet of the day !  It might have done 2% of what Excel 2010 does, but when it was released it was an AMAZING innovation…ASP.NET/Web Forms was a perfect match for the skill set of the day (2001/2002) and was exactly what the industry needed at the time. I don’t know that I would say it was a *perfect* match, but I generally agree...

posted @ Tuesday, September 01, 2009 10:21 PM | Feedback (0)
Alt.NET Baby-ism

So, Ayende wrote a post criticizing some API related stuff about the ASP.NET MVC Framework. Phil Haack had a reply that dealt with why the design was done the way it was done, which contained the following funny comment: “We spent a lot of time thinking about these design decisions and trade-offs, but it goes without saying that it will invite blanket criticisms. Fortunately, part of my job description is to have a thick skin. ;) In part, by favoring usability in this case, we’ve added a bit of friction for those who are just starting out...

posted @ Thursday, November 06, 2008 7:31 PM | Feedback (3)
Visual Studio 2008 - Vista SP 1: IIS 7 Debugging No Longer Works After SP Install

Now, to be clear, I believe that I am still working in classic mode and running VS 2008 as Administrator to get around all the issues that came up when Vista came out, so this may not apply to you. But, after installing SP1 for Vista, I could no longer debug my web applications running on IIS7.  I worried about some major problem that would take hours if not days to fix. As it turns out, the WAS service was not set to auto-start, which prevented any of the application pools from starting, which prevented the WWW service...

posted @ Friday, February 22, 2008 8:02 PM | Feedback (0)
ASP.NET, DataContext, and LINQ to SQL: Business Process Model

In my previous post, I pointed out a good article by Rick Strahl on different ways to handle DataContext management and mentioned that I used his 'Business Object' method.  This actually isn't quite accurate, so let me expand on that a little bit. I'll use a standard e-Commerce site as an example.  If you think about most of the data access that is required when creating an eCom site, there is little about the DataContext that you really need to worry about.  Product lists, navigation elements, search results, and other items are essentially read-only, so you can use a...

posted @ Thursday, February 07, 2008 12:07 AM | Feedback (7)
LINQ to SQL DataContext and ASP.NET

I was about to write up a long post about this when I saw this post out today by Rick Strahl.  I'm using what he calls the 'Business Object' option, and I like it so far. His post is better, so read up.   Update: I'm actually using what I would call the Business Process option.  See here.

posted @ Tuesday, February 05, 2008 7:44 PM | Feedback (0)
.NET: Selecting DropDownList Item by Some Text or Value

myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.FindByText(Text)) myDropDown.SelectedIndex = myDropDown.Items.IndexOf(myDropDown.items.FindByValue(Value))

posted @ Sunday, February 04, 2007 6:17 AM | Feedback (0)
.NET: Currency format for TextBox value

< asp:TextBox runat="server" Text='<%# Bind("Cost", "{0:c}") %>' id="txtAmount" Width="50px"></asp:TextBox>

posted @ Sunday, February 04, 2007 6:08 AM | Feedback (0)
IIS 7, Vista, and Visual Studio 2005

A couple of points: - if you go into IIS 7 Manager, try to make changes like changing the default documents, and it gives you an “Access Denied” message, it means your web.config is read-only.  For some reason, every time you try to make changes, it apparently tries to open the web.config file (even if it doesn't do anything to it), and if it is read-only, it fails.  Even if you are running as administrator. - to debug, you have to run VS 2005 as administrator, you need to enable Windows Authentication, and you sometimes (not clear when exactly) need to run...

posted @ Saturday, February 03, 2007 12:48 PM | Feedback (0)
ASP.NET: Could not load type

Various solutions to this problem can be found here: For me, deleting dlls usually works (you might also need to go into the temporary files directory inside the Microsoft.Net framework directory and delete all files there as well...this may require restarting or even rebooting the server).

posted @ Wednesday, August 09, 2006 2:01 PM | Feedback (0)
Duplicate 'ComVisible' Attribute

This will happen within Visual Studio with Web Application Projects (the new project type from Microsoft..... ) if you have nested web sites (e.g. you have a top-level site that has one or more child sites).  What happens is the project for the top-level site sees multiple assemblyinfo.cs files (its own and the child sites') when it tries to build, and so fails. Simply set the build action for the child sites' assemblyinfo.cs files to “None” (within properties), and all will be fine.  This is a project level setting, so the project for the child site will compile the asssemblyinfo.cs file normally.

posted @ Thursday, August 03, 2006 7:05 PM | Feedback (0)
Create machineKeys for ASP.NET applications;EN-US;312906

posted @ Saturday, January 14, 2006 2:00 PM | Feedback (0)
Setup Web Admin Tool for Production Servers

From khaivq at “I have been able installed WebAdminTool for Production Servers using the following steps: Create a virtual directory ASP.NETWebAdminFiles in IIS that point to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles Open properties windows of the new virtual directory, make sure that it is configured to run with ASP.NET 2.0, and in Security tab, uncheck Anonymous Access, check Integrated Windows Authentication. After that, you will be able to connect to WebAdminTools using the following syntax http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=XXX&applicationUrl=/YYY in my case, it is: http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=D:\Tasks\Libranyon\Photonyon\&applicationUrl=/Photonyon Although I don't recommend to do it, if you want to access WebAdminTool from other computer, open WebAdminPage.cs from (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code) and comment the following code block             if (!application.Context.Request.IsLocal) {                ...

posted @ Sunday, January 08, 2006 4:31 PM | Feedback (0)
Visual Studio 2005 Web Deployment Projects

posted @ Monday, November 07, 2005 10:39 AM | Feedback (0)
Using IIS with Visual Studio 2005

A good overview:

posted @ Monday, November 07, 2005 10:34 AM | Feedback (0)
MVC Links

Various links about MVC:

posted @ Monday, October 31, 2005 12:44 PM | Feedback (0)