Can't get classic asp pages containing MsAccess databases runing on IIS 7!!

Hi,
I need to run classic asp pages with Access Database on IIS7... and I don't know what's wrong... I always get the Http 500 error :-S
IIS7 runs on Vista XP Home Premium.
The issue comes with pages containing databases, other classic asp pages run OK.
I've attached the piece of code that causes the problem... but It works perfect on IIS6 (on XP)
Any Idea?
Thanks,
Claudia
Set Conexion=Server.CreateObject("ADODB.Connection")
Conexion.mode=adModeReadWrite
StringConexion="Provider=Microsoft.Jet.OLEDB.4.0;" & _
              "Data Source=C:Inetpub\wwwroot\asp\Externos.mdb" ;Persist Security Info=False"
Conexion.Open(StringConexion)			  
Set R=Sever.CreateObject("ADODB.Recordset")
R.Open SQL_Cont,Conexion,adOpenStatic,adLockReadOnly,adCmdText

Open in new window

Fa_MulanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

samic400Commented:
Can you change the IE browser settings and uncheck show friendly messages - Tools, Internet Options, Advanced, uncheck "show friendly messages". What does the error show now?
0
samic400Commented:
Set R=Sever.CreateObject("ADODB.Recordset")

should be

Set R=Server.CreateObject("ADODB.Recordset")
0
Fa_MulanAuthor Commented:
I get the following...
Microsoft JET Database Engine error '80004005'
Error no especificado
/asp/bd.asp, línea 36

BTW: line 36 states:
Conexion.Open(StringConexion)
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

samic400Commented:
Sounds like possibly a permissions problem then if it is failing trying to create the connection object - take a look here: http://support.microsoft.com/kb/306269


0
Fa_MulanAuthor Commented:
I've fix the typo (sever ->server) but I still get the same error :-(
0
Joachim CarreinSr. Software DeveloperCommented:
you should add a \ after c: in the path to your db.
0
Fa_MulanAuthor Commented:
Hi, I've checked permissions... I've granted IIS_IUSRS  (and all Users and Administrators groups too)Total Control to ASP folder (which contains the database and all oher *.asp pages) but ... it still doesn't work.
One more thing...Vista seems to be kidding. I removed  the "read only" attribute to the ASP folder .... and when I come back  and check it again ... it's setted to "read only" :-S

0
samic400Commented:
Did you include the IWAM user as well?
0
samic400Commented:
Just for the sake of testing - could you configure an ODBC connection, name a DSN to something like externos, and point to the Access database you are using. Do you still get the error? If so, I'd say it is a permissions things. If not, I'd say it is your connection string.

 Set Conexion=Server.CreateObject("ADODB.Connection")
Conexion.mode=adModeReadWrite
StringConexion="Provider=Microsoft.Jet.OLEDB.4.0;" & _
              "Data Source=C:Inetpub\wwwroot\asp\Externos.mdb" ;Persist Security Info=False"

replace with something like this:
Set Conexion=Server.CreateObject("ADODB.Connection")
Conexion.mode=adModeReadWrite
StringConexion="DSN=externos"


0
tobzzzCommented:
I'm on VISTA ultimate and it took a lot of set up to get my classic ASP sites working again. In IIS6 you used to create applications now you don't.

Right click my computer, click manage, go to services and applications, then internet info services. Right click web sites folder and go add web site. find its pysical path in your c:\ drive. Name the website, have application pool seet to defaultAppPool. Under Binding leave everything as it is but make the port something other than 80, I started my first website on 81 and keep going up 1 each time. Click ok and your website is started. Once you've fixed all those typos mention by the other people above your site will probably work!!! (make sure the site has actually started - sometimes they create stopped and you need to start them manually).

C:Inetpub should definitely be C:\

Good luck / Suerte!
0
tobzzzCommented:
Also, in IIS 7.0 when at the top of the file tree (the name of your computer) there is a button called 'authentication' and under this setting you will see 'Anonymous Authentification' which by default is 'Enabled'. Right click and select edit. By default the user identity will be iuser - Change this to 'Application pool identity'.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fa_MulanAuthor Commented:
Hi!!
First ..Well, thank you all for your support.
Samic, I've configured a DSN connection (system DSN) and I get the same 80004005 error, with the following description:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][Administrador de controladores ODBC] Error de SQLSetConnectAttr del controlador
/asp/bd.asp, línea 37
Regarding to permissions... I didn't include the IWAM user ... I can't see it!!
Tobzzz: I've followed your advices too, but we have no luck yet.
What should I try next??


0
tobzzzCommented:
what is on line 37 in bd.asp?
0
Fa_MulanAuthor Commented:
Line 37 has the DSN connection:
StringConexion="DSN=Externos"
0
tobzzzCommented:
Without even having to create a site in iis7 you should be able to do this:
1. move you database (Externos.mdb) into c:\inetpub\wwwroot\
2. create a new page in that folder called test.asp with the code I attach, nothing else
3. the click http://localhost/test.asp and see if you still get a failure.

With this sort of thing it's usually best to strip the thing to the bare basics and then build your way up troubleshooting.

<%@ Language=VBscript %>
 
<%
myDatabase = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\inetpub\wwwroot\Externos.mdb; Uid=;Pwd="
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(myDatabase)
 
conn.Close
Set conn = Nothing
%>

Open in new window

0
Fa_MulanAuthor Commented:
HEY!!! Problem solved :-)
I come back to check again all the permissions stuff and I've commented out line 37, so I came back to my original code ... without the typos ;-)
I went again to Authentication on IIS7 and I took a look to the website I've created running on port 81.... and I noticed that the Application pool identity has been disabled.  (I swear I did change it the 1st time!)
So... I STOPPED my site running on port 80, letting site on port 81 to stay running, and I made the autentication changes again.... and IT WORKS :-)
THANK YOU  ALL AGAIN!!
0
tobzzzCommented:
Well It took me a good 24 hours working it all out on my own, glad i've saved you some time!

Please don't forget to accept an answer!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.