razor websites not working and all dlls are present
Posted
by
Michael Tot Korsgaard
on Stack Overflow
See other posts from Stack Overflow
or by Michael Tot Korsgaard
Published on 2013-10-18T13:18:58Z
Indexed on
2013/10/18
21:56 UTC
Read the original article
Hit count: 333
I've uploaded a .cshtml
website to a surftown
server, and I got some problems running the code. But I have a problem with it running the Razor
code.
This is how the page renders:(Default.cshtml)
I've already checked for internal communication problems. And this is my result:
But then why isn't it working, and how can I fix it?
I've heard that it can be a problem with views but how whould I fix this if that's the case?
My websites folder tree: (And some files too)
- App_Code
-
App_Data
-
packages
- Microsoft.AspNet.Razor.2.0.20710.0
- Microsoft.Asp.Net.WebPages.2.0.20710.0
- Microsoft.Asp.Net.WebPages.Administration.2.0.20710.0
- Microsoft.Asp.Net.WebPages.Data.2.0.20710.0
- Microsoft.Asp.Net.WebPages.WebData.2.0.20710.0
- Microsoft.Web.Infrastructure.1.0.0.0
- NuGet.Core.1.6.2
-
packages
- bin
-
packages
-
jQuery.2.0.3
-
Content
- Scripts
- Tools
-
Content
-
Microsoft.AspNet.Mvc.4.0.30506.0
-
lib
- net40
-
lib
-
Microsoft.AspNet.Razor.2.0.30506.0
-
lib
- net40
-
lib
-
Microsoft.AspNet.WebPages.2.0.30506.0
-
lib
- net40
-
lib
-
jQuery.2.0.3
-
Pages
-
Chapters
- Read.cshtml
-
Edit
-
Move
- Chapter.cshtml
- Entry.cshtml
-
Move
-
Entries
- EnterEntry.cshtml
- EnterNote.cshtml
-
Login
- Login.cshtml
-
Search
- Result.cshtml
-
Chapters
-
Scripts
-
Addons
- TinyMCE
-
Addons
-
Styles
- CSS
-
Views
- _Layout.cshtml
- Default.cshtml
My web.config file looks like this:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<buildProviders>
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor"/>
</buildProviders>
<assemblies>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
</system.web>
<connectionStrings>
<add connectionString="database connection" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
EDIT:
Is it a problem that all my files are .cshtml
?
© Stack Overflow or respective owner