Вы находитесь на странице: 1из 5

http://ifdefined.com/README.

html#connection

Installation [back to contents]

I try to make BugTracker.NET easy to install. For people with an ASP.NET development
background, it is easy. If you do run into a problem, look for an answer in the forum, or ask a
question and I'll usually respond the same day. But, if you simply would rather not be bothered,
you can hire me to do the installation, including installation of IIS, SQL Server Express, and, if
you like, integration with email, Subversion, Git, Mercurial, Active Directory, etc, either on your
own hardware or at your shared or VPS host, for as little as $300. Contact me at
ctrager@yahoo.com

Ok, the installation instructions:

Prerequisites:

• IIS - You need to have IIS 6 or 7 installed and configured with at least ASP.NET 2.0.
ASP.NET 1.1 won't work.
• SQL Server - You need SQL Server running, either SQL Server itself or the free SQL
Server Express. The easiest tools to install and work with are SQL Server Express 2005
and SQL Server Management Studio Express 2005. The installer for the 2008 versions
isn't very friendly.

Installation Steps:

1. Create a folder, for example, "c:\btnet", and unzip the .zip file into the folder.
2. Continue to the next step OR run the install_btnet.cmd script as Administrator. The script
should work for you if you are a) installing on Windows 7, b) running your db as
local\SQLEXPRESS instance, c) using both Windows and SQL Server security. If not,
just go to the next step and do the same things by hand. Either way, if all goes well, it
will just take you a couple minutes.
3. Create the IIS virtual directory or application.
On IIS 6, create a Virtual Directory and map it to the "www" subfolder.
On IIS 7, create an Application and map it to the "www" subfolder.
So, if you have unzipped the .zip into "c:\btnet", you would map the IIS virtual directory
or application to "c:\btnet\www". See for details on how to create an IIS virtual directory.
4. Create a database. Name it whatever you want. ( If you don't have a tool like SQL Server
Management Studio Express to create a database, you can use the BugTracker.NET web
pages to create a data. First change the ConnectionString setting in Web.config to point to
the "master" database, bring up default.aspx, select the "Setup Database Tables" link,
then use the "Create Database" button.)
5. Modify the "ConnectionString" setting in Web.config to point to your database server
and newly created database. [Connection string help].
6. Point your browser to your virtual directory and login as user "admin", password
"admin". (If default.aspx isn't the default document, point your browser to the
"default.aspx" within your virtual directory).

You will be prompted to run the setup.sql script, which creates the database tables, from a
web page form, or you could also do it in your favorite db admin tool.

7. Read this warning:

WARNING: If you are planning to use Bugtracker.NET on a public web server, an


inTERnet, not an inTRAnet, then after you install you should:

1. Change the "admin" password. Of course.

2. Delete the files "query.aspx" and "install.aspx".

At this point you should be able to add bugs by clicking on "add a bug". Please take some time to
look at the rest of this documentation. Also, please read the comments in the Web.config to learn
what else you can do with BugTracker.NET. BugTracker.NET is deceptively simple when you
first install it, but by doing a quick read of the comments in Web.config and a quick pass through
the documentation pages, you'll get some idea of the things you can customize.

If you want to backup BugTracker.NET data, then backup the following:

1. Your SQL Server database

2. The files you have in the folder you have configured as your "UploadFolder" in Web.config.
By default, BugTracker.NET saves uploads in the DB, so maybe you can skip this step.

3. Your configuration and customized files:


a) Web.config
b) btnet_service.exe.config
c) any files you have changed in the www\custom folder
d) hook scripts, for svn, git, hg

Database connection string [back to contents]

The hardest part of this procedure for most people is getting the ConnectionString to work. My
connection string looks like this:

value="server=(local)\SQLEXPRESS;database=btnet;user
id=corey;password=my_password;Trusted_Connection=no"
"server=(local)\SQLEXPRESS" indicates which host and the SQL Server instance name on that
host. The instance name is the same as the service name.. If your database is running on another
server, you would put something like "server=192.168.1.2\SQLEXPRESS"

"database=btnet" is the name of the database.

"user id=corey;password=my_password" is the SQL Server user and password, not the Windows
user and password, and not the BugTracker.NET user and password.

