Last post Aug 20, 2012 05:41 PM by DMK1
Aug 12, 2012 11:06 PM|DMK1|LINK
I have succesfuly put my ASP designed site on running in my IIS. Using local host I am able to view all aspx pages. When I run this from Visual Studio all works well with my SQL database using a datagrid.
When I open this running via IIS I get error messages only on the page that is trying to access the database. The error message I get is listed below in bold. Again if I take away the data grid from this page it will load up successfuly. I have tried a few
things with permissions, I am able to connect to my database via Visual Studio and Sql server.
Any help on this would be great new to setting up the IIS side of things. This is not on a domain!
Aug 13, 2012 10:10 PM|mitja.GTI|LINK
This error means that
a) A database with the same name exists (You cannot attach a database if a database with that name already exists)
b) or specified file cannot be opened (The user under which your application is running doesn't have the required permissions. Can be the issue with Sql Server or Windows File access)
c) it is located on UNC share (the location of the database is not on the same machine as SQL Server)
I hope this clears your doubts.
Aug 20, 2012 05:41 PM|DMK1|LINK
Worked this one out myself and also the last answer was also correct.
When VS is open and there is a connection to the database I am unable to view the datagrid data via IIS. To get around this simply right click on the database and "close connection" or shut down visual studio all together. One other thing would be to make
sure SQL server is close or has no connection to the database you are pulling the data from.
All in all a simple solution although frustrating when you just cant work it out.
Hope this can helps others!