google-code-export / django-pyodbc

Automatically exported from code.google.com/p/django-pyodbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Don't work in IIS #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install your project with help of pywin32 isapi.install as ISAPI extension.
2. Try to open project URL

What is the expected output?
Working web application.

What do you see instead?
HTTP error 500.
Plain text: A server error occurred.  Please contact the administrator.

What version of the product are you using?
pyodbc-2.1.8-py2.7-win32.egg

On what operating system?
Windows Server 2003 R2 Standard

Please provide any additional information below.
Database server: SQL Server 2005 at another server.

Application works, when I run it in Django development server (python manage.py 
runserver).

Original issue reported on code.google.com by honyc...@gmail.com on 26 Sep 2011 at 6:53

GoogleCodeExporter commented 9 years ago
I've installed Django/Python plus pyodbc & django-pyodbc on a Windows 2008 R2 
machine, with IIS as the http server.  

When I used SQLite3 as the database, the sample poll website worked fine.

I then changed the settings.py to access SQL Server instead, and a syncdb 
created the tables.  Python manage.py runserver worked with no problems, the 
browser was able to access the site.  However when I try using IIS its failing, 
with the traceback saying:-

  File "C:\python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\python27\lib\site-packages\sql_server\pyodbc\base.py", line 9, in <module>
    raise ImproperlyConfigured("Error loading pyodbc module: %s" % e)
django.template.base.TemplateSyntaxError: Caught ImproperlyConfigured while 
rendering: Error loading pyodbc module: No module named pyodbc

Am near the end of my tether trying to find an answer for this, if anyone can 
help I'd much appreciate it.

Original comment by and...@codemonastery.com.au on 21 Jun 2012 at 7:07