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 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

Related Questions

Greetings: I have put together a RESTful web service in .NET 3.5 that takes
I have a .NET web-service client that has been autogenerated from a wsdl-file using
I have a .net web-service hosted in IIS 6.0 that periodically fails with an
I have a medium sized application that runs as a .net web-service which I
I have a .net project that has a web reference to a service. I
I have an ASP.NET web service which does some heavy lifting, like say,some file
I have some ASP.NET page and webservice WebMethod() methods that I'd like to add
I have a .NET web service which is publically accessible since it needs to
So I have a Stateful .NET webservice (C#) that I would like Flex to
I have a webservice that exists in an asp.net website. When I publish the

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.