Can I use ASP.NET web pages without deploying the bin folder?

I am creating a very simple site that was originally just a bunch of HTML / CSS files. Then I needed to add some server-side logic, so I thought that I would use ASP.NET web pages as they seem to be a suitable solution.

So, I changed index.htmlto index.cshtml, added the code that I need, and I, although that would be (I also added this base file web.config:

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
</configuration>

However, running this program on local IIS Express gave this error:

Unable to determine which version of ASP.NET web pages to use.

To use this site, specify the version in the web.config file. For more information, see the following article on the Microsoft support site: http://go.microsoft.com/fwlink/?LinkId=254126

So, I added this to my web.config:

<appSettings >
    <add key="webPages:Version" value="2.0" />
</appSettings >

Now the site starts up, but it processes UTF-8 really strange - although all the HTTP headers, file encodings and meta tags are correctly set to UTF-8, my national characters are not displayed correctly. I found this question: Do I need web.config for non-ASCII characters? but it really didn’t help solve my problem.

, , ? WebMatrix , , - web.config. , , bin , WebMatrix.

, , bin ? , 1,5 Git index.cshtml, , , ?

, .

+5
1

- ASP.NET UTF-8 UTF-8. , UTF-8 .

ASP.NET, WebPages. - , html, , UTF-8. - .

+1

All Articles