0

I would like to be able to access the webpage from all the computers on my domain, so far i have succeeded in setting up IIS 8 on the windows 2012 server, but i get this error when trying to access database:

enter image description here

here is the SQLEXPRESS log ( I've been trying to edit the web.config a lot):

2017-02-21 19:43:34.18 Logon       Error: 15350, Severity: 16, State: 1.
2017-02-21 19:43:34.18 Logon       An attempt to attach an auto-named database for file C:\Website\Project\projectTitle\App_Data\ES.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
2017-02-21 19:53:24.62 Logon       Error: 1832, Severity: 20, State: 1.
2017-02-21 19:53:24.62 Logon       Cannot attach the file 'C:\Website\Project\projectTitle\App_Data\aspnet-ES-20170117090241.mdf' as database 'aspnet-ES-20170117090241'. [CLIENT: <local machine>]

been looking around and tried to solve this error but nothing have worked, Right now i have just moved the project folder over to the server, with the app_data in it. is there a better way to do this ?

David
  • 1,147
  • 4
  • 17
  • 29
Per cuvi
  • 1
  • 1
  • Thanks, @David for the edit. – Per cuvi Feb 22 '17 at 14:29
  • I assume you have SQLExpress installed on the same server where IIS is installed? Use the SSMS tools to connect to SQL and remove the existing database, which looks like it's attached to a different MDF file. You can then attach it manually or let the application attach it automatically (if you're using EntityFramework). Also, make sure IIS user running your site has full access to the App_Data directory. – Eddie Paz Feb 22 '17 at 16:32

0 Answers0