My app is trying to connect to aspnetdb using the ftp user

Hi friends,

I'm installing my asp.net app in my VPS. I already created the ASPNETDB but I dont know why my app is trying to connect using my ftp user!!
This is the error I'm getting:

Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'VPS683\IWPD_1(ftpuser)'.

Where "ftpuser" is the user fot ftp.

Any idea?
 
do you have SQL Express installed on your local machine?

If not it is just using this because you have not provided a remote SQL server and its credentials and using the built in site authentication.
 
Hi Stephen,

Thanks for answering.

I do have SQL Express installed on that VPS. I ran the aspnet_regsql to create the ASPNETDB and I created a login for NETWORK SERVICES.

This is the connection string I'm using:
<add name="LocalSqlServer" connectionString="data source=localhost\SQLEXPRESS;Integrated Security=SSPI;Database = aspnetdb;User Instance=False"

What am I missing here?
 
Integrated Security=SSPI this is what is giving you that login info, you can change this to another means of login and it should work.
Or you could edit user permissions with SQL Management Studio(express edition) to allow this user and that too could work, so it just depends on where you want to change :)
 
Stephen...as usual Thank you very much!!!

What other mean of login should I have there?...and why is this connection string working fine in my other vps with the same exact permissions in sql express?

I'll do a research of the login types in the meantime.
 
Ok, I found a solution and would like to share it with you. Please, let me know if this compromises my VPS or site security.

I checked the application pull for my domain and I saw it uses the ftp user for the security account. I changed that to Network Services and it seems to be working now.

The question here is why it would work in my other vps(which also has the ftp user as the security account for the app pool) and not in this one. Both web.config files are the same?
 
I had prepared this reply before, but my DSL went down(and is still down I decided to stop waiting and just get on mobile broadband card)

Stephen...as usual Thank you very much!!!

What other mean of login should I have there?...and why is this connection string working fine in my other vps with the same exact permissions in sql express?

I'll do a research of the login types in the meantime.

really I don't have much experience with sql express to be very honest :)

It is a bit of a morphed sql server to run like access style as a replacement for access, and we don't run it due to security and backup/maintenance issues on our shared environments(nor do I ever see a time that we will)

it is a very good app for VPS users, and for dedicated servers/limited exposure servers but I just don't have much experience with it due to not running it at all.

Now that being said when i did run it I found it best and easiest to just make the DB entry in management studio, and give it a real SQL level login and use server 127.0.0.1 like a "remote login" and it worked perfectly. Bascially I made it work more like SQL server than the attached DB express mode, that may or may not be an option for you if you can't figure out why the permissions don't allow login.
 
now as for reply, using Network Service should not be a major security issue in any case, but Plesk may decide to change settings back to the way it configures and break the site.

The difference is likely that on this one you have plesk set to "Dedicated Application Pool" and the other is using a shared(if both have plesk, I honestly don't know your VPS Ids to check that)
 
Hi Kris,

That was the first thing I checked...and no. The other DB doesnt has any login associated to that user :s

Stephen,
I hope Plesk wont decide that too soon :D ...
Well, I checked about the dedicated pool and in both domains is the same. The check box for "Use dedicated pool" is checked in both cases.
The two VPS IDs are:
VPS747 - The working one
VPS683 - The one I'm trying to make to work

Thanks a lot
 
Back
Top