11 Replies - 6258 Views - Last Post: 10 May 2011 - 10:12 AM Rate Topic: -----

#1 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Architecture of a Web Application for users to submit files for me

Posted 14 April 2011 - 10:09 PM

Hello,

I am a Windows applications dev. in VS-C# and SharePoint customized solutions. I am getting into ASP.net and I have a requirement for a Web Application. It should allow users to login (or allow me to create a login for users) and allow users to have their own "profile". In their profile the should be able to upload SEVERAL files and input standard info. Also, I would like for their "session" to be saved so that if a user logs out, when they come back, they see what they have uploaded so far and what is left.

I am not looking for someone to do my job. Only for a starting direction or for some high level guidance or an approach to the requirement. Suggestions on what is the best way to store the files that users upload so that I can retrieve them. What are the best software practices for this kind of Web Application, etc...

Any guidance is truly appreciated. I will code this myself and look into any info provided.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Architecture of a Web Application for users to submit files for me

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8907
  • View blog
  • Posts: 33,392
  • Joined: 12-June 08

Re: Architecture of a Web Application for users to submit files for me

Posted 15 April 2011 - 07:24 AM

Treat it like any windows form. A login page is pretty straight forward. Make it the first page. The tricky part is how to keep passing session variables, and preventing users from just going to a page all willy nilly. There's an interesting research for you.
http://msdn.microsof...y/ms178581.aspx

A common place to retrieve values for a profile? sounds like a database, right? You should have some experience with that - correct?

Read/write/update takes care of saving their info between visits.

Uploading files - well you can either serialize those to the database as well or just have them upload to a folder on the server and the database stores their location. I prefer the second method.

There ya go! Tons of gooey places to jump into!
Was This Post Helpful? 1
  • +
  • -

#3 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 16 April 2011 - 11:44 PM

modi123_1, thank you very much!

I do have experience with DBs. Thanks again for your answer and the info. I will look into it. It seems like I have most of what I need.

Best regards!
Was This Post Helpful? 0
  • +
  • -

#4 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 24 April 2011 - 02:50 PM

View Postmodi123_1, on 15 April 2011 - 07:24 AM, said:

Treat it like any windows form. A login page is pretty straight forward. Make it the first page. The tricky part is how to keep passing session variables, and preventing users from just going to a page all willy nilly. There's an interesting research for you.
http://msdn.microsof...y/ms178581.aspx
...


Hi modi123_1, I was reading about the sessions control options in the link that you provided. It seems to me though that I could control what I display to the users simply using the login name of the person who logged in
string LoggedInUser = User.Identity.Name;
. I would translate the login name to an ID, and query the DB with that ID to populate the info fields, as well as letting the user know which files have already been uploaded. Would this not be enough?
Was This Post Helpful? 0
  • +
  • -

#5 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Architecture of a Web Application for users to submit files for me

Posted 24 April 2011 - 03:14 PM

If the login names are unique fields you could just query the DB with the login name and not bother with translating it to an ID.

Membership and User Login

Managing Users by Using Membership

Other things to google: Membership Provider, Role Provider

This post has been edited by Nakor: 24 April 2011 - 03:25 PM

Was This Post Helpful? 1
  • +
  • -

#6 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 24 April 2011 - 03:23 PM

View PostNakor, on 24 April 2011 - 03:14 PM, said:

If the login names are unique fields you could just query the DB with the login name and not bother with translating it to an ID.


So you agree with overlooking the whole session administration altogether? Thanks for the tip!
Was This Post Helpful? 0
  • +
  • -

#7 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Architecture of a Web Application for users to submit files for me

Posted 24 April 2011 - 03:27 PM

If you're making using of Membership then there's not a need to use Session to store the user since it will be stored in the Pager.User.Identity.Name value. You can also determine roles with the Identity.User.IsInRole() method.

If you're making use of roles
Was This Post Helpful? 0
  • +
  • -

#8 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 08 May 2011 - 08:20 PM

Hello,

Thank you for your advices and tips. My application is well underway. I have though a question about using Sql DBs. In examples online, I have seen 2 approaches:

