You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/option.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ end_trim_in_aspx_file=true
17
17
set_break_for_layout_page=true
18
18
convert_cshtml_to_aspx=false
19
19
show_minor_errors=false
20
+
error_page_path=/error.aspx/{value}
21
+
prevent_access_default_aspx=false
20
22
```
21
23
22
24
**The possibility to load aspx page names as directory names**
@@ -138,9 +140,9 @@ In the options file, exist an option to support cshtml files so that users of th
138
140
139
141
You can code in these files with razor syntax and standard syntax.
140
142
cshtml files will be available with aspx extension after compilation.
141
-
For default cshtml pages, the name should be Default.cshtml; So pages named Index.cshtml will not be the default route.
143
+
For default cshtml pages, the name should be Default.cshtml; so pages named Index.cshtml will not be the default route.
142
144
143
-
Please note that these files must not be added to projects in Visual Studio; The reason for this is that, in addition to the CodeBehind framework, these pages are also compiled in the default .NET mode and can create unstable situation and security risk conditions.
145
+
Please note that these files must not be added to projects in Visual Studio; the reason for this is that, in addition to the CodeBehind framework, these pages are also compiled in the default .NET mode and can create unstable situation and security risk conditions.
144
146
Also note that the default code highlighter of Visual Studio may in some cases have unnecessary errors from cshtml pages based on the CodeBehind framework.
145
147
146
148
Operation location: Compiling view files
@@ -154,3 +156,41 @@ By enabling the show minor errors option, when compiling, errors that do not cau
154
156
In the future, more customization options will be added to the options file.
155
157
156
158
Operation location: Compiling view files
159
+
160
+
**Error page path**
161
+
162
+
(`error_page_path=/error.aspx/{value}`)
163
+
164
+
The default CodeBehind template includes an error page. In the options file, there is an option that determines the path of the error file; the path of the error page is set by default in this option. In the error page, we activated the page section attribute by default. If you look carefully at the path of the error page in the options file, you will see the value value surrounded by two brackets. This is a variant and the numeric value of the error replaces this variant.
165
+
166
+
Example
167
+
`/error.aspx/500`
168
+
169
+
According to the path above, the value 500 is substituted for the {value} variant.
170
+
171
+
You can call up the error page according to the type of error.
172
+
173
+
The link below is a tutorial on how to configure the error page.
View files in CodeBehind framework have aspx extension; if you create a View file named Default.aspx in a directory, accessing the directory will execute that file. So Default.aspx is a default View for a directory path.
184
+
185
+
Example:
186
+
If there is a `Default.aspx` file in the root, the `example.com` request executes the `example.com/Default.aspx` path.
187
+
Similarly, if there is a `Default.aspx` file in `root/dir`, requesting `example.com/dir` will execute the `example.com/dir/Default.aspx` path.
188
+
189
+
However, the `Default.aspx` file path will still be accessible. Enabling this option disables access to the `Default.aspx` path.
190
+
191
+
Example:
192
+
The path `example.com/dir/Default.aspx` will not be available, but the path `example.com/dir/` will still be accessible.
193
+
194
+
By activating this option, additional urls are prevented and thus SEO is improved.
0 commit comments