Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to Runas /profile /user:MyComputer\ASPNET cmd

Status
Not open for further replies.

toptomato

Programmer
Jul 22, 2005
62
0
0
US
thanks in advance to every one
I am trying to run a command in command prompt under ASPNET account. But it prompts me for a password. What should i do. Help.
 
well i am trying to encrypt the connection string in the webconfig using Using RSA with a User-level Key Container.

Because the application must access the data using the same identity that you used to encrypt the data, you often need to run the encryption command using your application's service account identity. To do so, you can start a command Window by using the runas command as shown below specifying an appropriate domain and user name.

Runas /profile /user:domain\user cmd

When you run Aspnet_regiis from the resulting command window, it uses the specified identity to perform the encryption. This allows the application that uses the same identity to decrypt the data at run time.
 
Why don't you just use Impersonation to take the identity of the user with the relevant priviliges?

Also, version 2.0 of the framework encrypts connection strings for you so you don't have to encrypt them yourself.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
dear ca8msm, can you please elaborate on as to how asp.net 2.0 encrypts webconfigs on its own.
 
Sorry, that was actually quite misleading. What I meant was that there is a built in method to retrieve encrypted connection strings if you have encrypted the string first e.g.



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top