views:

71

answers:

3

We are currently working on a new webservice that required some functions used by one of our websites. We decided to move these functions into a dll so that they could share the code and we wouldnt have it in two places. When I moved some of the functions over and added the dll to our webservice, all the calls through the DAL running our stored procedures would work perfectly for those of us using Windows XP but for the others that are using Windows 7 it fails saying that the stored procedures dont exist.

Has anyone every experienced this problem before? We think it may be a difference between IIS6 and IIS7 but that is just a guess.

Edit: The issue does not seem to be a Windows XP/Windows 7 issue because we found another person to test it on their machine. They have Windows XP as well but it did not work for them either.

Thanks for the help.

+1  A: 

What authentication methods are configured on IIS ?

You may have Windows integrated authentication enabled on XP, but not on Win7.

If you use integrated authentication to your DB, this would explain the behavior.

Timores
Windows integrated authentication is enabled on both machines
jmein
+1 Thanks for all the help
jmein
+1  A: 

Do you have a copy of your database on your win 7 and xp machine? If you do, seems like the win 7 might be out of sync. Or if you're using integrated security, then your win 7 user isn't permissioned to that stored procedure.

Allan Palmer
Both machines are connected to our server which has this database and the privileges are the same. In fact the issue is also appearing on one of our managers computers which has higher privileges when it comes to the server which holds the db.
jmein
have you checked that the role associated with the stored procedure has execute permission and is also associated with the user accounts that are experiencing the issue?
Allan Palmer
they both have the permissions to run the stored procecdures because they worked when we ran our website through localhost on their machines. They can also go straight into the Microsoft SQL Server and execute the stored procedures there
jmein
+1 Thanks for all the help.
jmein
A: 

The problem was in the connection string. When I created my connection string by choosing the database it did not set the initial catalog for the connection. We noticed this when looking in the app.config (which is where we checked first) and fixed it by adding it in manually. However, it did not update the Settings.settings which seems to control which connection string the dll really uses. We discovered this by deleting one of our stored procedures and dragging it in instead of using the right click and add table adapter method. This created a new connection string which contained the initial catalog as it should have in the Settings.settings file. Why it worked for some of us and not for the others I am not sure, but changing the connection string solved the problem.

Thanks for all the help.

jmein