{"id":2507,"date":"2014-01-27T13:07:28","date_gmt":"2014-01-27T17:07:28","guid":{"rendered":"http:\/\/www.iowawebnet.com\/ein\/?p=2507"},"modified":"2014-01-27T13:11:49","modified_gmt":"2014-01-27T17:11:49","slug":"vb-net-user-impersonation","status":"publish","type":"post","link":"https:\/\/www.iowawebnet.com\/ein\/2014\/01\/vb-net-user-impersonation\/","title":{"rendered":"VB.NET &#8211; User Impersonation"},"content":{"rendered":"<p><strong>Application Error: <\/strong><\/p>\n<p>&#8220;ASP.NET\u00a0 v4.0&#8221; does not have the authority to perform the requested command or operation.\u201d<\/p>\n<p><strong>Problem:<\/strong><\/p>\n<p>ASP.NET\u00a0 v4.0 application has no right to access DB2 database with default application user.<\/p>\n<p><strong>Solution:<\/strong><br \/>\n<a style=\"display:none;\" id=\"te579674085\" href=\"javascript:expand('#te579674085')\">Read more&#8230;<\/a>\n<div class=\"te_div\" id=\"te579674085\"><script language=\"JavaScript\" type=\"text\/javascript\">expander_hide('#te579674085');<\/script><\/p>\n<ol start=\"1\">\n<li>Login on to server where your application is hosted<\/li>\n<li>Create new local user account (myuser, myusrpwd)<\/li>\n<li>Add myuser account to DB2ADMNS, DB2USERS and IIS_IUSRS groups<\/li>\n<li>Open IIS Manager (Start \u2013 inetmgr \u2013 Enter)<\/li>\n<li>Select Default Web Site<\/li>\n<li>In Default Web Site Home screen, double click <b>Authentication<\/b><\/li>\n<li>Right-click ASP.NET \u00a0Impersonation and <b>Enable<\/b> it. Right-click it again and <b>Edit<\/b> it. <b>Check <\/b>Specific User: and click <b>Set\u2026<\/b> button. Enter username and password for the specific user (myuser). Click <b>OK<\/b>.<\/li>\n<\/ol>\n<pre>\r\n<code>\r\n&lt;identity impersonate=\"true\" password=\"myurspwd\" userName=\"myuser\" \/&gt;\r\n<\/code>\r\n<\/pre>\n<ol start=\"10\">\n<li>Save and x-out Web.config file.<\/li>\n<li>Build and Publish your application.<\/li>\n<\/ol>\n<p><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Application Error: &#8220;ASP.NET\u00a0 v4.0&#8221; does not have the authority to perform the requested command or operation.\u201d Problem: ASP.NET\u00a0 v4.0 application has no right to access DB2 database with default application user. Solution: Read more&#8230; Login on to server where your application is hosted Create new local user account (myuser, myusrpwd) Add myuser account to DB2ADMNS, [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,77,17,16,67,138],"tags":[139,141,140],"class_list":["post-2507","post","type-post","status-publish","format-standard","hentry","category-net-4-0","category-application-error","category-applications","category-net","category-sql","category-vs2012","tag-impersonation","tag-vb-net","tag-vs2012-2"],"_links":{"self":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/2507"}],"collection":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/comments?post=2507"}],"version-history":[{"count":5,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/2507\/revisions"}],"predecessor-version":[{"id":2512,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/2507\/revisions\/2512"}],"wp:attachment":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/media?parent=2507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/categories?post=2507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/tags?post=2507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}