ASP.NET and Godaddy, part 2

Well that worked.

 I dropped back to a blank sheet and worked my way up one step at a time. Only way to eliminate variables that could be causing problems.

Here are the step by step directions to get to a bare page with functional login and registration pages:

1) Create local SQL Server database (Express will do)

2) Dig through C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and run aspnet_regsql.exe. This will create all the aspnet tables, views, and stored procedures.

3) Fire up Visual Studio 2008 and create a web site.

4) Go to menubar: Website: ASP.NET Configuration. This will start a local web server and spawn a web page in the browser.

5) Modify web.config and put the connection string for the database you created in the connectionStrings section for the name "LocalSqlServer".

6) Close the web project and then reopen it. I didn't verify that this is a required step, but I did it anyway...

7) Re-launch the ASP.Net Configuation like you did in step 4.

8) Enable Roles management.

9) Create a few roles. I made admin and user.

10) Create a user.

11) Go back to Visual Studio and add your database under the Server Explorer tab.

12) Check the aspnet_Users table to be sure your user showed up.

13) Right click on the database and pick Publish To Provider.

14) Only export the table data.

Now we get to the GoDaddy portion of the operation. These steps will require some patience since you have to wait for them complete each step.

15)  Log in to your account and create a SQL Server 2005 database.

16)  Make sure you select to Create ASP Schema for the database.

17) Log in to your new database.

18) Use Query Analyzer to run the file you created back in step 13: Publish To Provider. This will ERASE any existing table data, so use caution on your SECOND AND SUBSEQUENT webapp! For those you will want to only append data, not delete first. You have been warned!

19) Use Godaddy's File Manager to create a new directory and upload your app to it.

20) Using their File Manager's Edit utility, modify your web.config so that the connection string points to the database you created there, not your local database.

21) Use their IIS Settings tool to create a new virtual directory/app. Be sure to select Set Application Root.

22) You should now be able to hit your page.

That was the hard part. Now for the easier stuff.

I'm not going to include these in the step by step instructions, just summarize them.

23) Create a Register.aspx page. 

24) Add a CreateUserWizard from the Login section of the tool box.

25) In properties, set the ContinueDestinationPageURL to the "~/Default.aspx".

26) Add a LoginView control to the Default.aspx page. In the Logged In Template, write something like "You are logged in".

27) In the Anonymous Template add a Login control.

28) Set the Login control's DestinationURL to "~/Default.aspx" .

29) Set the Login control's CreateUserURL to "~/Register.aspx" or whatever you named that page.

30) Test things locally to make sure they work.

31) Upload to Godaddy everything.

32) Make sure you change the connection string in the web.config file like you did in step 20.

At this point it works for me. I can add users and log in.

The key here is to step back, simplify what you are trying to do and build up one step at a time.

In Agile programming you try to break things into chunks that can be delivered early. In this case I tried to do too much with my first attempt. It didn't seem like much until something broke. Now that I have gone back and started much smaller, I have a working system that can register and authenticate users instead of a bigger system that can't do anything...

More details later.

Posted on 4/18/2008 7:56:00 AM by jeffa

Permalink | Comments (15) | Post RSSRSS comment feed |

Categories: .Net

Tags:

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

May 6. 2008 11:13

Pingback from the3factory.com

GoDaddy problems

the3factory.com

August 6. 2008 13:22

Awesome article! I hadn't realized there was a "Publish to provider" option (step 13)... off to try this, wish me luck Laughing

Dave Connors ca

September 1. 2008 21:13

Still have trouble creating database driven website hosted here in go daddy.. can you please email me the code, the one you discuss in this forum? Thanks This will be a great help.. rpcastillo@gmail.com

Ronald Castillo ph

September 2. 2008 11:10

There's nothing special in the code, it is mostly generated by Visual Studio. So sending you my code won't get you any farther along, I'm afraid.

How far have you made it through the steps and what problems are you seeing?

jeffa us

January 12. 2009 00:39

ASP.NET and Godaddy, part 2

busby seo test us

February 6. 2009 05:36

GoDaddy is the best ??
i think it's HostGator ..
Smile

inventory management software gb

March 17. 2009 13:51

on 'publish to provider' here's some more scoop:
www.salmontraining.com/.../..._shared_hosting.html

CS us

March 17. 2009 15:02

Still a little lost on inserting the connection string. I've dropped my string as indicated by connection string in my manager but it won't grab. I think I followed you on the virtual directory but when I went to IIS there already was a virtual directory so I skipped that step. Any idea why my connection string is not grabbing?

<connectionStrings>

<add name=”LocalSqlServer”
connectionString=”Data Source=mydb.db.123456.hostedresource.com; Initial Catalog=mydb; User ID=mydb; Password='My Password';”
providerName=”System.Data.SqlClient” />

</connectionStrings>
<!-- <connectionStrings /> -->

CS us

April 29. 2009 08:54

godaddy is the best website hosting i ever use..

Melayu Boleh us

May 14. 2009 04:06

Every time I needed to work on the project I had to change the smtp and port number to smtpout.secureserver.net instead of relay-hosting.secureserver.net because it is in inside relaying smtp hosts so it is not accessible from the outside world. And this has become many times a real problem as I usually forgets to update the settings again and upload it back on the server and then email doesn't work.

free ps3 us

June 2. 2009 16:20

Thanks alot, Jeffa!!! Thank you so much!!!! I love this blog!

I ran into a small problem at first. Everyone should be aware that when you change the applicationName, and path inside the web.config file, you'll have to redo the entire database. ApplicationID field will change. It took me several hours to get these things to work.

Somebody us

June 18. 2009 13:16

Good information, it seems pretty cool Smile This blogpost is just awesome! Thanks for the info!

Jason us

June 24. 2009 09:49

informative post, thanks for taking the time to sharing this info with us

tukang nggame us

June 24. 2009 14:19

Interesting post. I have stumbled and twittered this for my friends. Hope others find it as interesting as I did.

classifieds posting service us

June 26. 2009 23:30

I have tried out your steps, and they are very effective indeed. Honestly, I am a nebie in ASP.net and for me this was a great help.

1.99 yahoo domains us

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

July 4. 2009 01:01