Reputation: 3
I am working on revising our office intranet site from .ASP under IIS5 to CSHTML under IIS7, and I am using WebMatrix to work on the code. I am running into a problem where any CSHTML "@" codes are not being parsed by the browser, and instead is the text is just being dumped straight to the display. For example:
@{
var db = Database.Open("DB_Name");
var selectQueryString = "SELECT * FROM Table_Name ORDER BY Row_ID";
}
is appearing on the page as
@{ var db = Database.Open("DB_Name"); var selectQueryString = "SELECT * FROM Table_Name ORDER BY Row_ID"; }
I am trying to view these pages with IE7 running on XP SP3. What little information I have found points to a possible issue with Microsoft.Data.dll, but I am not sure what it could be. I do know that the dll is not on the machine I am using to view the pages.
Upvotes: 0
Views: 914
Reputation: 60065
There is no technology called "CSHTML under IIS7". CSHTML is file extension used for Razor view engine for ASP.NET / MVC. More details here. It should not be send to browser in this way, browser should receive pure HTML. Make sure that in IIS settings the page extension is handled by ASP.NET.
Upvotes: 1