 |
| ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 31st, 2006, 07:04 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
connecting to server
Hello!
I'm working on an asp.net application. I have 2 servers, one for the forms and the database, and the other for a lot of images because on the first server is not enough free space. Now i'd like to know how can i connect to the second server with my application to upload some images?
Thank you!
|
|

September 1st, 2006, 02:32 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
dk6607: It depends on the functionality of your second server and how the images are stored. For example, if the server functions as a file server, then the images would reside as files in folder(s). If the 2nd server functions as a database server, then the images would reside according to db-type or an xml-type.
Hope this helps.
|
|

September 1st, 2006, 07:20 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
My second server functions as file server, images are stored as files in folders. Now i don't know how can i upload images to the second server, i have to login and i don't know how. Otherwise could every one upload to this server without login. This bothers me how to login to second server with my application on the first server. I know i can do this manually, but i'd like to do this automaticly because the application would by on the internet (web portal).
|
|

September 1st, 2006, 07:32 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Are the servers on the same network? Is this a web garden/farm? Do you maintain the servers or are they hosted in a third party data center? A big part of how you do this will relate to how you have permissions setup on the second server; if you are not authenticating the end user somehow and just relying on the ASP account (typically IWAM_[machineName]) then yes anyone can upload files to the second server.
I personally would store the images in a SQL image field because your FileSystem can get out of control. Consider that you have 100 users who all upload 50 100K images, that works out to be about 500mb thats not to bad...except that it works out to be 5000 images! (What happens here is if you try to open that directory through explorer, it is going to take a bit of time for windows to populate that directory) As time goes on and more and more images get uploaded to that directroy your server preformance will degrade. (Not to mention the disk space you are going to need to store these images)
If you still want to go the route with the second server answer the previous questions and tell me how you are authenticating users.
"The one language all programmers understand is profanity."
|
|

September 1st, 2006, 07:58 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
They have to login on my page and register first of course.
And on the accounts are limits set how many images can they upload.
|
|

September 1st, 2006, 08:14 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
So its forms authentication; in that case your security will be based upon the ASP account IWAM_[machineName] you second server will have to grant the necessary premissions to that account.
"The one language all programmers understand is profanity."
|
|

September 1st, 2006, 03:56 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
dk6607: It is not clear how the user or customer will select which images they are interested. Taking advantage of the 2nd server space: create a virtual directory of the images. If the 2nd server is not network, map a directory to a drive and use the mapped drive as a virtual directory.
Hope this helps as well.
|
|

September 2nd, 2006, 08:10 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I just want to know if anybody knows how to login to some server with asp.net application. I'm using C# language.
|
|

September 2nd, 2006, 08:50 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
'Login' is a broad term. Logging in could literally mean starting a new Windows session, accessing X directory on the server and so on and so on and so on. What do you mean by login.
"The one language all programmers understand is profanity."
|
|

September 2nd, 2006, 10:40 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
User uploads some images on my first server - here is the application (web page). Now these images are on the first server. And now the application automaticly should save these images on the second server. Here is the problem because the application has no permissions to save files (images) to some remote server (second server is on some other hosting provider). How to solve these problem???
I think the application would have to connect (login) to the second server first, then save the images, or not?
|
|
 |