I have a background service running which sends out emails to users of my website. I would like to write the email templates as MVC views, to keep things consistent (so tha
This was my first attempt, and it failed. See above for the correct and working answer
This is as close as I was able to get, but it still didn't work. Now it complains about get_Server causing a NullreferenceException.
Just thought I'd post on here what I did and how far I got, in case anyone wants to continue the research.
I modified my csproj file to generate an assembly with the precompiled ASPX files, as such:
...
true
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\aspnet_merge.exe
...
This created a "MyProject_CompiledAspx.dll", which I then referenced from my application. This, however, caused a new NullReferenceException.
It's a pitty that ASPX files, being as powerful as they are, are so tightly integrated with the ASP.NET server.