Last post Feb 02, 2012 03:14 AM by wsyeager36
Feb 01, 2012 02:47 AM|wsyeager36|LINK
I had a sql server express db managing my roles, etc. I need to change the data source from sql express to sql server because my hosting provider does not have sql express.
I want to make the changes locally first to ensure everything is working before I publish the database.
I successfully ran the asp.net configuration tool creating a new database with all the membership tables.
The new connectionstring inside my web.config file is below. Even though the password is shown here with the asterisks, I can assure you that it is spelled out correctly. I just obviously substiture it here for security reasons.
Data Source=bill-pc;Initial Catalog=ApplicationServices;Persist Security Info=True;User ID=wyeager;Password=*********
I then went into my Visual Studio 2010 project and deleted the sql server express db inside my app_data folder.
I then went into IIS 7 and added the above connectionstring to the asp.net connectionstrings. However, when I add the connectionstring, it always substitutes the asterisks for the password.
I believe the below error is because the asp.net configuration tool cannot successfully read the password for the connectionstring.
I then ran the asp.net configuration tool for my project and now gives me the below error. I know it seems to be reading from the IIS connectionstring setting, because before, I didn't have any userid in there and just said "failed for
user """. I added my userid and password and got the below error.
How can I successfully connect the asp.net membership tool with my new database?
There is a problem with your selected data store. This can be caused by an
invalid server name or credentials, or by insufficient permission. It can also
be caused by the role manager feature not being enabled. Click the button below
to be redirected to a page where you can choose a new data store.
The following message may help in
diagnosing the problem: Login failed for user 'wyeager'.
Feb 01, 2012 02:56 AM|necro_mancer|LINK
Please be advised that SQL Express is not used in production server. If you host it with a shared host, they will not use SQL Express database. Even though they do not use an SQL Express database, your SQL Express database should work on their environment.
What you basically need to do is to make a full backup pof your database and have it sent to them for restoration. Once it is restored, you must check the correct connection string with your current host. Based on the error message you experience, I believe
that the user wyeager is not recognized by the server. You need to make sure you create a user called wyeager on their server (usually, you will be given a control panel to create the db and its users)
Obviously, this is not a difficult problem to resolve. If your host cannot resolve it, you must look for an alternative host and I recommend
asphostcentral.com for your SQL 2008 hosting needs.
Please mark this response as an "answer" if it helps you. Thanks heaps!
Feb 01, 2012 03:10 AM|wsyeager36|LINK
I've read other posts on their forum and it specifically states that in order for them to use sql epress, they must have it installed, which they don't. Any user can only use sql server and not sql express on this hosting service.
I'm not about to take and replicate all the work i've done so far with my website for this issue. I already have everything in place.
I am testing the issue locally first, to ensure it works OK. I created a user called wyeager on my local server and am trying to use the asp.net membership tool with this user. Hence, the error I'm receiving about not being able to read the password.
Once it's OK, I just need to publish the new db to my host.
If I can finalize being able to successfully read my connectionstring properly first locally, everything should be OK to publish.
Feb 01, 2012 03:14 AM|necro_mancer|LINK
I fully understand you can get everything work beautifully on your local system, however, when you deploy your site to your host, you must always use the details on your host. Otherwise, your site will be "confused" looking for your database.
Hope this helps :)
Feb 01, 2012 01:01 PM|wsyeager36|LINK
Everything works beautifully on my local system except when trying to add the new sql server data store via the asp.net website admin tool (as explained in my previous post).
Once I can resolve this, it will be fine...
Again, based on the info I've given in my previous post, how can I set the website admin tool to successfully read my connectionstring without the password in asterisks?
Feb 02, 2012 12:59 AM|kctt|LINK
not sure what you mean without the password in asterisks
Connection string in web.config file should have password in plain text.
If you cannot save connection string with correct password, there's something wrong with the way you configure it.
There is no problem with using sql express on your computer. Just make sure you create a database in Management studio and create proper sql login connection to the database.
Do not connect to mdf data file because it will be difficult to configure website & database when deploying to production server.
Feb 02, 2012 03:14 AM|wsyeager36|LINK
This has been resolved at the following link...