简体   繁体   中英

Visual Studio 2013 Bypass Authentication When Debugging

I have an ASP.Net website that uses authentication. In VS2012 I simply commented out:

<authentication mode="Forms">
      <forms loginUrl="~/login.aspx" timeout="2880" />
</authentication>

to debug without having to login.

However, I've now opened the site in VS2013 and I get an access denied error when I hit debug. What can I do to bypass authentication whilst debugging in VS2013?

I've got around the issue by commenting out

<authorization>
  <allow roles="administrator" />
  <deny users="xxx1" />
  <deny roles="xxx2" />
  <deny roles="xxx3" />
  <deny roles="xxx4" />
  <deny roles="xxx5" />
</authorization>

in web.config.

Thought I's share if anyone else get's caught out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM