What ASP.NET permissions do I need to access a serial port?

前端 未结 3 1766
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 18:11

I am working on a asp.net application and I want it to communicate to a arduino board via a serial port. I created a windows application that could do that and it worked, b

3条回答
  •  Happy的楠姐
    2021-01-20 18:53

    ASP.net uses a specific user account on your computer. Just like your main account you log in with. That user account has no permissions to do anything with the hardware.

    To impersonate the other account in ASP.net you do the following:

    Create an account that has all of the same permissions that the web user does, then in the web.config file add the following code in between the configuration tags

    
    

提交回复
热议问题