|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
POWERBUILDER LINKS YOU MUST CLICK ON Product Review Avoiding Potholes On The ASP Road
Avoiding Potholes On The ASP Road
By: Jerry Neppl
Feb. 1, 2001 12:00 AM
Forget how or why your Web project is in Active Server Pages and the whole debate that accompanies it, and let's discuss something you can use. The IIS Web server is a DCOM environment. DCOM works like a client/ server application by using proxies to make remote procedure calls to objects. The proxies allow a COM server to acquire a pointer to an object interface, which is a set of functionally related methods; in EAServer this would be called a package's IDL. There are differences between a COM IDL and a CORBA IDL. COM specifies that an interface should follow a memory layout the same way C++ does, which is why you need to create .tlb and .reg files for an IIS Web server for each package in EAServer that you want to call methods on. The .tlb and .reg files are used in conjunction with the Jagproxy.dll that's installed on the Web server as part of the EAServer client software. They're used to create a CORBA object in a COM wrapper. ASPs then use that object to talk to EAServer components. This is important since the ASP that's using the COM implementation doesn't understand CORBA. The problems associated with bridging COM and CORBA are directly related to the differences in the IDL implementations. The CORBA IDL can specify exceptions while the COM IDL does not, which can obviously cause problems. Here are a few simple things you can do to save hours of time and eliminate many of the frustrations of using ASP.
error 'ASP 0115' Unexpected error /webapp/mypage.asp A trappable error occurred in an external object. The script cannot continue running.Using good naming conventions for packages and components helps avoid this. In addition, be sure you're using the right version of the Jagproxy.dll.
The error "800af157" is usually caused by CORBA/ASP conflicts traceable to an ASP variant datatype. IIS doesn't know how to correctly subtype variants from a CORBA datatype and therefore causes this invocation error. The solution is to strongly type or cast variables into CORBA datatypes so any variables passed to an ORB are not using the ASP variant datatype. My personal preference in ASP is to declare and type a variable right away. szString = ""
...exceptions are mapped to the built-in Err object. The exception number maps to Err.Number and the description is available as Err.Description. You can handle exceptions by activating error handling code... For further details, see the documentation. Remember, to quickly build robust and effective applications using ASP, be sure variables are subtyped and don't send Null values or CORBA exceptions from EAServer to the Web server. PBDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING POWERBUILDER / SYBASE NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||