I have the following issue :
How to route requests to different IIS sites by some cookie value ?
Main feature of the solution could be a simplest implementation because this is a temporary solution.
I have IIS v. 6.2
Related
I'm testing a cname record to a domain on my windows server 2012 r2 for future purposes.
I have this website => http://hiligolan.co.il/ which is already running.
This is the binding setup
Now I'm trying to set a different domain to the one I mentioned above using a cname record
When I'm surfing to http://rideme.co.il/ it returns http not found (as you can see)
Checking the ping shows no problem
So I assume that maybe the problem is at the server,
Could it be that something in the iis configuration blocking it?
note: I'm not looking for 301/2 redirect, what am I looking for is that anyone who will surf http://rideme.co.il/ will actually see http://hiligolan.co.il/ website but under rideme.co.il domain.
note 2: I'm not looking to add every other domain on my iis host binding (assuming I have thousands domain), I just want it to be "open" to all, allow every domain referring cname to => http://hiligolan.co.il/ to display it.
Thanks in advance.
You explicit ask IIS to only forward HTTP requests whose Host header contain hiligolan.co.il with that site binding.
Therefore, any request with Host header of rideme.co.il is not forwarded and 404 makes perfect sense.
The fix is also easy, to add a second site binding for the new domain.
Reference
https://docs.jexusmanager.com/tutorials/binding-diagnostics.html#background
I'm working with MicroStrategy 10.3, hosted on IIS 7.5. I'm using their
URL API to run a document, and change the value of a drop down selector.
IIS is tinkering with my query parameters though, via a 302 redirect. This URL:
https://server/MicroStrategy/asp/Main.aspx?Server=XXX&Project=XXX&evt=2048001&src=Main.aspx.2048001&maxWait=-1&documentID=XXX&evt=2048084&src=Main.aspx.oivm.rwb.2048084&ctlKey=XXX&elemList=hXX;XXX&evtorder=2048001%2c2048084&2048084=1&2048001=1
is being 302'ed to:
https://server/MicroStrategy/asp/Main.aspx?Server=XXX&Project=XXX&evt=2048001%2C2048084&src=Main.aspx.2048001%2CMain.aspx.oivm.rwb.2048084&maxWait=-1&documentID=XXX&ctlKey=XXX&elemList=hXX%3BXXX&evtorder=2048001%2C2048084&2048084=1&2048001=1
(The two distinct evt and src are being combined, and MicroStrategy is complaining that 'Event ID 2048001,2048084 is illegal'.)
Does IIS do this type of thing out of the box? It certainly seems unlikely. I can't see any custom HTTP redirects in IIS Manager for the application.
IIS was most definitely not the culprit.
MicroStrategy was generating the 302 redirect itself, subsequent to an automated login. You would think that an enterprise application wouldn't rewrite its own URL such that it causes an error, but you'd be wrong.
I resolved the issue by manually adding a login event, and URL-encoding the two events I wanted to call into the target key:
https://server/MicroStrategy/asp/Main.aspx?Server=XXX&Project=XXX&evt=3054&src=Main.aspx.3054&target=evt%3D2048001%26src%3DMain.aspx.2048001%26maxWait%3D-1%26documentID%3DXXX%26evt%3D2048084%26src%3DMain.aspx.oivm.rwb.2048084%26ctlKey%3DXXX%26elemList%3DhXX%3BXXX%26evtorder%3D2048001%252c2048084%262048084%3D1%262048001%3D1
I know if you make a ajax call from example.com to yahoo.com, it is a cross domain call. But I'm not sure about the followings situations.
1) One web application in IIS with domain name "www.test.com" and I also host a web service in IIS with domain name "api.test.com". Now if I make a ajax call from "www.test.com" to "api.test.com", will this be considered as a cross domain call?
2) Same as case 1 but if I host web application ("www.test.com") on a windows server and if I host host web Service ("api.test.com") in a Linux server, and now if I make a ajax call from "www.test.com" to "api.test.com", will this be considered as a cross domain call?
You can not do cross domain calls using javascript. This also includes calls between subdomains.
However getting a work around to make call to a subdomain easy. You need to set same document.domain in both the pages. You can read more about it here A question about cross-domain (subdomain) ajax request
Update:
Forgot to mention that cross domains are independent of backend server serving your requests. So it doesn't matter if server is IIS or Linux, it is all same.
Our company has two sites
www.mysite.com -- Wordpress site
www.mysite.com/portal -- asp.net mvc site
We want to move the wordpress site (www.mysite.com) to Azure and the other site stays local. We need to url stay the same. How can we achieve this?
Since you state that you need the URL to stay the same, this can be achieved through a reverse proxy. You would set up a web server (typically nginx or IIS) answering on www.mysite.com.
This web server would have reverse proxy rules to forward requests for /portal to your on-premises server (in a given, non-public IP and port) and all other requests to another web server running WordPress (on the same server/cluster that runs the reverse proxy, or a separate one), also with a given IP and port.
All user requests, then, would reach the reverse proxy, that would serve them from cache if possible, or forward them to the internal web servers, and send the response back to the user, transparently. Notice that this is an internal operation, not a redirect response.
Although this setup is more complex than the simpler solution of using different subdomains (www.mysite.com for website and portal.mysite.com for application), it comes with certain advantages that are described in the referenced Wikipedia article, such as security and acceleration.
Alternatively you could create separate subdomains as described above, and use a redirect rule to redirect requests for www.mysite.com/portal/x to portal.mysite.com/x. In this case, the user would see the updated URL in their browser, but the old ones would still work.
I have a simple web site (localhost/test) in IIS 5.1 with only a HttpModule and one aspx page.
When I browse the aspx page, the HttpModule works ok.
A POST with soapUI to the url of the aspx page (localhost/test/default.aspx) also works.
But a POST to the url of the web site (localhost/test) is not intercepted by the HttpModule.
What can I do to let the HttpModule react on all POST messages to the site.
Sorry when this is a beginner's question, but several days ago this worked on IIS 7.5 on another machine - has it got anything to do with the version of IIS?
You need to configure IIS to send all requests through ASP.Net by adding a wildcard mapping.