PDA

View Full Version : switching from pws to iis


nickr
12-17-2002, 03:12 PM
I have built an asp page on a system running pws. I then moved all the pages over to another system that is running iis, now the asp pages do not work. Any ideas? Thanks in advance!

Nick

raf
12-17-2002, 03:32 PM
after you moved your files, did you set up a virtual directory ? (that points to the folder that contains these moved files)
+
what seems to be the problem

nickr
12-17-2002, 05:00 PM
Yes, I did set up a virtual directory. The problem, as i try to narrow it down, seems to be this. The pages seem to be having a problem with the odbc connection and/or the database. The error i'm getting is this:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/user_v.asp, line 8

This is where the call to the odbc connection is made. I have double checked the odbc connection name, and that it is pointing to a valid database located on that machine. All of that seems to fine. Any other ideas? Thanks Nick

BigDaddy
12-17-2002, 05:04 PM
The logical answer is that it's a problem with the DSN. Just reconfirm you've got it set up correctly on the machine running the pages. If you need to blow it away and make a new one.

nickr
12-17-2002, 06:26 PM
Checked the dsn and all naming coventions. Still getting the error.

Roelf
12-17-2002, 06:40 PM
i had that once, created a second dsn to the same db, connect once using the second dsn, no error. shift back to the original dsn which gave the error, no error anymore, it was gone, completely :confused:

BigDaddy
12-17-2002, 06:51 PM
I'd set up a new one just to be sure, and try to hit it.

Are there any other pages on the server using the current dsn? If so, compare them.

nickr
12-17-2002, 07:18 PM
Ok, I deleted the dsn that was there, created 2 new ones...still nothing. The other pages are looking at the same dsn and none of them work either.

Roelf
12-17-2002, 07:50 PM
try it dsn-less: http://www.w3schools.com/ado/ado_connect.asp

whammy
12-17-2002, 11:56 PM
Just out of curiousity, how are you "checking the DSN" - in your code, or in your control panel/administrative tools under ODBC Data Sources?

If you have done the latter, also you need to make sure that:

1. You're connecting to the right machine
2. The correct default database is specified

And be sure to run the connection test as well once you've determined the 2 things above are correct. If that works, there is no reason I know of that your code shouldn't work too... :)

Roelf
12-18-2002, 06:17 AM
maybe it is in the code, show us some of it

raf
12-18-2002, 07:51 AM
Roelf is double rigt.

Go DSN-less (faster + better if your planning on moving your files around) + post your code for the best help from us.

nickr
12-18-2002, 09:27 PM
As much as i would love to run it dsnless, I can't do that. This will be running on different networks and we will never know that the server drive letter is on that system. As far as checking code, I checked the dsn name in the odbc connection. The odbc connection works for a program that we are running, I need to be able to use the same connection. As far as if the code is right - is there different code from pws to iis that i don't know about. The code works great when running in pws on a 98 machine. The problem i am having is when it's run on an xp machine with iis. It then that i am getting the error above. Thanks for ya'lls help!!!

BigDaddy
12-18-2002, 10:24 PM
It's probably the most recent, but what version of IIS is it?

Also, just a thougth, but make sure you've got all the updates for the machine running it.

Probably nothing like this, but I've seen an NT machine have problems with ASP because it didn't have the right service pack.

Roy Sinclair
12-19-2002, 04:00 PM
Originally posted by nickr
As much as i would love to run it dsnless, I can't do that. This will be running on different networks and we will never know that the server drive letter is on that system. As far as checking code, I checked the dsn name in the odbc connection. The odbc connection works for a program that we are running, I need to be able to use the same connection. As far as if the code is right - is there different code from pws to iis that i don't know about. The code works great when running in pws on a 98 machine. The problem i am having is when it's run on an xp machine with iis. It then that i am getting the error above. Thanks for ya'lls help!!!

What on earth do you mean about "server drive letter"? Just as using DSNs is obsolete so are drive letters, doubly so for use in networks. Always, always use UNC naming conventions instead of drive letters. Instead of mapping drive X: to server y and share z use \\y\z instead (add the rest of the path to the file to the base name). That way you're never dependant on having the drive mapped to any drive letter much less a specific drive letter.