Results 1 to 2 of 2

Thread: Web Service security, need to be configurable

Hybrid View

  1. #1

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

    Web Service security, need to be configurable

    Here is my web service:
    Code:
        <WebMethod(), PrincipalPermissionAttribute(SecurityAction.Demand, Authenticated:=True, Role:="MyDomain\Domain Users")> _
        Public Function GetData(ByVal strTableName As String, ByVal blnCustom As Boolean) As DataSet
            '**********************************************************************************
            'Gets the data for the given table name
            '**********************************************************************************
            GetData = DBGetData(strTableName, blnCustom)
        End Function
    The problem I am having is that I want to be able to make the Role attribute (Role:="MyDomain\Domain Users") changable when installed on the client machine. I wanted to do this with the web.config file if possible. Of course, it says it needs a constant in order to work. The problem with that is I want dynamic. We have been fighting back and forth, and the web service is winning. How do I change this instead of having to recompile?

  2. #2

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Well, for a work around, I am checking the HTTPContext to see if the user is in the role.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width