If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net in a "normal" .net environment for example to generate text, code,...
Why does the Web Platform Installer force you to install SQL 2008 Express?
I have a production server which already has an installation of SQL 2000 but no web development tools are installed. I would prefer not to add SQL 2008 Express if it is not necessary. The server in addition to being the primary intranet webserver is also DC, APP SERVER, FILE SERVER and basically does not need to handle an extra instance of SQL.
The main purpose of this is just one of convenience to have the web development app on the RDP Desktop instead of attaching to the server in some manner (ftp/unc share).
I'm working trying to realize a requirement where the pages should be 'configurable' at runtime (per client), stored in a database - a requirement that I have no say in Anyway, the current plan is to use the Razor view engine and 'load' the 'pages' dynamically. I have a basic sample working using a VirtualPathProvider and VirtualFile that serves up Raz'pages' on the fly.The question I have if there is a better approach when I have the Razor 'pages' stored in a dB (or any other repository)?
There seems to be some constraints and concerns when I check other postings. For example:'If a Web site is precompiled for deployment, content provided by a VirtualPathProvider instance is not compiled, and noVirtualPathProvider instances are used by the precompiled site.' (from http://msdn.microsoft.com/en-us/library/system.web.hosting.virtualpathprovider.aspx )
Trying out the Razor view engine and for some reason my generic helper methods are breaking. For example:
public static class UrlHelperExtensions { public static string NonGenericHelper(this UrlHelper helper, Type controller) { return controller.Name; } public static string GenericHelper<TController>(this UrlHelper helper) { return typeof(TController).Name; } }
Works as expected:@Url.NonGenericHelper(typeof(ProjectEuler.UI.Models.Home))Breaks with the following exception:
@Url.GenericHelper<ProjectEuler.UI.Models.Home>() "CS1502: The best overloaded method match for 'Microsoft.WebPages.WebPageUltimateBase.Write(Microsoft.WebPages.Helpers.HelperResult)' has some invalid arguments"
The only workaround I could find is treating it as a "multi-token statement":
how do I change the view engine from aspx to razor in an existing project? If I just change the file extension to cshtml I always get "The controller for path '/path/About' was not found or does ..."
We have a modular architecture where we have some views (cshtml) files in a separate project (class library). How can we get the syntax highlighting and autocomplete to work when the project isn't an MVC project?
note that the class library has controllers, views, models etc. It just doesn't have the web.config, global.asax, etc that a normal mvc project would have.
The intellisense works for everything but the so important model:
With MVC3 RTM, if you hover over the Model, you can now get a better error message:
[code]....
Then after adding the build provider, this error message appears:
Would like to add a third party test framework (such as NUnit or MbUnit) to the drop-down list of test projects for the ASP.NET MVC3 type project in Visual Studio 2010.
This had worked before for ASP.NET MVC2 and prior, but the msdn instructions are not accurate and does not work. Creating the registry keys in the HKEY_CURRENT_USER seem to delete the keys every time the VS-2010 starts, the HKEY_LOCAL_MACHINE does not follow the same tree structure.
how to add a third party framework under ASP.NET MVC3?
installing visual studio 2010 pro RC in windows Xp SP3 and getting a message prompt : invalid windows installer package contact vendorlog file says
Error Message:
[02/22/10,17:09:07] Microsoft Application Error Reporting: [2] CMsiComponent::Install() expects the setup file for Microsoft Application Error Reporting, but the file failed verification. [02/22/10,17:09:07] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInstallManager() with HRESULT -2147467259. [02/22/10,17:09:08] VS70pgui: [2] DepCheck indicates Microsoft Application Error Reporting is not installed.
point me in the direction of getting the Razor View Engine working correctly with an empty "non MVC" web application. I can correctly set it up with a MVC app or with a Web Site (Razor), but if I try and get it running with and empty app, I run into the following two problems:
1) I can't add new razor files to the application (*.cshtml files)
2) Once deployed to AppHarbor, the .cshtml files aren't found unless they have the extension specified (i.e. /Default won't work, but /Default.cshtml does)
I started the Visual Web Developer 2010 installation via the Web Platform Installer 2.0. The progress bar reads: "Install progress: Installing Visual Web Developer 2010 Express [1 out of 1] It finishes after a while but I cant see a VWD shortcut in the start menu nor somewhere under program files, it does not appear in the control panel -> programes and features list as well. Where did it go? Did it install?
I've been using AJAX for a while now, and have installed it on a few computers before to run with Visual Studio 2008. I am now setting up a new computer to develop websites using the AJAX control toolkit. However, I cannot find ANY documentation in Microsoft to install AJAX. Everywhere it says "Install Toolkit" all instructions say install toolkit. Howerver, installing the toolkit does nothing it just adds the toolkit then does not work since the ajax extensions are not installed. So you obviously need to install the extensions or whatever first so Visual Studio can work with AJAX. NO where does it say this or how to do it. I'm amazed that any programmer can use AJAX at all, how the hell do I install ajax to work with visual studio, NOT the toolkit!
WebPI isn't able to install VWD 2010 Express on my system. I've previously un-installed the 2010 beta. Never had this problem before when upgrading VWD Express.
I get an HttpException (details below) after installing Visual Studio 2010 Pro RTM in an application developed using Visual Studio 2010 RC. The platform used was ASP.NET MVC2 RTW (already under VS10 RC).
I first uninstalled all RC software and even ASP.NET MVC 2, and then did a "clean" install of VS10 RTM. The ASP.NET MVC 2 version now installed on my dev machine is 2.0.50217.0.
Exception Message: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
InnerException Message: <FilePath>ViewsLanguageRenderLanguageNavigation.ascx(6): error BC30451: 'Model' is not declared. It may be inaccessible due to its protection level.
The error occurs on this "Html.RenderAction":
[Code]....
The "LanguageController" just calls into another service function as below:
[Code]....
Does anybody have an idea what is causing the problem?
Edit:
By the way, I might also share the actual view (partial view) that would show the languages to select from:
I'm struggling to install the Ajax toolkit in Visual Studio 2008 Developer Eddition. I followed all the steps in the ReadMe but everytime I right -click in the new tab and select "Choose Items..." my visual studio shows in the left hand bottom corner something like "Loading 'Choose Toolbox Items' dialog" and then after a few seconds visual studio just exits. What gives? Is there another way around this?