"Trusted_Connectrion=no" means I'm using SQL Server's users and passwords, not Windows.

For help, see these links, the "SqlConnection (.NET)" sections


http://www.connectionstrings.com/?carrier=sqlserver2005
http://www.sqlstrings.com/SQL-Server-connection-strings.htm
http://articles.techrepublic.com.com/5100-3513_11-6084879.html

Another thing you might try to get the connection string right is the following:

1. Create a new blank file and name it test.udl.

2. Double click on it, and a "Data Link Properties" dialog should appear.

3. On "Providers" tab, select "Microsoft OLE DB Provider for SQL Server" or "SQL Native
Client"

4. On "Connections" tab, try various settings and use the "Test Connection" button to test them.
Click "Ok" when it works.

5. Open the test.udl file in Notepad and copy the line that starts with "Provider=" into your
Web.config "ConnectionString" value, BUT delete the little part that says
"Provider=SQLNCLI.1;"

Creating a SQL Server Login/User [back to contents]

If are using SQL Server authentication and if you want to create a new SQL Server Login/User
with just the minimum permissions, below is the script to do it. The db_ddladmin permission is
only needed for creating custom columns via the BugTracker.NET "admin" page. The
db_backupoperator permission is only needed to do backups via the BugTracker.NET "admin"
page.

CREATE LOGIN user1 WITH PASSWORD = N'pass1', DEFAULT_DATABASE = btnet


CREATE USER user1 FOR LOGIN user1
EXEC sp_addrolemember N'db_datawriter', N'user1'
EXEC sp_addrolemember N'db_datareader', N'user1'
-- to create custom columns
EXEC sp_addrolemember N'db_ddladmin', N'user1'
-- to backup the db
EXEC sp_addrolemember N'db_backupoperator', N'user1'

Trouble logging in [back to contents]

If you are having problems with getting the aspx pages (ASP.NET) to work, or if you login and it
seems like nothing happens, it could be because your IIS doesn't know about your ASP.NET.
Search for "aspnet_regiis.exe" on Google, and follow instructions.

If you can login with Firefox but not with IE, and if you know you are entering in the correct
user/password but keep getting redirected back to the login page, then for some reason your IE is
not sending cookies to the web server. Newer versions of IE won't send cookies if the host name
has characters that are not legal host name characters. Does you host name have, for example, an
underscore in it?

"Search text" not working [back to contents]

If the "search text" feature, on the top of the bugs.aspx page, doesn't seem to be working, the
most likely cause is that IIS service doesn't have Windows permissions to update files in the
www\App_Data folder. If this is your situation, you will see error messages in your btnet log
about Lucene not having access permissions. I'm not saying that the following is the correct
solution, because it might be opening up more permissions than you want, but it should get
things to work:

Right click on the App_Data folder and click "Properties"


Click the "Security" tab
Click the "Edit" button
Click the "Add" button
Type "Everyone" and click "OK"
Select "Everyone" above and check "Full Control"/"Allow"

Upgrading [back to contents]

If you are currently running an old version of BugTracker.NET and you have downloaded the
most recent version of BugTracker.NET and want to upgrade to it, here are general instructions:

Make sure you have a backup of your database, your Web.config file, and any other files that
you have customized, such as btnet_custom.css or custom_header.html. Maybe look at the last
modified dates of your files to double check which ones you have customized.
Read RELEASE_NOTES.TXT and follow the instructions for each individual release. You only
need to download the latest release, but you do need to follow the instructions in
RELEASE_NOTES.TXT for each intermediate release.

Often, RELEASE_NOTES.TXT directs you to run SQL in the file "upgrade.sql". Run the SQL a
little bit at a time, one release at a time.

Usually you don't need to make any changes to your Web.config, but once in a while you do.
The RELEASE_NOTES.TXT file will tell you when must make a change. See for example the
release notes for release 2.7.5. Sometimes you might want to change your Web.config in order to
turn on new features.

Overlay the files in your virtual directory with the new files from the .zip EXCEPT Web.config
and the files in your "custom" folder. Don't overlay your Web.config file.

Don't accidentally re-copy install.aspx and query.aspx to your public website.

Вам также может понравиться