238
❘
CHAPTER 11
Developing ASp.neT ApplicATionS
➤➤
Security: Any security that you want to set up has to appear as part of your application in a
Web.CONFIG
file. The WebDev.WebServer utility does tend to follow whatever rules you set
for Internet Information Server (IIS) if you have it installed. However, you can’t count on this
behavior when working on your own and you certainly can’t count on it when you send the
application to other machines.
➤
➤
Administrative tools support: Anything you normally configure through the Internet Information
Services console located in the Administrative Tools folder of the Control Panel is unavailable
when working with the WebDev.WebServer utility. Consequently, if your application relies on
a special ISAPI Filter, you won’t be able to execute it using the WebDev.WebServer utility. The
same holds true for anything else that you normally have to add using the Internet Information
Services console.
Savvy developers can get around some of the WebDev.WebServer configuration
limitations through judicious use of the
Web.CONFIG
file and by creating resources
locally. Make sure you don’t assume that an application won’t work simply
because you have to configure it in a new way.
➤
➤
Single user Web server: It’s important to remember that this is a single-user Web server. No one
outside the local machine can access the Web server because theoretically, it doesn’t exist — it’s
virtual. This means that you can’t perform some types of testing using the built-in Web server.
The feature that makes it so secure also prevents you from performing some kinds of real-world
testing. Multi-user applications simply won’t work with the built-in Web server.
Performing basic Testing
Your IronPython Web application works just like any other Web application you create. Because
IronPython is fully .NET capable, you can use any control set you want within the application. Of
course, you also have access to standard Web controls. All of this flexibility increases complexity
and makes it necessary to test your application fully.
The example application is relatively
simple, so testing isn’t cumbersome.
When you first start the application
by pressing Ctrl+F5, you see the Web
page shown in Figure 11-7. When you
type a value into the Type an Input
Value field and click one of the math
buttons (+, -, *, or /), the application
performs the desired task. Trying to
input an invalid value triggers an
error message like the one shown in
Figure 11-9.
FIguRE 11-9:
Incorrect values trigger an error message.
548592c11.indd 238
2/24/10 12:48:41 PM
www.finebook.ir
Do'stlaringiz bilan baham: |