Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-13T19:11:25Z
Good afternoon,

I currently have 1.9.5 RC1 installed, using a SQL 2008 database. I installed using the Microsoft Web App Gallery.

I am now trying to upgrade (I have tried to both 1.9.5.5 and 1.9.6). When I get to the part of the install where it tests the database connection, the test always fails with some form of the following error:
"Failure to attach to database." If I create a new connection string instead of using an existing one, I can get around this error.

However, then I get an error at the very end of the install saying it cannot create tables (starting with Thanks) on database 'master'.

This seems strange to me - why would it be creating new tables if it is an upgrade? For that matter, why won't the old connection string work?


If anyone could assist me in upgrading to 1.9.6 (or even 1.9.5.5) I would greatly appreciate it. Please let me know if any more info is needed from me, I know the error messages aren't entirely precise - I am trying to avoid breaking my forums again to duplicate the error unless I must.


Thanks.

Sponsor
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader
2012-03-13T19:53:17Z
Does the yaf database user in your connection string have enough rights to create tables & stored procedures in the db that houses the yaf tables?

Usually it's enough to assign "dbowner" rights for the database during install in the user mapping for the db user specified.
If using a freshly installed 2008, make sure that SQL Server logins are allowed (default off using standard "next/next/next" install).

After the upgrade/install - the db user needs "datawriter, datareader" boxes checked in the user mapping, as well as "grant Execute" in the specific database Permissions so the stored procedures work.

He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-13T19:57:42Z
To be honest - I'm not sure what rights the db user has. m6.net is my host and the user was created automatically. I guess the next step is to download a backup of the database, restore it, and check the user rights there? I don't think I can do it from the control panel.

Though if it worked on the initial install of 1.9.5 wouldn't that mean the user does have the rights? Or is it different for 1.9.5?


Thanks for the quick reply.
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader
2012-03-13T20:14:54Z
Shouldn't be any difference regarding rights between 1.9.5 and later with the same user.

Since you are running your site without direct access to the SQL Server tools (ie Management Studio), maybe you should contact m6 to know if you have full control of your database(s) or not. Could be a provider restriction if they have upgraded the SQL Server lately.

I am myself running with full control of the Win server & SQL Server, so I am maybe not a good reference to talk about issues in a remotely hosted environment.

However, if the "Thanks" table was introduced after 1.9.5 (don't remember when...) , I think my comments in the earlier post are still valid, so you should contact m6 to resolve potential db rights issues, IMHO.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-13T20:21:26Z
There's a Thanks table in 1.9.5. I commented out the creation of the Thanks table and it just moved on and gave me an error in the next table that it's supposed to create.

The fact that it's giving an error in the database "master" seems strange to me - that's not the name of my database. Is it possible that when YAF attaches its database to mine, "master" is the default one it looks for? My user definitely wouldn't have access to that, since it isn't the database I created for my forum.

As for the reason why it would look for some default database to attach to - maybe because I had to change my connection string?

I'm just spitting stuff out here, not really sure if any of that is possible or how to fix it if it is.
JP
  •  JP
  • 100% (Exalted)
  • YAF Leader
2012-03-13T21:00:28Z
Seems strange indeed that the update script is trying to create tables in the master db...
To me it indicates that you do not have rights to create tables in your database and falls back to the "default database" specified for the db user, which is the master db if you don't configure it.

I'd say it is a provider problem...



What does your connections string look like (leave out the pw and such if you post it here).

Mine is as simple as this and has worked since 1.9.4 (generic values for the parameters):

data source=(local);initial catalog=database-name;user=db_user;password=db_user_password


Of course the data source parameter has to point to the SQL Server machine if the db server is on a different machine than the web server.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-13T22:06:40Z
Okay - I feel a bit dumb now.

New version of db.config gets uploaded when I install the new version, same with app.config.

So in addition to merging the web.config files, I had to fix those files too.


I have successfully upgraded to 1.9.5.5, thanks for leading me in the right direction.


However, 1.9.6 still doesn't seem to work.

Error message is: Could not load file or assembly 'YAF.Classes.Config' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
tha_watcha
2012-03-14T00:35:29Z
Originally Posted by: Bamurien 

Okay - I feel a bit dumb now.

New version of db.config gets uploaded when I install the new version, same with app.config.

So in addition to merging the web.config files, I had to fix those files too.


I have successfully upgraded to 1.9.5.5, thanks for leading me in the right direction.


However, 1.9.6 still doesn't seem to work.

Error message is: Could not load file or assembly 'YAF.Classes.Config' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.



1.96 is .NET 4.0 you need to change your application Pool to the Correct Pool. Of course you need to Have .NET 4 Installed on the Server to do that
UserPostedImage
Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-14T00:39:36Z
Thanks. Where can I change that at?
tha_watcha
2012-03-14T00:47:11Z
Originally Posted by: Bamurien 

Thanks. Where can I change that at?



If you have access to the server tools you would do that directlly in iis manager , if thats not possible i dont know if you can change that in the Admin Control Panel (or whatever this is called)of your hosting site. Or you have to ask your hosting Provider.
UserPostedImage
Bamurien
  •  Bamurien
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
2012-03-14T00:48:28Z
Okay thank you.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved