window| Control | Browser uses Windows Forms control in IE browser (iii)
Author:: Thiru Thangarathinam
Translation: Autumn Maple
Debugging Windows Forms controls
To debug a form control, you need to follow the steps below.
1. Open the browser and request the HTML page that contains the form control.
2. Open the Visual Studio.NET and select the tool-> the debugging process displays the following dialog box.
In the Process dialog box, select IEXPLORE.EXE to click the Attach button. When you click the Attach button, a dialog box prompts you to select the type of program you want to debug. We chose common Language Runtime and script two, as shown below:
OK closes the above window and Process window.
Open the user control file AuthorsWebServiceClient.cs from the vs.net File menu to set breakpoints in the source code. So once you set the breakpoint, you can debug the control, as shown in the following figure.
Windows Forms code Access permissions
Just like we discussed before. When a form control executes in IE, he uses the. The permissions that the NET runtime provides. To figure out how controls are used by the. NET runtime provides code access security to run in IE, let's go back to the previous, add the following code to the form control Load event:
In the above code we determine if there is a "testlog" log source on the Web server, and if not, we create it and delete the rebuild if it exists. As you might expect, executing the code requires more permissions, so the above code will not work properly through the Internet, and you will see the following hint window.
Through the above window we can clearly see that your visit was. NET run time limit.
When using form controls in IE, you need to be aware of his strengths and limitations. The main advantages include:
1. Implement a rich dynamic interface through the Web.
2. Seamless combination. NET code security policy.
3. Better than the performance of Java applets.
Restrictions include:
1. The client needs to be the Windows operating system
2. Need IE6.0 's support
3. The client needs to be installed. NET Run time environment
4. Server-side needs are Window2000 and IIS5.0 or later
Because of the above limitations, the transfer of client and server-side data may also be advantageous. For example, because the Windows Forms control is used in client IE, which requires the client to install. NET runtime, we can write code to determine whether the client has. NET runtime, which allows us to get the version number, or we get 0.0.
Conclusion
In this article, we discussed how to use the Browse form controls in IE and debug in the process. The. NET code access security control in IE is also mentioned.
Although the implementation of this technology requires client installation. NET runtime, but we can believe that the integration of. NET framework,windows2003 will be a good example in future Windows operating systems.
Finally, I hope you will find this article helpful and thank you for your reading.
About the Author
Thiru has almost six years of experience in architecting, designing, developing and implementing-using Object Oriented application development methodologies. He also possesses a thorough understanding the software life cycle (design, development and testing).
Expert with ASP.net,. NET Framework, Visual C#.net, Visual Basic.NET, Ado.net, XML Web Services and. NET Remoting and holds MCAD for. NET, MCSD and MCP certifications.
Thiru has authored numerous books and articles. He can is reached at thiruthangarathinam@yahoo.com.
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.