Trouble with Python in ASP development

Thomas Weholt thomas at cintra.no
Thu May 31 12:19:09 EDT 2001


Hi,

I'm trying to use python as script-language in ASP, using MS IIS.
When something in my python-code raises an exception the loading of the page
just stops,
and nothhing after the code that raises the exception is sent to the client.
No error-message is given.

I've written a fairly simple three-tier architectured app, that simplifies
the work in the application layer, the actual ASP-page.

In my asp-page there's some code handling a set of form-inputs if the
parameter 'action' is passed with the value 'new' in the url.

<%
action = str(Request("action"))
if action == 'new':
 from gat_reg.logic.classes import Kunde
 firmanavn = str(Request("firmanavn"))
 adresse = str(Request("adresse"))
 postadresse = str(Request("postadresse"))
 telefon = str(Request("telefon"))
 fax = str(Request("fax"))
 email = str(Request("email"))
 k = Kunde(firmanavn, adresse, postadresse, telefon, fax, email)
 k.save()
%>

the Kunde-object is stored in the middle-tier of the application and calling
k.save() should raise an exception if something goes wrong. By calling it
the way I've typed it above nothing below this code will be sent to the
client. If I put a try: except around the code handling the k = Kunde(...)
and k.save() it goes ok, so I understand that something goes wrong around
there somewhere, but ISS doesn't give any information.

Is there any way to get more info from ISS or find out what goes wrong?
Passing the same parameters to a Kunde-object in the python interpreter
works just fine. In ASP it just won't work.

Any clues would be highly appreciated.

Thomas





More information about the Python-list mailing list