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

  • Home
  • SEARCH
  • 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 563337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:38:58+00:00 2026-05-13T12:38:58+00:00

I have a .net web service that takes some xml data. From within the

  • 0

I have a .net web service that takes some xml data.

From within the web service, I want to manipulate the data and then call a web page that displays information to the user. The web service should return after spaning the web page.

I am not having any luck doing this.

I have tried Server.Transfer(url, end); Which generates the exception since my return has been trashed with the transfer:
Client found response content type of ‘text/html; charset=utf-8’, but expected ‘text/xml’.

I have also tried Context.Response.Redirect(url, end); which generate a 302 exception(Object moved).

I have seen various desciptions on how to handle the 302 error. However I dont have control over the client. In this case, my service will be called from a java application so I cant wrap the client side call before making the Web Service call. I need to do it from within the asmx.

// this is very basic but the general gist
[WebMethod]
public string MyRequest(string someXML)
{
    // process the xml, dump do database, invoke aspx page

    string url = "xxxx.aspx";
    bool end = false;

    Server.Transfer(url, end);
    //this.Context.Response.Redirect(url, end);

    return "<retcode>somecode</retcode>";
}

I have looked for examples of this situation or a way to asyncrounously call the web page from within the service and return. Can anyone point me to this pattern or an example?

Thanks

Mike

  • 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-05-13T12:38:58+00:00Added an answer on May 13, 2026 at 12:38 pm

    Unfortunately, if you have no control over the client application, this isn’t going to be possible. Think about it from the client app end.

    Web services (I’m guessing SOAP in this case) go over http as a convenience, but are really data calls, they are not web pages. As such there is no obligation for the client app to honour a redirect to a website, which is in effect a protocol jump. I’m guessing most SOAP libraries would follow a 302 redirect under the assumption that the data service they are trying to call has moved, so still expecting to find the data service on the new URI.

    Assuming also the client is some sort of application (ie, not javascript running in a browser), it probably can’t even render a web page, so would have to launch a browser.

    If you don’t control the client, but do control the protocol / interface, you might be able to define a return type where you expect the clients to launch a browser, but this is basically just asking the client implementors to do what you can’t directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 279k
  • Answers 279k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The size of the stack panel is dependent upon the… May 13, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer I'm not a C# programmer, but it looks here that… May 13, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer You can't. Hopefully we'll get that in 3.1. Until then,… May 13, 2026 at 3:26 pm

Related Questions

I have a simple task. I have an existing project with a web service
I'm developing out replacements for our company's web service stack. The current stack was
Sorry answer found while typing I am trying to connect to an external webservice
I have a file which is an XML representation of some data that is
I have a windows service written in C# .NET framework 3.5 and would like

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.