Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2005

Tip: Looking for answers? Try searching our database.

Request format is unrecognized

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Merighi - 06 Apr 2005 12:17 GMT
I've this problem: i'm trying to build a method that outputs an object like
this:

public class Autenticazione
    {
       
        public string Username
        {
            set
            {
                Username=value;
            }

            get
            {
                return Username;
            }
       
        }

        public string Password
        {
            set
            {
                Password=value;
            }

            get
            {
                return Password;
            }
       
        }

The WebService implementation is this:

public class Service1 : System.Web.Services.WebService
    {
        public static Autenticazione aut;
        public Service1()
        {
            InitializeComponent();
            aut = new Autenticazione();
            aut.Username="username di prova";
            aut.Password="password di prova";
        }
        [WebMethod]
        public Autenticazione get_Autenticazione()
        {
            return aut;
       
        }

When i try to call the method, i receive this response:
Request format is unrecognized.

Is there anyone who can help me?

Thanks

Francesca
erymuzuan - 06 Apr 2005 15:15 GMT
it was suprising. you didn't get StackOverFlowException
try this instead
public class Autenticazione
{
    private string m_userName;
    private string m_password;
    public string Username
    {
        set
        {
            m_userName = value;
        }

        get
        {
            return m_userName;
        }

    }

    public string Password
    {
        set
        {
            m_password = value;
        }

        get
        {
            return m_password;
        }

 }

 public class Service1 : System.Web.Services.WebService
 {
    public Service1()
    {

        InitializeComponent();
    }
    [WebMethod]
    public Autenticazione get_Autenticazione()
    {
        Autenticazione aut = new Autenticazione();
        aut.Username="username di prova";
        aut.Password="password di prova";
        return aut;

    }
 }

regards
erymuzuan
Merighi - 06 Apr 2005 15:35 GMT
i forgot try/get use, Thanks.

> it was suprising. you didn't get StackOverFlowException
> try this instead

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.