I published my web site to create IIS web service. but the problem is when I browse my web service by clicking on Browse *:80, it redirect me to my web-service home page which contains the list of my methods. But when I choose a method for test, it allows me to enter the inputs but when clicking the invoke button, it gives an error page. the error is:
System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\Users\Nourah\WebSite1\App_Data\SBMSDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I searched in the internet to find solution but couldn't. I tried different ways to solve it like the solution here but no result. !An attempt to attach an auto-named database for file failed in Vb.Net
Maybe it occur because I choose to Detach the database when publishing the website!! but still I have to do that because if I don't Detach the database, Visual Studio show an error and it doesn't publish the website.
I don't know how to solve this problem. please help me..