Webmatrix contains four different integrated design workspaces for your site. Each workspace can be accessed through the tab on the left of the screen. Note that different labels are selected, and the functional area at the top of the window will change accordingly.
- Website: This workspace provides the tools required to manage the website itself, including the website running URL and location on the local hard disk.
- Files: all source files and database files used in the site can be accessed in this workspace. It also provides syntax highlighting for multiple files, including ASP. NET, HTML, CSS, and PHP.CodeWrite.
- Database: This workspace provides tools for creating, editing, and managing databases.
- Report: This workspace provides Seo reports for webmatrix's work sites.
Let's take a look at it one by one:
Website Workspace
After selecting a website tag, we will see a page similar to the following:
The work environment is divided into three regions. The top is the functional area, which provides some quick command execution and functions. On the left side, you can see the tag button for switching to another workspace and some common functional area block commands in the current workspace.
Top functional area
First, you can see the top functional area. Some column-related commands are provided to manage the website.
My Website: provides the same features as my website on the welcome page, listing all websites created with webmatrix. It is very simple to use and can be easily switched to these projects at any time.
The release button, which is a very standard Microsoft Office interface style.
This part also reflects the design philosophy of webmatrix: Integration (all-in-one) design, point-to-end (end-to-end) solution from getting code to publishing sites to the Internet. As part of the release process, you may configure your settings or search for a web host on the Internet to host your website. Webmatrix integrates these functions in one place.
The running button also contains a menu, allowing you to select a browser to browse your website. According to the general menu of all the browsers you have installed in Windows, you may have different menus:
The running button contains all the browser startup options in the system. You can select multiple browsers to test the performance of your site in different browsers. The following shows how to use opera to browse the site:
There are three small buttons on the right of the running button: start, stop, and restart. These functions control the built-in IIS Express. If the IIS express service is stopped when a site is running, it will be automatically started.
When you manually start the service, you need to pay attention to the following columns. First, the webmatrix user interface will update and display the current service status, which will display the prompt bar at the bottom of the window.
In addition, the system notification area prompts that IIS Express is running. You can right-click this icon to manage your site.
The last button on the functional area is the request button. You can click it to open the request management tool in your workspace.
Manage site requests
You can also click the request button on the left to access the site's request management workspace. It has the same request function as the functional area. These requests are sent from the browser to obtain the content from your site. Whenever you start a browser to test the site, you will generate a request for the Images page, and then round-robin requests for various files in the site, such as requests for images or style files.
After enabling this interface, you will find another request tag on the functional area.
This can be observed that the request function is very useful for general site errors. For example, the most common error for a web developer is "missing images ", this often happens when the HTML label is used in a created site to specify an image. This label contains a src attribute to specify the actual path of the image file. If the content indicated by this attribute is incorrect, the browser will not render the image. Instead, it will render a default "loss" image. You can use the request viewing tool to quickly reduce the occurrence of such errors.
As shown in the preceding figure, the request tag contains a function button called error only, which can filter monitoring results and only Display error results, there is no need to display so many correct request results at the same time. Another filter item is to ignore the image request and filter out the capture of loss image errors.
All tracing results are listed in the main workspace, as shown in. Each request record contains the status of your HTTP request, which is represented by a small image. The HTTP predicate is used to indicate the action (get or post ); a URL is the requested resource address. The request is completed in milliseconds and a timestamp.
Here is only some of the most superficial request information, but you can select any request result to obtain more detailed information about this request. For example, here we see a record, which is an "information" icon in the Status column, so I am very curious about what it means, so I chose this line.
The workspace is updated on the right to display the trusted content of the selected entries.
The details show you more information you want to care about. For example, you can see that 304.0 indicates that the requested resource is not downloaded from the server because it already exists in the browser cache.
In addition to the details, this view also provides some suggestions for you to solve the problem of the corresponding request. For example, we will find that the 404.0 message (represented by a red ×) indicates that the request failed. When we select this row, we will see the following:
Looking at the detailed information panel, you will quickly find the requested file (favicon.css) that cannot be found. Each web browser looks for the favicon. ICO file and displays it as a site icon. We should create a unique favicon. ICO file for each site. You do not need to specify its location on the page. the browser will search for it in the root directory of the site by default. For example, an M-type image is displayed on the front end of the address bar on the http://www.microsoft.com/web site.
You can see this icon because the Microsoft site administrator put the favicon. ICO file under the root directory of the site. If the file exists in the browser, it is automatically displayed. This example of getting started website contains the corresponding icon file. To get the previous error report, I simply deleted the file.
Manage site settings
When you select this option on the screen on the left, you will see the site Settings area, where you have a lot of entries that need to be configured when running the site locally.
You can set the URL when webmatrix runs the site. The typical features of this URL are similar.Http: // localhost: <number>. In, it is set to http: // localhost: 8439. This number is the port number on the Local Web Service parsing interface. Generally, most servers use the classic port 80, which is also the standard TCP/IP Port for running page files over HTTP. However, many websites may exist on the development machine. Therefore, webmatrix assigns an independent port number to each site to ensure that they run on the IIS Express server. If you don't want the machine to automatically assign a number (such as 8439), you can easily modify it.
Enable SSLSome websites enable HTTPS (secure HTTP) protocol when processing sensitive information, such as email or bank signature and password. This protocol uses a secure encryption service, which exists on both servers and browsers. The SSL (Secure Sockets Layer) page requires the server to provide a certificate verified by the independent authentication system. This is a bit like a passport for us to go to a new country. You need to sign a valid passport in your country to prove your identity.
We can see a valid instance on the verification page:
We can see that the address bar of the browser is HTTPS protocol (not HTTP), and the browser is also marking that you are sending sensitive information to the Microsoft Site for authentication.
This SSL protocol ensures this secure browser mode. The IIS express service provided with webmatrix supports SSL, so if you need to provide an SSL-based security method, you can select the Enable SSL check box. Click Save in the title bar to save the settings.
When starting SSL, your website must have a certificate for authentication. because you do not have a certificate, you may encounter some running errors. Each browser will handle these problems in different ways.
Manage the default page. The last setting is under the settings page. It allows you to manage the details page. The default file name returned by the server when a URL does not specify the name of the accessed file. The server returns the first existing file from top to bottom in the installation list. If the file is not found in the list, an error is returned.
when you see the above instance, the website start URL is http: // localhost: 8439. When you send this request, note that it does not indicate the specific file name to be accessed. The server will find the default. cshtml is a default page in the request folder, so it is returned as the request response page. You can use this setting to add or delete the default page name. For example, you can create a new page name foo.html and add the file name to the default page list. The list items are moved up or down to adjust the default page position in the list. Move foo.html to the nearest part of the webpage. When the user clicks your website, the page foo.html will be used when the keyword is not explicitly specified. If this file does not exist, search for the name of the subsequent webpage, such as default.htm. The server returns only the first file in the list.