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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:23:46+00:00 2026-06-04T03:23:46+00:00

I made a MVC3 project on asp .net where user login is with ajax.

  • 0

I made a MVC3 project on asp .net where user login is with ajax. It works normally that, user can go an authorized page after ajax forms authentication(login buttonfires an ajax post) with user’s username and pass info.

But, if user tries to go this unauthorized page with writing direct adress (like: “http://localhost:12799/Anasayfa/Index”) to address bar and hits enter before authentication, he hits the authorization wall and returns back, and inside browser’s address bar a url like “http://localhost:12799/Giris/Index?ReturnUrl=%2fAnasayfa%2fIndex” comes, after this situation, when the user tries normal login, ajax login doesn’t work, login button can not fire ajax post.

  • 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-04T03:23:47+00:00Added an answer on June 4, 2026 at 3:23 am

    I found solution,

    My ajax function is like that: $.post('Giris/GirisGecerliMi', kullanici, girisAjaxReturn);

    when adress bar is http://localhost:12799 it works with true url. But after adress bar writes as http://localhost:12799/Giris/Index?ReturnUrl=%2fAnasayfa%2fIndex ajax tries to go a wrong url.

    After some search, I saw my mistake, I should have written as: $.post('/Giris/GirisGecerliMi', kullanici, girisAjaxReturn); only a “/” difference solved the problem. Sorry for taking your time.

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

Sidebar

Related Questions

I`v made my webpart that works well (I can add it to page and
I've got an ASP.NET MVC 3 project which works with jQuery. At some point
I am working on a project which adopted ASP.NET MVC3(Razor) tech. Now, I have
Does Ajax calls made through $.get (JQuery) keep the Asp.Net session state alive? I
I'm starting a simple web application, using ASP.Net MVC 3. I made a few
I have a project consisting of three projects, WCF service Asp.net MVC 3 application
I have made an mvc3 application with Windows Authentication. Everything works fine but I
I am developing a web application in ASP.NET MVC3 with C# and Razor. I
I've been fiddling with some ASP.NET MVC3 solution structures and I have settled on
When I try sample application which is made as default with asp.net mvc 3.0,

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.