Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old January 21st, 2004, 11:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by planoie
 In IIS you can change it so that IIS doesn't generate the password for the account, so you should be able to manually set a password. Then you can just duplicate that as phil has suggest earlier.

Peter
------------------------------------------------------
Work smarter, not harder.
I wouldn't recommend doing this. the password is also stored in the local SAM and some COM objects run as this identity too, so the packages will have the password stored. If you only change it in IIS it will become out-of-synch and you'll have all sorts of problems.

rgds
Phil
Reply With Quote
  #12 (permalink)  
Old January 21st, 2004, 11:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I've continued diging and found these other 2 properties which give details for the anonymous user:

Code:
' also echo anon user details
WScript.Echo "Anon User = '" & WebServiceObj.AnonymousUserName & "'"
WScript.Echo "Anon Password = '" & WebServiceObj.AnonymousUserPass & "'"
Reply With Quote
  #13 (permalink)  
Old January 21st, 2004, 11:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

My final post on this subject, I promise :D

Note that the code I gave before will recover the anonymous user name and password only for the the default web. If you use different anonymous users for different web applications, you can recover those anonymous user names/passwords by changing the GetObject line in the first script I posted. For example:
Code:
set WebServiceObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/foo")
WScript.Echo "Anon User = '" & WebServiceObj.AnonymousUserName & "'"
WScript.Echo "Anon Password = '" & WebServiceObj.AnonymousUserPass & "'"
will recover the details for the 'foo' application.

Note that the IWAM details are only accessible using GetObject("IIS://LocalHost/W3SVC")
rgds
Phil
Reply With Quote
  #14 (permalink)  
Old January 21st, 2004, 11:30 PM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried running the application under the domain user.
I changed web.config file
<identity impersonate="true" userName="DOMAINUSER"
          password="PASSWORD" />I changed the file machine.config file <processModel> with the username and password.
I also changed the Directory Security settings to run the application using the domain user and password. i gave the password here also.
But it gives me the following error:
"Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request."
The event log shows the following error:
"The server was unable to logon the Windows NT account 'DOMAINUSER' due to the following error: Logon failure: unknown user name or bad password. The data is the error code. "
I think i am missing out something.
please let me know what is this error and why does not it allow me the start the application altogether.
Meantime i will try with phil's recommendation also.
rgds,
niks.
Reply With Quote
  #15 (permalink)  
Old January 22nd, 2004, 12:49 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey,
I could find that 'Server Application Unavailable' problem and fixed it.
Now my application is running successfully and i am able to access the network resources. I created a local user on the network resource with same username and password after changing the machine.config and web.config files.
it works!!
Thanks a lot for all the guidance,

Thanks and Regards,
Niks.
Reply With Quote
  #16 (permalink)  
Old February 11th, 2004, 08:53 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi nikunjn, Basically i faced the same problem as well. I am the beginner of the asp.net developer, I designed asp.net web application on the first computer which the operating system is winXP PRO. But the application is not function when i was copied and pasted the application to the second computer which the operating system is winXP Pro also.

Problem is .mdb file is exclusively opened by another user and cannot view its data. I know we need to configure the machine.config file, but as i said, i'm a newbie of the asp.net, could you please give more details on how to configure the machine.config and web.config files in order to solve this problem?

application was developed under first computer:
1. Windows XP Professional
2. .net framework 1.0
3. MS Visual Studio.net 2002
4. MS Access Database (.mdb)

application running on the second computer:
1. Windows XP Professional
2. .net framework 1.0

Thanks a lot!

regards
Reply With Quote
  #17 (permalink)  
Old February 12th, 2004, 05:32 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi chinhow,
See first of let me clarify one thing.IIS runs under some specific user name which is IUSER_MACHINENAME.

if u donot want to change the default user than u donot need to do the following changes. You need to run the application with different user name and password only if u want to access network resources.

Secondly if u want to access resources on ur local machine only just ensure that ASPNET user has the required access on that resource on your machine.

You have to do the following configuration settings to change the user for the application.

1) Change the machine.config file :
    It is located at:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G\machine.config
In ProcessModel tag give the username and password under which u want to run the application.This u need to do only if u want to run the application under some other username. Default user name is IUSR_MACHINE.
<processModel userName="USERNAME" password="PASSWORD"/>

2)In Web.Config file:
u will have to set impersonate as true:
<identity impersonate="true" userName="USERNAME"
          password="PASSWORD" />

3)IIS configuration changes for application:
    Go to the virtual directory.
Right click and go to properties
To Directory Security tan and click ‘Edit’ button
Change the USERNAME and PASSWORD over here and
Uncheck ‘Allow IIS to control password’ checkbox.

Feel free to get back in case of any problem

rgds,
Niks
Reply With Quote
  #18 (permalink)  
Old February 16th, 2004, 04:35 AM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, nikunjn
Yeah, It works now! I followed the instruction that you given to me. But I wan to make sure whether my procedure is correct, pls give some advice if there is anything wrong, thanks

1) I Opened machine.config which located in c:\windows\....\, I changed the Username = "Lee Chin How", Password = "9979". Because I have no idea what have to change, so, I was just simply changed both of these values same as the account which developed this asp.net application.
Question: Although i did made the program worked, but, I was just simply a Username = "Lee Chin How" and Password = "9979", what values are more appropriate for both of this?

2) In c:\inetpub\wwwroot\Application\web.config, I followed your instruction as well, but Username and Password values are same as the machine.config.

3) IIS configuration, I did changed the default User Name="IUSR_MACHINE" to "Lee Chin How" and password = "9979". UNCHECKED "Allow IIS to control Password".

Actually, my application are working properly, But, I am just curious why should we need to do this configuration? Could you pls give me some more detail information?

Question: Although i did made the program worked, but, I was just simply a Username = "Lee Chin How" and Password = "9979", what values are more appropriate for both of this?


I really appreciate your kindness and hope you have a nice day!

regards
chinhow

Reply With Quote
  #19 (permalink)  
Old February 16th, 2004, 07:16 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi chinhow,
your question (as i summarized)is that 'What is the need of these changes in configuration'.
As i mention earlier there is a default user id under which ur application executes. If these user id does not have the access rights on the file the application is trying to use it will give error. now if you want to use a network resource on some other machine the application user id has to have access rights on the target resource. As ISUSER_MACHINENAME is a user of your machine it is will not be recognised on other machine(network resource). So we can use the domain user id for the execution of the appliaction. As this user id is recognised on all network resources it is able to access all the resources where it has the required rights.
I hope this will help you understand the thing.

Rgds,
Niks
Reply With Quote
  #20 (permalink)  
Old February 16th, 2004, 09:00 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, Niks
Thanks for your information, It really helped!

regards
chinhow

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem deleting folder in Session_OnEnd Sowee Classic ASP Basics 3 March 9th, 2007 07:18 AM
Wake on Lan perecarl VBScript 1 January 18th, 2007 04:03 AM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 05:57 AM
view server folder problem? cslimcom Classic ASP Databases 4 December 21st, 2004 10:08 PM
Update Problem under wwwroot folder theokrtz Classic ASP Databases 4 June 8th, 2004 07:29 AM



All times are GMT -4. The time now is 04:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.