Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:00:49+00:00 2026-06-12T05:00:49+00:00

I write an android application that send text data to asp.net webserver. I’m using

  • 0

I write an android application that send text data to asp.net webserver. I’m using next code to sent data via Http:

try {
    URL url = new URL(serverUrl);
    connection = (HttpURLConnection)url.openConnection();
    connection.setDoInput(true);
    connection.setDoOutput(true);
    connection.setUseCaches(false);

    // Enable POST method
    connection.setRequestMethod("POST");

    connection.setRequestProperty("Connection", "Keep-Alive");
    connection.setRequestProperty("Content-Type", "text/plain; charset=utf-8");
    output = new DataOutputStream(connection.getOutputStream());
    String finalUri = sendedUrl.replace("gaburl", "");
    output.writeChars(finalUri);
    //Toast.makeText(context, finalUri, 1000).show();
    output.flush();
    output.close();
}
catch(Exception e) {
    Toast.makeText(context, e.toString(), 5);
}

How I can receive and display data sending by output.writeChars(finalUri) method in ASP.NET application ? This process should executing like descripe bellow:

1)We have asp.net forms that are a target of sender’s android method desripe earlier;

2)Forms should read string data that sent to it and display it.

Help please

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:00:51+00:00Added an answer on June 12, 2026 at 5:00 am
    Using Ksoap2 library and write .net web service 
    Sucessful Connection with Asp.net Webservice-----
    package ProductVerificationCard.in;
    
    import org.ksoap2.SoapEnvelope;
    import org.ksoap2.serialization.SoapObject;
    import org.ksoap2.serialization.SoapSerializationEnvelope;
    import org.ksoap2.transport.HttpTransportSE;
    
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.Button;
    import android.widget.TextView;
    
    public class AdminLogin extends Activity {
        /** Called when the activity is first created. */
        Button btn_ok;
        TextView textView;
        private static final String SOAP_ACTION = "http://tempuri.org/Login";
    
        private static final String OPERATION_NAME = "Login";
    
        private static final String WSDL_TARGET_NAMESPACE = "http://tempuri.org/";
    
        private static final String SOAP_ADDRESS = "http://10.0.2.2/new/WebService.asmx";
        String s;
    
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            btn_ok=(Button) findViewById(R.id.btn_login);
            textView=(TextView) findViewById(R.id.tv_error);
    
            btn_ok.setOnClickListener(new OnClickListener() {
    
                public void onClick(View v) {
                    SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,
                            OPERATION_NAME);
    
                            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                            SoapEnvelope.VER11);
                            envelope.dotNet = true;
    
                            envelope.setOutputSoapObject(request);
    
                            HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
    
                            try
    
                            {
    
                            httpTransport.call(SOAP_ACTION, envelope);
    
                            Object response = envelope.getResponse();
    
                            //textView.setText(response.toString());
                             s=response.toString();
                             if(s=="true")
                             {
                                 Intent intent=new Intent(AdminLogin.this,MenuForm.class);
                                    startActivity(intent);
    
                             }
    
                             else
                             {
                                 textView.setText("Enter Valid Username or Password");
                             }
                            }
    
                            catch (Exception exception)
    
                            {
    
                            textView.setText(exception.toString());
    
                            }
                    // TODO Auto-generated method stub
                    }
            });
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write an Android application that can display some data received(polled) from
I want to write an application for Android devices that interacts with the surface
I want to write an application for Android, a card game that can be
I would like to write an Android application that can be activated by sending
I have tried to write an Android application with an activity that should be
I need to write an application that sends data to the Google App Engine
I want to write an Android remote control application that allows people to navigate
I am trying to write a very simple Android application that checks the signal
I wrote simple application that send some data to my server. Somehow the data
i need to write simple android application that run on the background and read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.