[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Form Authentication in MVC

Hi,

 We have two websites, one is asp.net website and another is MVC website. We need to get login details in MVC website. Actually MVC website is redirecting from the asp.net site. We have applied form authentication in the asp.net website and is working fine. But we didn't getting the login details in the MVC site. Always getting  HttpContext.User.Identity.IsAuthenticated=false

 Please advice a solution

 Thanks
0
gopalv
Asked:
gopalv
  • 3
  • 3
1 Solution
 
gdemariaCommented:
MVC is a framework and asp.net is a programming language.  What language is the MVC site coded in, also in asp.net?

Do the websites share a domain?  You can defined a domain cookie to use to allow access on both sites.
0
 
gopalvAuthor Commented:
C# language is using for both sites (MVC4 and asp.net ). We added the  two applications under one website
0
 
gopalvAuthor Commented:
Form authentication is working fine in the same domain but it is not working  on different domain.
Please advice a solution ,

Thanks
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
gdemariaCommented:
It sounds like you're talking about having a person login on one domain and maintaining that login on the second domain, without them having to login again.   If so, then you need to pass some encrypted authorization identifier when moving between the sites and use it to them into the other site.   I would say use a common cookie, but that doesn't work with different domains, unless its just different subdomains.
0
 
gopalvAuthor Commented:
Solved by the using redirection url with server name and port number
0
 
gdemariaCommented:
It's inappropriate to give a "C" grade when the ball was in your court, if you needed further information or assistance it is your responsibility to ask.   I didn't even know what approach you were going for and you closed the question.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now