I just tried upgrading my instance of BugNET (0.7.942) to the latest SVN (893). I am getting the following error:
Upgrade Status Report
Current Assembly Version: 0.8.0.0
Current Database Version: 0.7.942.0
00:00:00 - Upgrading To Version: 0.8.0.0
00:00:00.0156252 - Executing Script: BugNet.Schema.SqlDataProvider.sql
Success
Error: An error has occured accessing the database
Upgrade Failed!
It appears to be dying in the following block of code from Install.aspx.cs @ line 254:
//check if the admin user is in the super users role.
bool found = false;
List<Role> roles = Role.GetRolesForUser("admin");
if (roles.Count > 0)
{
Role role = roles.Single(r => r.Name == Globals.SuperUserRole);
if (role != null)
found = true;
}
if (!found)
Role.AddUserToRole("admin", 1);
Upgrade.UpdateDatabaseVersion(GetCurrentVersion());
return true;
}
catch (Exception e)
I verified the Admin user is in Role 1.
Then, if I skip over the Admin block, and start with Upgrade.Update...., it runs to completion giving me the Upgrade Complete message.
Then the application does not start.
The next piece of the puzzle is that arrScriptFiles @ line 239 is left empty. Of the scripts that are executed, the BugNET Data script is not applied to the upgrade.
I added the line
ExecuteSqlInFile(Server.MapPath("~/Install/dbscripts/BugNet.Data.SqlDataProvider.sql"));
to the method at line 218. And any system data already in the app is no longer visible when I log in. But I could log in with the user ID I had been working with....
Also - the exception above goes away.
I am running VS2008 w/ SQL2008. Any help that I can provide, please let me know...
Thanks!
Gary Klesczewski