Impersonation
is when ASP.NET executes code in the context of an authenticated and authorized
client. By default, ASP.NET does not use impersonation and instead executes all
code using the same user account as the ASP.NET process, which is typically the
ASPNET account.
There
are 5 below steps by which we can establish Impersonation configuration in our
secured application environment.
1.)
Creation of Application/Proxy user where Application is hosted.
2.)
Give appropriate access to the user.
3.)
Create Database Login user on database.
4.)
Authenticate User and provide credential on IIS.
5.)
Then Configure web.config on Application.
Creation of Application/Proxy
user where Application is hosted and Give appropriate access to the user.
Create Database Windows Login in Database.
Now Open IIS Manager and navigate to the level you want to manage.
1. In Features View, double-click Authentication.
2. On the Authentication page, select ASP.NET Impersonation.
3. In the Actions pane, click Enable to use ASP.NET Impersonation authentication with the default settings.
4. Optionally, in the Actions pane, click Edit to set the security principal.
5. In the Edit ASP.NET Impersonation Settings dialog box, select either Specific user or Authenticated user. Whichever you decide, IIS uses this identity for the security context of the ASP.NET application. By default, IIS 8 is set to impersonate the authenticated user.
6. Click OK to finish or proceed to the next optional steps to change the identity to impersonate.
7. Optionally, click Set to change the Specific user identity.
8. In the Set Credentials dialog box, enter the name of an existing user account in User name, the password associated with that user account in Password, and then the exact same value in Confirm password for a new account IIS should use for anonymous access.
9. Click OK to close the Set Credentials dialog box.
10. Click OK to close the Edit ASP.NET Impersonation Settings dialog box.
Then Configure web.config on Application
Configure Aspnet/MVC app’s web.config as below
<configuration>
<connectionStrings>
<add name="xxxxx"
connectionString="Database= Test;Server=SUMAN-29\MYSERVER;Integrated
Security=SSPI; " providerName="System.Data.SqlClient" />
<add
name="ApplicationServices" connectionString="data source= SUMAN-29\MYSERVER;Integrated
Security=SSPI; ; Initial Catalog=Test"
providerName="System.Data.SqlClient" />
</connectionStrings>
and
<identity impersonate="true" password="@#@$@$@$@" userName="xxx" />
and
<identity impersonate="true" password="@#@$@$@$@" userName="xxx" />
if SSL is enable then
<authentication
mode="Forms">
<forms
loginUrl="~/Account/LogOff" name="tech"
timeout="30" requireSSL="True" />
</authentication>
Seems it is opening ….
#YoYo this is working and application goes
live…
gud 1
ReplyDeleteHello! I know this is somewhat off topic but I was wondering if
ReplyDeleteyou knew where I could locate a captcha plugin for
my comment form? I'm using the same blog platform as yours and I'm having difficulty
finding one? Thanks a lot!
If some one wants expert view regarding blogging and site-building afterward
ReplyDeletei recommend him/her to pay a quick visit this weblog, Keep up the
pleasant job.
Pretty nice post. I just stumbled upon your weblog and wanted to say that I
ReplyDeletehave truly enjoyed surfing around your blog posts. In any case I'll be subscribing to your rss feed and I hope you write
again soon!
I am truly glad to glance at this web site posts which consists of
ReplyDeleteplenty of useful information, thanks for providing such information.
I know this if off topic but I'm looking into starting my own blog and was
ReplyDeletewondering what all is needed to get setup? I'm assuming having a blog
like yours would cost a pretty penny? I'm not very web savvy so
I'm not 100% certain. Any suggestions or advice would be
greatly appreciated. Thank you
What's up to every body, it's my first pay a quick visit of this web site; this
ReplyDeleteweb site contains amazing and actually good stuff designed for
visitors.
continuously i used to read smaller posts which as well clear their
ReplyDeletemotive, and that is also happening with this post which I am reading at this place.
Do you have a spam issue on this blog; I also am a blogger, and I was
ReplyDeletecurious about your situation; we have created some nice practices and we are looking to swap
techniques with others, be sure to shoot me an email if interested.