We have 2 web sites. Two web sites were hosted in different LAN.
For example
Server 1 : http://10.106.15.27:1220/Master/LogIn
Server 2 : http://10.105.27.1221/Accounts/LogIn
Users can access Server 1 only and cant access Server 2 due to some restrictions.
Now i want to redirect server 2 web Page in Server 1 like
http://10.106.15.27:1220/External/Accounts/LogIn in my MVC . So Other users will see Server 2 from Server 1.
How can i route like this in my MVC ?
Related
I have a public API (Asp.Net WebAPI), where all calls start with the the url: /api/callName.
I have a second website that is the actual public MVC website.
I would like both of the above to be hosted on separate servers.
http://mywebsite:80/main/page1 should open my actual website, hosted on server 1.
http://mywebsite:80/api/call1 should open my API website, hosted on server 2.
Is this possible????
Try to play around with IIS Web Farm and load distribution algorithms. So, one of the solutions: set up web farm, use load distribution in a manner when server1's weight is 100 for http://mywebsite:80/main/page1 , while server2's weight is 0 for the same request and vice versa for http://mywebsite:80/api/call1
Plan :
Many asp net 4.5 sites hosted on azure (will be mapped to different domains) -->
How to share login between the sites?
Option 1 :
Use 1 database for all sites - how each site login and which site is the "master site" which hold
the database?
Option 2 :
Use database for each site with extra 1 global database for users(+forums posts)
Option 3 : ( combine 1+2 ?! )
2 database , 1 for users users(+forums posts) + 1 for data
Either option , I don't know how to do it ...
I'm using CodeFirst Membership Provider
If I login to SiteA is like login for SiteB and etc ( you got the point )
Is it "same domain" if all sites sits on Azure?
You need to use Azure Access Control Service (ACS) which is a part of Windows Azure Active Directory.
Create one ACS namespace and add all your applications urls as relying parties in this namespace through the portal. After that you need to Add a STS Reference from Visual Studio (that comes up when you install Windows Identity Foundation) for each of your application by giving the url of your ACS service namespace.
You will have to add your custom Identity Provider against which you need to do authentication. For example, in your scenario you can have a single database and create a custom STS that authenticates using forms authentication, and you will have to use the url of this service as your Identity Provider in ACS namespace. You have option to Add default identity providers such as Windows Live, Google, Yahoo and Facebook as well in case you want.
For some detailed steps refer this link
There are few sample codes available at MSDN Code Gallery as well.
Use database for each site with extra 1 global database for users
This option sounds good for me.
You can use CAS (Central Authentication Service) and this way you'll have a central point to authenticate the users. CAS will be configured to authenticate in the Global Database.
**It's necessary to configure each ASP Application to authenticate using CAS.
The basic authenticate flow is:
User tries access a specific ASP site.
The ASP site identifies that the users isn't authenticated and redirect the user to CAS (that runs in other web site).
User types your login and password.
CAS checks in the Global Database if the login and password are correct.
If yes, CAS redirects the user to the specific ASP site (step 1).
You will need to install Java and Tomcat (or other java application server) to run CAS. Because of that, I don't know if CAS is a good option for you.
http://www.jasig.org/cas
I'm using CAS authenticating against an Active Directory instance.
Sorry my english.
We have an ASP.NET MVC 3 application deployed in production with 3 servers on an LB. The application accessed via SSL and is working in each of these servers separately. When it is on the domain with LB the same Urls goes on infinite loop. Any thoughts, Thanks in advance
-George
I have an ASP.NET MVC app that has on a hosted server for over a year, connecting to SQL Server. I've had to change hosting services, the new one supports MVC 1.0. I've also moved a non MVC ASP app to the same hosting service.
Now, MY MVC based app retturnes this error when I try to validate a user login.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Now, the non-MVC app can access the exact same database and authenticate users just fine. The MVC app, when run from my dev box connects fine. It also run/connects/authenticates without problem when I install and run the site from an internal SQL 2008 server running IIS 7.
I, along with the hosting support techs, am at a loss how the exact same connect string works every where except on the hosted server, and only when run from inside an ASP.NET MVC web app.
Any ideas would be greatly appreciated.
Are you using SQL authentication or Windows authentication in your connection string? If you're using Windows authentication the default account used for IIS apps is NETWORK SERVICE. You would need to allow this user access to your database.
You might want to check what user the application pool is running under. It's possible the non-MVC application is running under a different user than the MVC application.
We have a few 'classic asp' client facing websites feeding off a central asp.net mvc site which acts as a webservice ie we query the MVC controllers directly from the ASP sites with extensive use of jquery ajax. This MVC site in turn queries sql server running on a seperate box. We have a custom session profile which requires a call to the database on every page view.
At the moment the client facing websites sit on the same box as the mvc site. We now want to use Windows 2008 network load balancing service to both contain high bursts of traffic and maintain availabilty. Within a currently limited budget...
What is the best policy: 2x2 - client sites on 2 NLBed boxes & MVC on seperate pair of NLBed boxes- or both on a single group of 3 NLBed boxes?
I would go with the 2x2 solution just to help keep those MVC sites away from the Web. If you do not need the MVCs kept away from the web then go with 2 or 3 NLB'd boxes.
Be aware that NLB is a IP to IP load-balancing solution so if you are funneled through a single connection it will end up always going to the same server and you really just get Fail over.