Why is CASSINI analyzed?
Cassini is an open-source project on asp.net. This section mainly provides an asp.net execution environment that is separated from IIS. The project demonstrates how to create a web server and run an asp.net application.
You can learn about Cassini:
1. How to implement the web server in the. net environment, and pay attention to those issues
2. Implementation nature of asp.net
3. Understand the concept of appDomain execution
Install
No problem. The default value is enough.
Run
A problem occurs, mainly because my. net framework is 1.0.3705, and the compiled cassini. dll downloaded by the system is compiled under v1.1.4322, which is more troublesome because it is signed. Therefore, the system prompts that the framework v1.1.4322 cannot be found during startup.
What should I do if I want to analyze this program?
Now that I have obtained the entire source code, I should be familiar with it theoretically and be able to master the entire system. I will build a project to cover all of it. add the cs file and resource file to a project, and delete the default form1 of the original project because CassiniWebServer. cs already has a main entry.
Debug and solve problems
1. Compile OK. However, it cannot be started. The. ico file is missing. Have you already joined the project? It turns out that our compilation program is in the bindebug directory, so I will copy the CassiniWebServer .. ico file to bindebug to start
2. Enter the root directory, port, and execution point of the asp.net application, OK, and click Start. An error occurs, as if the port is occupied. Impossible! My port 80 and port 8080 are not occupied. Is there a Trojan? I used fport.exe to query the port and found that no program was occupied. So what is the reason? Fortunately, you can Start debugging. I tracked the Start () function of the CassiniForm class of CassiniWebServer. cs and found an error in the following code.
Try {
_ Server = new Cassini. Server (portNumber, _ Blank root, _ appPath );
_ Server. Start ();
}
Catch {
ShowError (
"Cassini Managed Web Server failed to start listening on port" + portNumber + "." +
"Possible conflict with another Web Server on the same port .");
PortTextBox. SelectAll ();
PortTextBox. Focus ();
Return;
} That is, an error occurred while creating the server.
However, the source code does not explain the cause of the error, but arbitrarily tells me "Cassini Managed Web Server failed to start listening on port XXX". Obviously, is not careful (it is estimated that the author does not catch Exception ).
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service