DiskQuotaGetUsage - How to pass a user name with spaces?

Discussion in 'Control Panel API' started by abodineau, Sep 22, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I would like to use the API to know the disk usage of this user: Anonymous ASPNet User
    But when I call the DiskQuotaGetUsage web method, I pass the api key and the user name="Anonymous ASPNet User"
    I get this error message:
    DiscountASP.net.UserErrorException: userName 'Anonymous ASPNet User' does not exist.

    It looks like it doesn't like the spaces in the user name. I've tried different things but to no avail. What should I pass exactly?

    Many thanks,

    Anthony
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    "Anonymous ASPNet User" is just a made up name. There's no such user on the server. Each website has a unique ASPNet username.
     
  3. I see. On this page https://my.discountasp.net/user-manager.aspx it says 'Anonymous ASPNet User' in the User column so I assumed that it was the name I had to pass to the web method.
    Where do I find this username then in the control panel?
     
  4. Anyone?
     
  5. Unfortunately right now, there is no way to query for this user. The reason is as bruce pointed out. Anonymous ASPNet User is just a generic name. On the system, your actual username is something else. There is no method that will provide you with this information. I will mention this to the product team.

    In the meantime, depending on how many users you have, I think you could add up the totals of all the other users and then subtract that by your total usage. Yes its ugly, but its the best suggestion I can make.
     
  6. Ok. Thanks Chuck. is there a way I can find out the actual username? If it's not possible then I will have to do what you suggest but it's very surprising given that the control panel has access to the usage of the Anonymous ASPNet User so you would expect the API to be able to return it too.
     
  7. No, there is currently no way as its not exposed through the API. As I mentioned, I will bring this point up with the product team though.
     
  8. Ok. Thanks Chuck.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page