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 6711805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:11:05+00:00 2026-05-26T08:11:05+00:00

I am getting the error Not all paths return a value, and I totally

  • 0

I am getting the error “Not all paths return a value”, and I totally understand why.

As you can see I want to redirect the person isn’t logged in, and obviously there is no return view.

I’m sure I’m going about this incorrectly. How should I be trying to do this?

    public ActionResult Confirmation (Order Order) {
        if (Session["CompanyID"] == null)
        {
            string url = Request.Url.Host;
            if (Request.Url.Port != null)
            {
                url = url + Request.Url.Port;
            }
            url = url + "/signin.asp";
            Response.Redirect(url);


        }
        else
        {

            int userID = (int)Session["CompanyID"];
            Corp_User User = Repository.CorpUserDetails(userID);

            return View(new OrderLocation { Order = Order, Location = WhygoRepository.RoomDetails(Order.roomId).First(), Corp_User = User });
        }


    }

Please note that I need to redirect to a classic ASP page, not an MVC action..

  • 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-26T08:11:06+00:00Added an answer on May 26, 2026 at 8:11 am

    You could return a RedirectResult – http://msdn.microsoft.com/en-us/library/system.web.mvc.redirectresult.aspx

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

Sidebar

Related Questions

I'm getting a compile time error 'UserQuery.ReturnInt(UserQuery.Foo)': not all code paths return a value
I am getting an error I do not understand. I am using File:Find to
I am getting an compilation error not a statement for the below code. Not
I'm getting the error: wintypes.dcu not found several times a day in the Delphi
I'm getting the error Object reference not set to an instance of an object.
I'm getting the error T does not contain a definition for Id below in
I keep getting the error: Type was not found or was not a compile-time
I'm getting the error: parser error : Input is not proper UTF-8, indicate encoding
I'm getting an error msg DataReader.h:13: error: 'String' was not declared in this scope
I'm not sure why I'm getting this error, but shouldn't this code compile, since

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.