1. Simply using a db existing in the computer and connecting to it by means of SqlConnection objects.
OR
2. ADDING a Sql Server Database to the solution, and working with it.

What are the differences between these? And if I am planning to deploy my web site at some point to a web hosting company, which one should I use?

As always, THANK YOU VERY MUCH for all your help!
Was This Post Helpful? 0
  • +
  • -

#9 SurfingShark  Icon User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 188
  • Joined: 18-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 09 May 2011 - 07:49 PM

View Postcapeluto, on 08 May 2011 - 10:20 PM, said:

Hello,

Thank you for your advices and tips. My application is well underway. I have though a question about using Sql DBs. In examples online, I have seen 2 approaches:

1. Simply using a db existing in the computer and connecting to it by means of SqlConnection objects.
OR
2. ADDING a Sql Server Database to the solution, and working with it.

What are the differences between these? And if I am planning to deploy my web site at some point to a web hosting company, which one should I use?

As always, THANK YOU VERY MUCH for all your help!


Definitely add a database to the solution. It is never good practice to use databases for multiple purposes. Objects are all interlocked. Not to mention, if you do go public with it you will want a dedicated database for that site. You can't treat a database like a file system!
Was This Post Helpful? 0
  • +
  • -

#10 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 09 May 2011 - 09:22 PM

View PostSurfingShark, on 09 May 2011 - 07:49 PM, said:

View Postcapeluto, on 08 May 2011 - 10:20 PM, said:

Hello,

Thank you for your advices and tips. My application is well underway. I have though a question about using Sql DBs. In examples online, I have seen 2 approaches:

1. Simply using a db existing in the computer and connecting to it by means of SqlConnection objects.
OR
2. ADDING a Sql Server Database to the solution, and working with it.

What are the differences between these? And if I am planning to deploy my web site at some point to a web hosting company, which one should I use?

As always, THANK YOU VERY MUCH for all your help!


Definitely add a database to the solution. It is never good practice to use databases for multiple purposes. Objects are all interlocked. Not to mention, if you do go public with it you will want a dedicated database for that site. You can't treat a database like a file system!



SurfingShark,

Thank you for your answer. I have another web app (web services) hosted with discountasp.net and I as I am adding also db features to that app as well, I asked them the same question I asked here. Their reply was to NOT ADD a db file in the app. To use a db in my computer, and then backup the data from the db, and restore it using their sql tools to a db that will support my site. Then I would need to update web.config with the new connectionString information. They said that a db file like that will not work (at least in their site). Is that the case for all hosting companies? Or should I switch hosting companies?

Thanks!
Was This Post Helpful? 0
  • +
  • -

#11 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Architecture of a Web Application for users to submit files for me

Posted 10 May 2011 - 04:19 AM

You should be able to make use of Sql Server Compact Edition with any host that supports .Net 4.0. You just need to add the Sql Server CE dll to the bin folder of your ASP.Net application.

See Scott Gu's Blog

That being said, if you are expecting to have much traffic you would be better off using Sql Server and migrating it to the web host as it's better able to handle higher amounts of traffic than the compact edition.

However, I don't think SurfingShark was referring to using Sql Server CE, but was just saying that you're application should be using a Database in your Sql Server that is dedicated just for this application. In other words, you don't have multiple applications using the same database within the server.
Was This Post Helpful? 1
  • +
  • -

#12 capeluto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 14-April 11

Re: Architecture of a Web Application for users to submit files for me

Posted 10 May 2011 - 10:12 AM

View PostNakor, on 10 May 2011 - 04:19 AM, said:

You should be able to make use of Sql Server Compact Edition with any host that supports .Net 4.0. You just need to add the Sql Server CE dll to the bin folder of your ASP.Net application.

See Scott Gu's Blog

That being said, if you are expecting to have much traffic you would be better off using Sql Server and migrating it to the web host as it's better able to handle higher amounts of traffic than the compact edition.

However, I don't think SurfingShark was referring to using Sql Server CE, but was just saying that you're application should be using a Database in your Sql Server that is dedicated just for this application. In other words, you don't have multiple applications using the same database within the server.


Pretty clear!
Thank you very much!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1