Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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
 
Old April 21st, 2004, 02:57 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to configure permissions in uploading

Hi all,

I have a situation where documents are being uploaded on a different computer from web server. I need to know how to configure permissions in this scenario.

I am able to upload documents without any problem if I make the upload folder on the same web server.

Thanks,
Puneet Mittal

Puneet
 
Old April 21st, 2004, 04:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

On a default IIS installation, this can be a bit tricky. The IUSR_MachineName is a local account with a password that is generated automatically by Windows. To overcome this, you have a few options:

1. Use Integrated security. Your Web site is access by a user with a domain account that has access to the Web server and to the remote folder. This will only work in an Intranet scenario

2. Sync the account. On the remote computer, create an account called IUSR_WebServerName (that is, don't use MachineName of the local server, but the name from the Web server). Give this account a strong password
Change the Web site configuration, so IIS runs under the anonymous account with the previously configured password (change the local password for the IIS account as well). There are a couple of vbs files in your inetpub folder if you want to reset the password.

3. Make IIS use a domain account that has the correct privileges. That is, use Domain\MachineName in IIS for the anonymous account.

In all three scenarios, make sure that the account you're using has the required privileges on the remote folder.

HtH

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Send the Pain Below by Chevelle (Track 3 from the album: Wonder What's Next)

 
Old April 21st, 2004, 07:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I decided to write a little FAQ about this, with a little more background and instructions for configuring your servers. You'll find the FAQ here:

http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=276

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Beautiful Freak by Eels (Track 4 from the album: Beautiful Freak)

 
Old April 22nd, 2004, 06:34 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried by creating two user accounts with same name and
same passwords but it automatically is adding up machine name in front
of the username. I suspect this prefixing of computer name in front
of username is causing failing of file upload.

Thanks,
Puneet

Puneet
 
Old April 22nd, 2004, 07:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Where does it add that? On the IIS Security settings dialog?
AFAIK, that's not a problem. Let it change the names, and it should still work.

If not, please let me know.


Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Hotellounge (Be The Death Of Me) by dEUS (Track 10 from the album: Worst Case Scenario)

 
Old April 22nd, 2004, 11:45 PM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Folder where I need to upload the files. I right click on that folder
and view security settings for that folder. At that point of time
it shows

IIS_WEBUSER(INDTRISDEV01\IIS_WEBUSER)

where INDTRISDEV01 is name of computer.
Now when upload is still failing, I am thinking that system security
recognises that attempt to upload is being made by a user who
doesnot belong to INDTRISDEV01 and so upload fails.

I have given full control on the target folder for IIS_WEBUSER.

Thanks,
Puneet


Puneet
 
Old April 23rd, 2004, 04:03 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not quite sure why it wouldn't work. If you have created the accounts with similar names and passwords on both machines, it should work. Here's a short summary to get it to work.

1. On the WebServer, create a new user account. Let's call it AnonIIS. Give it a strong password
2. On the FileServer, create a new user account with the same name and password (i.e. AnonIIS)
3. On the FileServer, give permissions to AnonIIS so it can write to the folder
4. On the WebServer, open up the Properties dialog for the Web site in the IIS Management Console. On the Directory Security tab, click Edit. In the Anonymous access area, type AnonIIS as the User name, type the password and deselect Allow IIS to control password.

Now, when you hit the ASP page on the Web server, it will run as AnonIIS. This account exists on both machines. When the page tries to write the file, the FileServer will recognize the AnonIIS account (as that exists on the FileServer as well) and allow the file write.

If you follow these steps, it should work. If it doesn't, can you explain what does not work? Are you getting an error? Are your computers part of a domain, or part of a workgroup? Are you, by any chance, using Symantec Anti-Virus?

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


 
Old April 23rd, 2004, 06:10 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am trying to simulate the enviornment on development machines.
In this scenario my web server is in a domain and file server is
in workgroup.

I login to web server using domain account and log into fileserver
using administrator account. Both the computers are able to see
each other as I am able to map folder of file server from web server.

I hope this information is of some help to you.

Thanks
Puneet


Puneet
 
Old April 23rd, 2004, 06:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, in that case, I think the mirrored account won't work the way I described.

I don't have a machine that is part of a domain right here, so I can't test it, but wouldn't it be possible to add a domain account (like YourDomain\AnonIIS, which you'll have to create in the domain) to a local group on the FileServer? Then you should give this group the required permissions. Or can't you set the permissions for the Domain account on the folder where you want to write to directly?

Then you should also set IIS to run under this domain account.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.







Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 5.0.4 configure problem mjjanis Beginning PHP 1 August 9th, 2005 01:39 PM
Is possible to configure the download screen? renee_santoscoi Classic ASP Basics 1 February 8th, 2005 09:21 PM
configure gauravchhabra9111 JSP Basics 0 January 19th, 2005 07:48 AM
configure jboos server sivapmk J2EE 2 August 9th, 2004 07:36 AM
how we configure tomcat? vipul Apache Tomcat 1 February 24th, 2004 09:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.