April 19, 2012 at 9:39 am
patrickmcginnis59 (4/19/2012)
well maybe I assumed too much here, did you create a database using sql statements or are you using a database file somebody gave you?In this statement, the argument to "initial catalog" should clearly be just the database name, like:
"Data Source=IBOAT\SQLEXPRESS;Initial Catalog=RESERVASJON;Integrated Security=True"
because you are not accessing the file directly, you are accessing the database by name through the sql database server. The sql database server is then responsible for determining its use of the database files, but that all happens behind the scenes.
Maybe a way to make the project approachable is to create a database, create a table or two, put a few sample rows in, create a basic website project in studio, then add a database connection (sqldatasource) referencing the previously created database to your website project and see if you can get a basic read or write operation going that accesses a table you created. That was my route the last time I messed with a website in studio.
I tried without the file ending, just RESERVASJON, but got the same error while debugging as online.
(And no, I didn't create the database, someone in my group made it in visual studio)
Here's what I've done, step by step.
1) Attached the Database to SQL Server 2008 R2
2) Added Data Connection to Visual Studio website Project (VS gave me the Connection String = "Data Source=IBOAT\SQLEXPRESS;Initial Catalog=RESERVASJON.MDF;Integrated Security=True")
3) Tried to create a login for IIS_IUSRS in SSMS, but create failed.
April 19, 2012 at 10:00 am
Ok my apologies, according to your supplied info, RESERVASJON.MDF is indeed the name of your database so that was my mistake in dropping the '.MDF'. Also, IBOAT\IIS_IUSRS was the username that wasn't able to be found. What I would try if I was at this stage would be to add [IIS APPPOOL\DefaultAppPool] as a login to the sql server and as a user to the RESERVASJON.MDF database. Whether or not thats good practice, I doubt it but that sure looks like the userid thats trying to log into your server, so that would be my guess at this point!
I tend to enter user ids including the brackets [] especially if there are spaces and ad domain parts to the username.
April 20, 2012 at 6:54 am
bump
April 21, 2012 at 7:50 am
Got it to work!
Just had to create a security login for "IIS APPPOOL\AppPoolName"...couldn't find it in the search field, so had to type it in manually.
Anyone here have any ideas on how I can make an application remote connect to the Server?
I have this "Operator" windows application (VB.Net) that must be able to remote connect to the server.
Viewing 4 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply