user2422128
user2422128

Reputation: 13

How to call ASP MVC CSHTML View directly with ".cshtml" extension from browser

I want to call my asp mvc CSHTML View directly from browser with ".cshtml" extension like:

    www.mysite.com\receive.cshtml?...

instead

    www.mysite.com\receive?...

but i got 404

any idea ?

Upvotes: 0

Views: 9969

Answers (1)

haim770
haim770

Reputation: 49095

1. By default IIS Request Filtering is configured not to serve requests to .cshtml files.

2. Razor views are not meant to be accessed directly by the client. yet, take a look at https://github.com/ServiceStack/RazorRockstars

Upvotes: 1

Related Questions