Click to See Complete Forum and Search --> : Changing processModel attributes duirng runtime


Jim Bassett
November 22nd, 2004, 02:53 PM
Does anyone know how to change the processModel attributes of machine.config during run time? I am interested in being able to change the user and password attributes f machine.config based on which ASP.NEt project I am running. I have tried changing them in web.config but I get an error message of machine only attributes.

mmetzger
November 23rd, 2004, 09:29 AM
You can modify these but it does require restarting IIS.

Jim Bassett
November 24th, 2004, 03:32 PM
Thanks. I know I have to restart IIS if I modify machine.config but I am needing to modify the username and password attributes for a speicific running ASP.NET rather than via the machine.config file so it would not be machine wide. I have tried changing those processMoled attributes in the ASP.net project's web.config file but that creates an error.

mmetzger
November 26th, 2004, 11:25 PM
Sorry for misinterpreting that.

So you're looking to run a specific IIS application as a specific user?

Jim Bassett
November 28th, 2004, 07:21 PM
Yes if that will allow the COM component that reads the lists of files in a folder that exists on another server to work. What I have is aan APS.net page on Server A plus a COM component on Server A that the ASP.net accesses. The ASP.NET page passes to the COM component the path to a folder that can exist on another network server such as "servername\folderpath\" but unless I change the username and password in the Machine.config file to match an account on that server that is going to be search it will not work. Of course changing the username and password in the machine.config file is not good since other ASP.NET pages will also use those settings.

mmetzger
November 29th, 2004, 08:40 AM
And the impersonation attribute in the web.config doesn't work? Typically this is how to make an application run as a specific user (local, domain, etc.)

Jim Bassett
November 29th, 2004, 09:13 AM
"impersonation" I didn't think of that so I will have a look and thanks! I guess then I would not need to be concern about the username or password? Also would the impersonation be of an account on the other server, I am sure that sounds like a dumb question.

mmetzger
November 29th, 2004, 10:03 AM
Just do a search on impersonation and asp.net. There's an impersonation attribute you can add to the web.config (ie, per app) that will allow it to run as a local user or as the user of a domain.