Starter Kit Application deployment

E

esha

I have ASP.NET 2 hosting. I created my first simple WEB application from
Personal WEB Starter Kit template.
Everything works fine on my local machine.
I uploaded all files to the hosting server. Pages which do not use database
work, pages which communicate with the database do not work.
I'm just starting to learn programming and have not enough knowledge to
realize what's wrong. I just suspect that I have to change ConnectionString
in WEB.config file. Now I have there:
<connectionStrings>

<add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated
Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf"
providerName="System.Data.SqlClient"/>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data
Source=.\SQLExpress;Integrated Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

</connectionStrings>

First of all I do not know what should I put there and I even doubt that
SQLExpress may be used for a real web site.
Any help please

Thank you

Esha
 
C

Cowboy \(Gregory A. Beamer\)

You need to work with your ISP's support division and find out how they have
SQL set up for your site. You will then have to move your database to that
server (unless they are using SQLExpress, then you might have a few other
hoops to jump through). Once you have the data in a database and have the
connection string aimed to that database, your app will work.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
E

esha

Thank you Cowboy
My ISP offers SQL Server 2005. I don't know about SQLExpress. Does
SQLExpress require any special action? I was thinking that it works similar
to MS Access (just copy db to the appropriate folder and that's it).
If I will move the data from SQLExpress to the SQL Server (I don't know how
to do that yet), should I then change Connection string in web.config file
only, or some additional actions are required?

Esha
 
C

Cowboy \(Gregory A. Beamer\)

It is almost as easy as Access, but not quite.

Ask your ISP if they support SQL Server 2005 file based databases. If so,
they should be able to help you link the file up to their server. They can
then tell you how to use it.

If they do not, you will have to migrate the data. Since you will only have
limited tools on the local SQL Express install, this might be a pain. The
easiest way is to recreate the seed data as scripts. The SQL Express tools
are minimal help here. You can download a trial of redgate's product and
create the data insert scripts. You then connect to the ISP SQL box and run
the sql script.

The other option is move to Access, but depending on where they have the
files, you may have to set the connection string based on file location,
using MapPath. This is fairly simple. Reason: For security, some ISPs move
the root location, which will force you to figure out the path to the .mdb
file using Server.MapPath.

Don't worry, it does get easier once you do it once.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
E

esha

Thank you
I talked to Host technician. She said that only dedicated server can give me
the ability to use SQLExpress, but I have Shared Server account.
I have SQL Server 2005 installed on my development machine. I have a
connection to the sql server on hosting server. I created the database
(Personal) there and ran the script for tables and SPs creation. I also
manually added (copied from SQLExpress) data into tables.
I changed ConnectionString in web.config to:
"Data Source=mssql4.securedca.com;Initial Catalog=chapran_personal;User
ID=chapran_chap;Password=vovan8682;" providerName="System.Data.SqlClient"/>

I did not make any changes to:

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data
Source=.\SQLExpress;Integrated Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

because I have no idea what to put there and I even do not know if I have to
use that part on the real server.

My pages with database communication still do not work

What else should I do?

Esha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top