|
Subject:
|
connecting to server
|
|
Posted By:
|
dk6607
|
Post Date:
|
8/31/2006 7:04:39 AM
|
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!
|
|
Reply By:
|
peace95
|
Reply Date:
|
9/1/2006 2:32:27 AM
|
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.
|
|
Reply By:
|
dk6607
|
Reply Date:
|
9/1/2006 7:20:21 AM
|
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).
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/1/2006 7:32:26 AM
|
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."
|
|
Reply By:
|
dk6607
|
Reply Date:
|
9/1/2006 7:58:24 AM
|
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.
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/1/2006 8:14:32 AM
|
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."
|
|
Reply By:
|
peace95
|
Reply Date:
|
9/1/2006 3:56:36 PM
|
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.
|
|
Reply By:
|
dk6607
|
Reply Date:
|
9/2/2006 8:10:51 AM
|
I just want to know if anybody knows how to login to some server with asp.net application. I'm using C# language.
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/2/2006 8:50:41 AM
|
'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."
|
|
Reply By:
|
dk6607
|
Reply Date:
|
9/2/2006 10:40:43 AM
|
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?
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/2/2006 11:44:18 AM
|
Oh so what you are saying is is that your second server is not on the same network, let alone the same hosting environment. In that case allowing IWAM_[machineName] will not work because Server 2 will have no idea about server 1's IWAM account.
What you will probably need to do is, a user uploads an image to server 1, after the file is uploaded call an FTP process that will automatically take that file and place it in the directory on server 2.
(Note: .NET 1.1 does not natively support FTP, however, there is an article on the MSDN that explains how to set up an FTP Class to facilitate this kind of transport. All that will have to be done on Server 2 is to make sure an ftp server is setup and running and that your FTP class is calling a user that has rights to access the FTP server.)
hth
"The one language all programmers understand is profanity."
|