Results 1 to 4 of 4

Thread: client side authorization in asp.net web project

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    client side authorization in asp.net web project

    i am developing a server-client program in which server will be showing datas sent by client across a network. without Authentication it works fine but once i give authentication i am not able to get datas from client.client is a winfrom application.i know that client must be given authorization to put data into server.can anyone tell me how to do that?i am developing based on the link given below

    blog.bobcravens.com/2009/11/browse-files-on-remote-computers

    posting server side authentication code
    Code:
    <authentication mode="Forms">
      <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH">
    
    
      </forms>
    </authentication>
    
    <authorization>
      <deny users = "?"/>
    </authorization>

    login.aspx
    Code:
    <script runat="server">
        Sub Login_Click(ByVal sender As Object, ByVal e As EventArgs)
            If ((UserEmail.Text = "[email protected]") And _
                (UserPass.Text = "000")) Then
                FormsAuthentication.RedirectFromLoginPage _
                     (UserEmail.Text, Persist.Checked)
            Else
                Msg.Text = "Invalid credentials. Please try again."
            End If
        End Sub
    </script>
    i have written validation code also.everything works fine on the server side but not able to get data from client side..

    client program is written in c#,client-server communication is via http post.

    code below is how client register with the server.
    Code:
    private void Register()
                    {
                            // Register with the server.
                    
                            
                            RegisterMessage registerMessage = new RegisterMessage
                            {
                                    
                    
                                    ComputerName = Environment.MachineName,
                                    TimeStamp = DateTime.Now,
                                    UserInfo = Environment.UserDomainName + "\\" + Environment.UserName
                            };
                            PostMessage(registerMessage);
                    }
    
    
    private void PostMessage(BaseMessage message)
                    {
                            BaseMessage[] messages = null;
                            try
                            {
                                    messages = _webService.Poll(message);
                            }
                            catch (Exception ex)
                            {
                                    // Service must be down.
                                    //
                                    MessageBox.Show(ex.ToString());
                                    _pollMode = PollModeOptions.Register;
                            }

    request to server is done based on the link below.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: client side authorization in asp.net web project

    Hello,

    I am confused by your question.

    In the blog post that you link to, there are technically two clients, and one server.

    The first client is the desktop computer which is running the Agent, and providing the data about the client to the server.

    The second client is the monitoring station, which is an ASP.Net Application which communicates again with the server.

    The two clients never talk directly to one another.

    Can you confirm exactly which area of the application that you are referring to, and also provide some more information about the exact problem that you are having?

    Gary

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    Re: client side authorization in asp.net web project

    Can you confirm exactly which area of the application that you are referring to, and also provide some more information about the exact problem that you are having?
    area of application that i am having problem is The first client ,the desktop computer which is running the Agent, and providing the data about the client to the server.

    i know its because the client doesn't have authorization to put data to the server.i am new to c# projects so i don't know how to implement it.
    the exact problem i am having is listed below in the screen shot.
    Attached Images Attached Images  

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: client side authorization in asp.net web project

    Are you running the application directly as listed on the blog post, or are you editing it?

    Given the complexity of this application, it might be better to get in touch with the original author directly.

    Gary

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