vrmgr
asked on
Problems with a root global.asa and iis 7.5
We are upgrading our hardware and OS. Going from Windows 2003 Enterprise w/ iis 6 to WIndows 2008 R2 w/iis7.5.
The following code is my working global.asa code and the page code that utilizes it.
Global.asa:
Sub Application_OnStart
Set vrmgr = Server.CreateObject("ADODB .Connectio n")
vrmgr.ConnectionString = "DRIVER={SQL Server};SERVER=x.x.x.x;dat abase=clie ntDB;UID=u sename;PWD =password"
vrmgr.Open
Set Application("vrmgr") = vrmgr
End Sub
default.asp:
Set objConn = Server.CreateObject("ADODB .Connectio n")
objConn.open Application("vrmgr")
I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What doesn't make sense to me is that this code is used through out the site. It only seems to fail on my initial default.asp page. My concern is that I have over 100 sites to migrate. The majority of them have this type of setup.
Any help would be very much appreciated.
The following code is my working global.asa code and the page code that utilizes it.
Global.asa:
Sub Application_OnStart
Set vrmgr = Server.CreateObject("ADODB
vrmgr.ConnectionString = "DRIVER={SQL Server};SERVER=x.x.x.x;dat
vrmgr.Open
Set Application("vrmgr") = vrmgr
End Sub
default.asp:
Set objConn = Server.CreateObject("ADODB
objConn.open Application("vrmgr")
I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What doesn't make sense to me is that this code is used through out the site. It only seems to fail on my initial default.asp page. My concern is that I have over 100 sites to migrate. The majority of them have this type of setup.
Any help would be very much appreciated.
ASKER
Thanks for your reply sammySeltzer. We've never used DSN sources that were setup before. Is that what you are referring to?
We are using DSN-less connections. Nothing I've tried - enabling the 32bit applications - changing the AppPool Identity user and doubles checking that they do have read access to the path.
Any other thoughts?
We are using DSN-less connections. Nothing I've tried - enabling the 32bit applications - changing the AppPool Identity user and doubles checking that they do have read access to the path.
Any other thoughts?
No, I wasn't referring to setting up dsn but try this. This is dsn-less connection:
Set conn = Server.CreateObject("ADODB .Connectio n")
conn.Open "Driver={SQL Server};" & _
"Server=serverName;" & _
"Address=serverName,1433;" & _
"Network=DBMSSOCN;" & _
"Database=DBName;" & _
"Uid=userid;" & _
"Pwd=password"
Please show error message if you run into one using this.
This is what we use for our windows 2008 R2 with sql server 2008
Set conn = Server.CreateObject("ADODB
conn.Open "Driver={SQL Server};" & _
"Server=serverName;" & _
"Address=serverName,1433;"
"Network=DBMSSOCN;" & _
"Database=DBName;" & _
"Uid=userid;" & _
"Pwd=password"
Please show error message if you run into one using this.
This is what we use for our windows 2008 R2 with sql server 2008
ASKER
That still only works when i do it in the default.asp page itself. When I read it from the the global.asa it still gives me the same error.
I'm convinced that there is a setting that I am missing in iis7.
Anything else?
I'm convinced that there is a setting that I am missing in iis7.
Anything else?
>>That still only works when i do it in the default.asp page itself.
I thought that was where it was failing?
Let me look deeper and see what I can come up with.
I thought that was where it was failing?
Let me look deeper and see what I can come up with.
ASKER
No - it's failing when setting it in the global.asa file as an application variable and then trying to access it in the default and subsequent pages.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I never found a resolution other than rewriting the code.
I have a question in this regards, our is DNS less and the connection string is appropriate in global.asa file.But, we still get error message.
So, there are 2 versions of ODBC to worry about on 64-bit machines: the 32-bit version and the 64-bit version. So you have to Add or make changes in 2 places to cover both types.
Click Start - Admin Tools - Data Sources gets you to the 64-bit version;
Start - Run -C:\Windows\SysWOW64\odbca
Do all your adds/deletes/changes in both.
So basically, enable 32bit option to get your stuff to work.
Good luck