EventViewrErrorCode-4010:Event message: An unhandled security exception has occurred. RRS feed

  • Question

  • Experts,

    when I deploy webapi on IIS 8.5   I get error 4010:Event message: An unhandled security exception has occurred.

    My Authentication for my websevice is windows and my web.config has code

     <authentication mode="None"></authentication>
          <allow users="*"/>


    My web api code is 

     public static void Register(HttpConfiguration config)
                // Web API configuration and services
                // Web API routes
                    name: "DefaultApi",
                    routeTemplate: "api/{controller}/{id}",
                    defaults: new { id = RouteParameter.Optional }

    namespace My.Controllers



        public class MyController : ApiController




            public HttpResponseMessage Getabc([FromUristring xyz)



            public IHttpActionResult Getxyz([FromUristring abc)






    • Moved by Fei Hu Monday, March 26, 2018 9:08 AM Moved From C#
    Friday, March 23, 2018 10:42 PM

All replies

  • Does IIS 8.5 have anonymous users enabled for the site?
    Saturday, March 24, 2018 1:38 PM
  • Hi Ken,

    Thanks for the reply!

    I didn't get your question. If you are looking for what kind of authentication is enabled for this website then it is windows authentication and if you are looking using which account app pool is running then it is a AD account! If it is otherwise, please let me know specific steps to look for that information!


    Sunday, March 25, 2018 7:26 PM
  • Hello Kaleem,

    Based on your description, I suggest that you can consult your issue directly on Asp.net forum for better solution and support.

    If you have some grammar or code errors in using C#, please feel free to contact us. We will try our best to give you a solution.

    Best Regards,

    Neil Hu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 26, 2018 9:07 AM
  • Sure, will move!

    Tuesday, March 27, 2018 4:51 AM